keymapperorg/KeyMapper

Single-character non-ASCII TEXT_BLOCK input crashes the service.

Closed this issue · 4 comments

Developer TODO (don't remove)

  • write tests. put issue number in comment
  • update documentation

Discord message link/email recipient

Describe the bug
Single-character non-ASCII TEXT_BLOCK input crashes the service.

To Reproduce
Steps to reproduce the behavior: On Android 14 (with that new-fangled proxy thing) use TEXT_BLOCK with a single non-ASCII character.
mappings_generated.json. Two characters work fine because they take a different code path.

Expected behavior
Single character is inputted fine.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Samsung S10e
  • Android version: Android 14 (LineageOS)
  • Also observed on Samsung Tab S8 Ultra / Stock Android 14

Additional context
IMO, when keyCharacterMap.getEvents(chars) in inputTextRelayService returns null, there should be a fallback.

Such crashes were never a problem on a Samsung Fold 2 / Android 13.

Can you try this apk?
keymapper-2.6.3-debug.apk.zip

Yes, with that build no longer crashes and outputs cz/ru just fine. Thank you!

great! Will mark as fixed