XKB keyboard options are not applied to a new keyboard when plugged in
When I plug a USB keyboard into my laptop, it doesn't have the XKB options (listed with gsettings get org.gnome.desktop.input-sources xkb-options
) applied to it. Specifically, I have the caps:escape
option enabled, but on my USB keyboard caps lock doesn't act as an escape, even though it continues to do so on the built-in keyboard. Running setxkbmap -query
after plugging in the USB keyboard shows that the options aren't set.
If I run the following after plugging in the USB keyboard, then everything works again:
options="$(gsettings get org.gnome.desktop.input-sources xkb-options)"
gsettings reset org.gnome.desktop.input-sources xkb-options
gsettings set org.gnome.desktop.input-sources xkb-options "$options"
I currently have a workaround by using inputplug
to watch for new X input devices and run the above commands whenever a new keyboard appears, but I'd love to see this functionality built in.
I feel like this issue only appeared for me in the last week or two, but I'm not sure as I just recently moved to Gnome in the last month.
I'm running Pop!_OS 20.04 with version 3.36.1 of gnome-settings-daemon.