keyman
keyman copied to clipboard
bug(web): modifier keys on OSK don't track correctly with Firefox on Linux
Using Firefox on Ubuntu 22.04 and the Khmer Angkor (https://keymanweb.com/?version=17.0.228#km,Keyboard_khmer_angkor) keyboard:
Holding any of the modifier keys (Shift, Ctrl, Alt) on a hardware keyboard doesn't show the resulting layer. Only after releasing the key the new layer is shown. There's no way to get back to the default layer except clicking on the OSK.
Once the Shift/...-layer is shown, pressing and holding the Shift... key will show the default layer while the key is pressed.
This doesn't happen with Firefox on Win10, nor with Chrome on Linux and Win10.
Expected behaviour:
- By default, the desktop OSK matches the hardware keyboard state -- if the user is holding one or more modifier keys on the hardware keyboard, then the OSK will show the resulting state.
- When the user releases any hardware modifier key, then that modifier state is removed from the OSK immediately.
- If the user clicks on one or more modifier keys on the OSK, then the OSK moves to the resulting state and remains there, until any modifier key is clicked again -- or the corresponding modifier key on the hardware keyboard is touched.
See https://keymanweb.com/?version=12.0.106#hy,Keyboard_basic_kbdarmw for working example.
This is close to the Keyman for Windows OSK behaviour, but not identical. (The difference: On Keyman for Windows, you can see that a clicked modifier on the OSK is only released if that specific modifier is clicked again, or the corresponding hardware modifier key is touched, unlike KMW where any modifier key touch on the hardware keyboard resets it.)
See #10224