how I can handle external keyboard events like pressing arrow keys (without a TextInput) ?
I'm trying to accomplish this because I need to receive some information from a external device that acts just like a keyboard
KeyboardAvoidingView. The most simple solution, and the easiest to install, is KeyboardAvoidingView. It's a core component but it's also pretty simple in what it does. You can take the base code, which has the keyboard covering the inputs, and update that so that the inputs are no longer covered.
onSubmitEditing is triggered when you click the text input submit button (keyboard button). onChangeText is triggered when you type any symbol in the text input. In your example, you will achieve what you need in both cases. Save this answer.
We use react-native-keyevent to handle events from bluetooth keyboard. You can check if it suits your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With