react-native-keyevent icon indicating copy to clipboard operation
react-native-keyevent copied to clipboard

Pressing the center button on Android TV Remote works only on long press

Open manjunath-nuveb opened this issue 2 years ago • 0 comments

I am testing on TV emulator.

The issue happens only when the keyboard is opened and closed (using input).

after some debugging

@Override
  public boolean dispatchKeyEvent(KeyEvent event) {
    int keyCode = event.getKeyCode();
    Log.d("qqq", String.valueOf(keyCode));
    if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN) {
      KeyEventModule.getInstance().onKeyDownEvent(event.getKeyCode(), event);
      return false;
    }
    return super.dispatchKeyEvent(event);
  }

code is reaching return super.dispatchKeyEvent(event); but not registered on

KeyEvent.onKeyDownListener(this.handleKeyDown)

Only on long press multiple enters are registered.

manjunath-nuveb avatar Feb 08 '24 06:02 manjunath-nuveb