Jack
June 4, 2023, 5:06am
1
Hi all,
a mindmapping app that I use, Freeplane, and that has been working fine for months before this update, is now suddenly playing up when using the control key - it looks like it is not registering the key stroke, at the same time when I save and exit and then reload the mindmap, some things did get changed in some random way.
I am referring to the keyboard of the X230 here.
Any ideas?
Jack
Sounds like the layout switching issue:
opened 12:28PM - 26 May 23 UTC
T: bug
C: desktop-linux
P: default
needs diagnosis
### Qubes OS release
4.1.2 (R4.1)
### Brief summary
Keyboard switch… ing pollutes `setxbmap` options, eventually messing up the key mappings.
### Steps to reproduce
1. 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
```
2. 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
```
3. 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
```
4. 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
1. First, `options` get more and more polluted after each layout switch.
2. 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`
3. 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