-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Enable Gboard CJK keyboards #620
Conversation
Incorrect text UTF8 text sometimes sent to X clients. Not a bug of this commit, instead there are likely some problems in |
Cannot reproduce the aforementioned bug after re-run Only for record: as far as I can tell, there may be bug in XCB receiver side. Log by |
Sorry for confusion. I will stop editing here and look for @twaik your comments on this "Workaround to enable CJK Gboard" option. More testing are done as below.
This workaround is by no mean elegant but probably the only existing workaround siince being last discussed in 2021 termux/termux-app#1539. Bit more context of the problem and welcome smarter workaround: the Grateful for merging given importance to Gboard CJK users. I don't mind putting it onto an "Experimental" section of perefernces.xml. Thanks. |
Not related.
There is no "XCB receiver" in termux-x11. There is some custom light weight protocol to avoid XCB dependency (which adds 1MB+ for every architecture variant and 4.5MB to universal build).
Termux:X11 sends characters the same way tigervnc-server and x11vnc do. It maps characters to keycodes with no associated keysyms ( termux-x11/app/src/main/cpp/lorie/InputXKB.c Lines 52 to 54 in 6fbd332
I did not find better way to implement this, x11vnc way is the best option I found. |
Thanks. Since the bug is really not a problem of this PR and neither Gboard, I opened #625 for test result and further discussion. Back to this PR, I tested together with #617 (which makes available the 3-finger swipe up gesture to activate soft keyboard in DeX mode) and commit another workaround for DeX mode in which Any adjustment to this PR you would like me to do before merging? |
any chance this would be merged? working perfectly for me with xfce4 for this branch with traditional chinese gboard |
twaik may have his/her own consideration. After months of use, apart from the requirement of "Android 14 + Gboard 14" and the input character issue (which is unrelated to Gboard), there are found to be three issues but I haven't had time to look into and solve:
Still, I always think that it would be better to have option than none. I rather to write in the option description to tell user that there is buggy behaviour and may lock your Alt key. |
Currently I am working on some other changes, I'll review it again a bit later. Also both this and #617 must be rebased (and the latter one has unresolved reviews). |
Rebased. The |
Indeed, for those Gboard users who turn off suggestion and autocompletion for their English keyboard (and vaguely other letter-based IMEs), the lang subtype detection ( However, I am not that kind of no-suggestion & no-autocompletion user. I am just saying it and see if you may want to extend an option for those users to force Thanks for your time and consideration. |
Pay attention to the review please. |
Probably it can be fixed bytusing IBus methods. AFAIK it can let us send unicode symbols without mapping them to keys and avoid this weird behaviour. |
It seems to require ibus to be on the deps of Another info: previous test results in #625 show that the implementation |
It is pretty much weird, because I compared termux-x11's implementation with the original one and did not find any differences except function names, dropped upper-lower feature in lorieAddKeysym (because most likely there will be no difference), pressKey replaced by QueueKeyboardEvents, some logging stuff changed, dropped Shift+Alt mapping to META stuff. But generally they are equal. |
No expertise, perhaps about the frontend side (RealVNC) (??). But I think clues can be found in the
There may be more difference but I haven't probed into. |
MappingEvent is event telling programs to associate some keycode (one in this case) to specific unicode symbol. |
Nonetheless, seems that no |
Main entry point for unicode input is |
Relates to #115 and #147.Add a preference option "Workaround to enable CJK Gboard".
InputMethodManager#getCurrentInputMethodInfo()
is not available until recent API level (34).