title: React Native - How to prevent the modal from closing when user hit the ESC key
body: <p>When a user attaches a keyboard to a react-native app, and presses the ESC key, it will hide the modal component.  The component is not unmounted so it virtually freezes the entire app.</p>
  <p>How do you trap or prevent ESC key from closing/hiding the modal?</p>
  <p>Something like this</p>
  <pre><code>import { Modal } from 'react-native';
  
  &lt;Modal
      onKeyPress={(e) =&gt; e.nativeEvent.key == 27 &amp;&amp; e.nativeEvent.preventDefault() or e.preventDefault()?
  </code></pre>
  <p>TIA!</p>