Qubes OS release
4.1.2 (R4.1)
Brief summary
Keyboard switching pollutes setxbmap options, eventually messing up the key mappings.
Steps to reproduce
- Configure multiple keyboard layouts in dom0, e.g., I use the following settings in
/etc/X11/xorg.conf.d/00-keyboard.conf:
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru"
Option "XkbVariant" "altgr-intl,winkeys"
Option "XkbOptions" "nodeadkeys,grp:alt_shift_toggle"
EndSection
- Start any VM. The state of
setxkbmap -print -query is:
user@disp1372:~$ setxkbmap -print -query
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)+group(alt_shift_toggle)" };
xkb_geometry { include "pc(pc105)" };
};
rules: evdev
model: pc105
layout: us
options: nodeadkeys,,grp:alt_shift_toggle
- Switch keyboard layout with Alt+Shift:
user@disp1372:~$ setxkbmap -print -query
....
rules: evdev
model: pc105
layout: ru,us
variant: ,
options: nodeadkeys,,grp:alt_shift_toggle,nodeadkeys,,grp:alt_shift_toggle,nodeadkeys,,grp:alt_shift_toggle
- Switch a couple of times more:
user@disp1372:~$ setxkbmap -print -query
...
rules: evdev
model: pc105
layout: us
options: nodeadkeys,,grp:alt_shift_toggle,nodeadkeys,,grp:alt_shift_toggle,nodeadkeys,,grp:alt_shift_toggle,nodeadkeys,,grp:alt_shift_toggle,nodeadkeys,,grp:alt_shift_toggle
Expected behavior
Normal layout switching.
Actual behavior
- First,
options get more and more polluted after each layout switch.
- Second, after many layout switches, the keycode mapping breaks (perhaps some overflow of options?): the arrow buttons, delete button, and some others get remapped to something random. For example, according to
xev, the key Up turns into Print: keycode 111 (keysym 0xff61, Print), same_screen YES
- Fixing the layout with
xmodmap -e "keycode 111 = Up" fixes the mapping until the next Alt+Shift, then it is messed up again. Resetting the options with setxkbmap -option doesn't help.
It seems that there is some competition between dom0 and the vm itself for handling the keycodes
Qubes OS release
4.1.2 (R4.1)
Brief summary
Keyboard switching pollutes
setxbmapoptions, eventually messing up the key mappings.Steps to reproduce
/etc/X11/xorg.conf.d/00-keyboard.conf:setxkbmap -print -queryis:Expected behavior
Normal layout switching.
Actual behavior
optionsget more and more polluted after each layout switch.xev, the keyUpturns intoPrint:keycode 111 (keysym 0xff61, Print), same_screen YESxmodmap -e "keycode 111 = Up"fixes the mapping until the nextAlt+Shift, then it is messed up again. Resetting the options withsetxkbmap -optiondoesn't help.It seems that there is some competition between dom0 and the vm itself for handling the keycodes