Skip to content
New issue

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

bug(android): we should not be handling key events when the active input type is InputType.NULL #13125

Open
1 of 8 tasks
jahorton opened this issue Feb 4, 2025 · 0 comments
Open
1 of 8 tasks
Assignees
Milestone

Comments

@jahorton
Copy link
Contributor

jahorton commented Feb 4, 2025

Describe the bug

I initially found this issue when chasing down something else: #12848

When interacting with the main text input area on keymanweb.com, the active "input type" enum provided to us by Android is InputType.NULL: https://developer.android.com/reference/android/text/InputType#TYPE_NULL

In this mode, the keyboard has no view into any surrounding text. After all, the keystrokes should be directly interpreted, rather than editing text directly. After further examination...

  • any 'text' we emit into the context while InputType == TYPE_NULL is re-interpreted as a keystroke.
  • There is no context - no "extracted text" available
  • Combining these two facts, backspace becomes inoperable.

Reproduce the bug

  1. Set Keyman for Android as your Android device's system keyboard.
  2. Have a physical Bluetooth keyboard paired and at the ready.
  3. Go to keymanweb.com and select a language.
  4. In the URL bar, select a language for the system keyboard.
    • Behavior will differ between sil_euro_latin (mostly working) and khmer_angkor (nothing working)
  5. Attempt to type.

Expected behavior

Our keyboard probably should essentially become passthrough for InputMode.NULL, simply passing keystroke event data through. Ideally, during that input mode, we'd avoid handling the physical keystrokes entirely, letting them be handled in a default manner. Alternatively, we could just forward everything through dispatchKey() to similar effect... I think.

Related issues

#12831

Keyman apps

  • Keyman for Android
  • Keyman for iPhone and iPad
  • Keyman for Linux
  • Keyman for macOS
  • Keyman for Windows
  • Keyman Developer
  • KeymanWeb
  • Other - give details at bottom of form

Keyman version

18.0.183-alpha

Operating system

No response

Device

No response

Target application

No response

Browser

No response

Keyboard name

No response

Keyboard version

No response

Language name

No response

Additional context

No response

@jahorton jahorton added the bug label Feb 4, 2025
@mcdurdin mcdurdin changed the title bug(android): handling for InputType.NULL bug(android): we should not handling key events when the active input type is InputType.NULL Feb 10, 2025
@mcdurdin mcdurdin changed the title bug(android): we should not handling key events when the active input type is InputType.NULL bug(android): we should not be handling key events when the active input type is InputType.NULL Feb 10, 2025
@mcdurdin mcdurdin added this to the B18S2 milestone Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants