Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react native external keyboard handler

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

like image 661
Rafael Ribeiro Correia Avatar asked Jul 12 '16 15:07

Rafael Ribeiro Correia


People also ask

How do I manage my keyboard in React Native?

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.

How do I use onSubmitEditing React Native?

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.


1 Answers

We use react-native-keyevent to handle events from bluetooth keyboard. You can check if it suits your needs.

like image 195
HonzaHK Avatar answered Sep 19 '22 05:09

HonzaHK