Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using xmodmap (and sometimes xkbcomp instead) to adjust my keyboard layout (e.g. mapping Caps Lock to the Mod3 modifier).

When I plug a USB keyboard into my laptop or insert a YubiKey (which acts like a keyboard), the settings for my laptop keyboard are immediately lost, leaving me in situations where Mod3 stops working and I cannot use my window manager any more.

How can I make my xmodmap/xkbcomp settings persistent or at least persistent per X session for my internal keyboard, so that it keeps the layout, no matter if I attach other keybaords?

share|improve this question

1 Answer 1

It looks like it is not X, but gnome-settings-daemon that resets my layouts when I attach a new keyboard.

This helped: udev rule to auto load keyboard layout when usb keyboard plugged in

dconf write /org/gnome/settings-daemon/plugins/keyboard/active false

to disable it from doing that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.