fix(linux): Ignore keys with IBUS_MOD4_MASK set#10668
Conversation
If we process keys that have the (Super/Meta/Windows) IBUS_MOD4_MASK modifier set we ignore the key. Core doesn't handle the Meta modifier state and so would treat it as regular key. This fixes switching keyboards in Ubuntu 23.10/24.04 on Wayland. Fixes #10476.
User Test ResultsTest specification and instructions
Test Artifacts |
|
@mcdurdin I'm not sure if it would be better to ignore the Meta modifier in Keyman Core? Then the engines don't need to know what Core supports. |
(edit: My bad, I looked at the wrong bitmap) We don't currently have a Meta modifier in the modifier bitmap. It's there as a reserved value, but commented out. Given we don't have any plans to support Meta as a modifier for keyboards, Core doesn't need to support it. Keyman Engine for Windows ignores Windows, Keyman Engine for macOS ignores Command, so Keyman Engine for Linux should ignore the Meta key. |
| // REVIEW: Do we need to do something about IBUS_MOD2_MASK (NumLock)? I guess | ||
| // if a keyboard would have rules for the numeric keypad we might need | ||
| // it. At the moment however we let Core process the keypress and since | ||
| // it doesn't have rules for the numeric keypad keys we eventually | ||
| // forward the key to ibus (in process_emit_keystroke_action) and let | ||
| // Gnome deal with it. |
There was a problem hiding this comment.
We do have a flag for numlock - but it is currently commented out. In theory Keyman .kmn keyboards support rules with NUMLOCK modifiers, but this is not recommended and has never really been tested.
Test Results
|
|
Changes in this pull request will be available for download in Keyman version 17.0.263-alpha |
If we process keys that have the (Super/Meta/Windows) IBUS_MOD4_MASK modifier set we ignore the key. Core doesn't handle the Meta modifier state and so would treat it as regular key. This fixes switching keyboards in Ubuntu 23.10/24.04 on Wayland.
Fixes #10476.
User Testing
This should be tested on Ubuntu 23.10 or 24.04 with Wayland with at least one Keyman keyboard installed.
TEST_SWITCH_KBD: