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

Focus doesn't move to TextInputs with tab key from external keyboard on android.

Open twinkletyagi06 opened this issue 1 year ago • 0 comments

Description

I have developed an application using TextInputs. However, when switching the focus using Tab key using an external keyboard on android phone, the focus doesn't move. onKeyPress has a limitation of not handling inputs from hardware keyboard. I couldn't find a single way of detecting Tab key press from external keyboards.

The objective is to make TextInputs focusable using tab key press from external keyboards.

Steps to reproduce

  1. Installed the application in android phone.
  2. Connect external hardware Keyboard via bluetooth.
  3. Move focus via tab key from external keyboard.

React Native Version

0.73.0

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: Windows 11 10.0.22631
  CPU: (8) x64 Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
  Memory: 4.61 GB / 15.75 GB
Binaries:
  Node:
    version: 18.16.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 9.8.1
    path: ~\AppData\Roaming\npm\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowAllTrustedApps: Enabled
    AllowDevelopmentWithoutDevLicense: Enabled
    Versions:
      - 10.0.17763.0
IDEs:
  Android Studio: AI-213.7172.25.2113.9123335
  Visual Studio:
    - 17.9.34728.123 (Visual Studio Enterprise 2022)
Languages:
  Java: 11.0.17
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

No crash happening.

Reproducer

(https://snack.expo.dev/WIQfX9dLsLa7Ej0dx5BxS?platform=android)

Screenshots and Videos

No response

twinkletyagi06 avatar Apr 22 '24 09:04 twinkletyagi06