How to use preventDefault() ?
Hi i have a need to read the pressed key and prevent from actual key press.
As KeyEvent is only returning me {"action": 1, "keyCode": 30, "pressedKey": "B"} How to access the event object to preventDefault() ?
Once your app intercepts a keyEvent the default behavior for that keyEvent is prevented by default.
For what purpose would you want to preventDefault()?
I want to prevent behaviour after read my key i see react native click inside my app. I want to prevent this behaviour.
I want to prevent behaviour after read my key i see react native click inside my app. I want to prevent this behaviour.
I can confirm this is a bug where the first keyEvent is not caught and is handled by the OS with default behavior. All subsequent keyEvents are caught and handled by react-native-keyevent.