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

Composing range breaks key input on Android #143

Open
LucasAschenbach opened this issue Nov 13, 2022 · 2 comments
Open

Composing range breaks key input on Android #143

LucasAschenbach opened this issue Nov 13, 2022 · 2 comments
Assignees

Comments

@LucasAschenbach
Copy link
Contributor

The TextInputClient behaves differently with respect to how it sets the composing range on different platforms. Unlike other platforms, Android always sets the composing range around the entire current word. Since CustomTextInput won't send key input events to the terminal backend unless the composing range is collapsed, this prevents sending modifier key combinations, autocompletion, etc. on Android.

I'm not really sure how to approach this since respecting the composing range is needed for supporting CJK. Perhaps there is an API for checking whether the keyboard is composing CJK.

@xtyxtyx xtyxtyx self-assigned this Nov 13, 2022
@LucasAschenbach
Copy link
Contributor Author

I just tested the text input with a Chinese keyboard on Android and it worked fine without the composing range. Apparently, Android has a separate composing buffer for Chinese keyboards (iOS doesn't, and I would imagine as do some other platforms). Ignoring the composing range on Android devices would solve the problem. However, it's not a very nice solution IMO.

@LucasAschenbach
Copy link
Contributor Author

LucasAschenbach commented Nov 13, 2022

For anyone encountering this issue: Setting the obscureText property in the TextInputConfiguration to true should serve as an easy temporary fix. However, this fix merely disables text composition and therefore loses support for CJK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants