Sometimes, an entire AppVM switches back to qwerty. If I restart the AppVM, I get my layout back.
I may have found a pattern: I think it happens after I accidently touch my yubikey. I am supposed to touch it to confirm a gpg private key request, but, if I do it when there is no specific request, it behaves like a keyboard and sends a lot of random characters.
I have read on Yubiko website that yubikeys are recognized as keyboards by the system.
Pressing both shifts keys are not enough to switch back to my layout.
Any idea what is happening exactly in this situation, and how to prevent it from happening?
Thank you for your help!
I get dozens of keycodes and characters, with many repetitions. The beginning of the sequence is always the same.
I have many existing keycodess (46 for Delete, 20 for caps lock, 18 for Alt…) and many unaffected (47, 22, 32…).
I am not sure what combination could trigger my issue.
I imagine that it is not an accidently result of X11 Options: grp:shifts_toggle…
Indeed. Trying to switch the layout with both shifts (in my case) inside the VM is uneffective. But switching it twice in dom0 works for all the system, even for the VM. Thanks!
(It switches to azerty, then back to bépo. But I don’t know why, since bépo is the only keymap I have defined with localectl…)
EDIT: after doing that (the double layout switch in dom0), I was able to switch between bépo and qwerty in my VM, even after pressing my yubikey. And I noticed that, in another VM, it was between bépo and… azerty. It is just so strange
That is an interesting guess and it would explain what happens.
But, because the Yubikey USB device is linked to a VM, I guess I should read: “are passed to the VM”?
Can you think of a configuration where it would ignore the Yubikey layout change? (Is it safe to assume that, when I use the Yubikey with gpg, the Yubikey does not need any specific layout? After all, the layout change occurs only when I use my Yubikey outside of a gpg request.)
The key is a USB keyboard, and keyboards are controlled by this policy /etc/qubes-rpc/policy/qubes.InputKeyboard. I think the default is you allow dom0 to be able to use keyboards, which I’m guessing is why the key changes the dom0 settings.
If the policy has a rule that says sys-usb dom0 allow I think you can remove that line, but it will break your system if you are using a USB keyboard.
The key does not change dom0, it only changes the VM I am using when I press the Yubikey.
I am using a USB keyboard, so I cannot disable all USB keyboards…
My normal layout is dvorak and I had this issue with a yubikey switching my entire VM to qwerty . Here’s how I fixed this problem. In /etc/X11/xorg.conf.d/50-yubikey.conf I made X treat the yubikey keyboard as dvorak