We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context:
kevinejohn/react-native-keyevent#80
Solution:
add the following code to make DPAD_CENTER work. this ensure that short presses work instead of user needing to long press
const withAndroidMainActivityBody = (config) => { // @ts-ignore const newConfig = (0, config_plugins_1.withMainActivity)(config, (config) => { const newSrc = [ // ... code omitted, the below lines is what I added '@Override', 'public boolean dispatchKeyEvent(KeyEvent event) {', ' if ((event.keyCode == KeyEvent.KEYCODE_ENTER || event.keyCode == KeyEvent.KEYCODE_DPAD_CENTER) && event.getAction() == KeyEvent.ACTION_DOWN) {', ' KeyEventModule.getInstance().onKeyDownEvent(event.getKeyCode(), event);', ' return false;', ' }', ' return super.dispatchKeyEvent(event);', '}', ]; // .... rest of code
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Context:
kevinejohn/react-native-keyevent#80
Solution:
add the following code to make DPAD_CENTER work. this ensure that short presses work instead of user needing to long press
Thanks!
The text was updated successfully, but these errors were encountered: