-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Hello,
When you press shift on for instance the GBoard virtual keyboard, it inserts a semicolon.
Looking at CNFGEGLDriver.c, it's because:
- Semicolon has
code74 andunicode59. - Shift has
code59 andunicode0.
In both cases HandleKey receives 59.
Another conflict I found is with 'C' and backspace. Hacker Keyboard shows there's technically more, but they aren't used on Android (e.g. home/end, pgup/pgdn, alt + key, ctrl + key, num lock, scroll lock).
Defining ANDROID_USE_SCANCODES loses the information in event and gets too messy with having to maintain the state of the keyboard yourself. For instance Hacker Keyboard has Caps Lock if you press shift twice (so the graphics are all Caps), but GBoard does not.
I'd like to propose that handle_input() did
if (!AKeyEvent_getAction(event))
HandleKey(code, unicode);
Because it looks like bDown isn't useful at all with a virtual keyboard. It always sends a two events with a 0 and then a 1 for bDown.
Or that handle_input() added exceptions for these conflicts (at least for shift and backspace).