KeyboardEvent.key, KeyboardEvent.which
Input:
Output:
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Steps to reproduce the problem:
$ cat .xinitrc setxkbmap dvorak,ru -option grp:caps_toggle xmodmap .Xmodmap $ cat .Xmodmap clear control clear mod1 keycode 37 = Alt_L Meta_L keycode 105 = Alt_R Meta_R keycode 64 = Control_L keycode 108 = Control_R add control = Control_L Control_R add mod1 = Alt_L Meta_L
$ setxkbmap us
What is the expected behavior?
KeyboardEvent.key
and KeyboardEvent.which
should match my input.
What went wrong?
I type QWERTY but key
and which
shows Dvorak values. I press Ctrl, it displays Alt, but setxkbmap
resets xmodmap
.
Other browsers tested:
Firefox 83.0: OK