Server: Windows 10
Client: Arch Linux
2.1.0
I think this happens because the XTEST extension is used to deliver the keystrokes, and it has its own virtual keyboard. You can see this if you run xinput list
:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Broadcom Corp. Bluetooth USB Host Controller id=11 [slave pointer (2)]
⎜ ↳ bcm5974 id=13 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Broadcom Corp. Bluetooth USB Host Controller id=10 [slave keyboard (3)]
This can be fixed using setxkbmap -device N
where N
is the device number from this list.
I have solved this issue for now by putting the following in my .xinitrc
:
setxkbmap -device `xinput list | grep "Virtual core XTEST keyboard" | sed -e 's/.\+=\([0-9]\+\).\+/\1/'` us colemak
This sets it to layout us, variant colemak. You can work out the correct values for your system, along with any -option
settings, by issuing setxkbmap -query
.
Really curious: if I use your method with us
layout, i.e. with
setxkbmap -device `xinput list | grep "Virtual core XTEST keyboard" | sed -e 's/.\+=\([0-9]\+\).\+/\1/'` us
I get correct it
layout (except for accented letters, but it is not a problem).
If I set it
layout, it is completely wrong.
Anyway thank you very much for this workaround!
Now it works with it
too, after a reboot...
that is awesome!, a couple of years ago I looking for this solution with no luck. Thanks a lot!
Most helpful comment
I think this happens because the XTEST extension is used to deliver the keystrokes, and it has its own virtual keyboard. You can see this if you run
xinput list
:This can be fixed using
setxkbmap -device N
whereN
is the device number from this list.I have solved this issue for now by putting the following in my
.xinitrc
:This sets it to layout us, variant colemak. You can work out the correct values for your system, along with any
-option
settings, by issuingsetxkbmap -query
.