title: React native - how to detect space press on keyboard?
body: <p>I am building a chat app and trying to count how many times the user pressed on 'space' key every time they press it and not counting it on the final outcome of their textinput entery.</p>
  <pre><code>&lt;TextInput onKeyPress={(e) =&gt; {
      let pressedKey = e.nativeEvent.key;
      if(pressedKey === ' '){
      pressedKey = 'Space';
    } /&gt;
  </code></pre>
  <p>This code example works for me only if the user press two times on space</p>