I'm not running Ubuntu anymore, but I can confirm that this is a problem in Debian Stretch (and was an issue in Debian Jessie). I see similar behavior for keyboard rates set via `xset r rate`. Plugging in the USB keyboard resets the keyboard settings. Suspending while a USB keyboard is plugged in also resets the keyboard settings, though suspending without a USB keyboard attached doesn't. I suspect that whatever logic executes on plugging in the keyboard is also run on resume.
For anyone looking for a workaround for mapping caps lock to escape, setting `XKBOPTIONS="caps:escape"` in `/etc/default/keyboard` (and rebooting) will do that reliably. That should work for anything that can be configured via `XKBOPTIONS`. As for the rate issue, I don't yet have a good workaround. I suspect a udev rule might do what I need, but that's also clearly a hack, so it would be nice to have a fix for this. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to xorg-server in Ubuntu. https://bugs.launchpad.net/bugs/287215 Title: xmodmap settings not getting honored when keyboard devices are hotplugged Status in xorg-server package in Ubuntu: Confirmed Bug description: Binary package hint: xserver-xorg-input-evdev I use xmodmap to map the caps lock key to the meta key with the following in my ~/.Xmodmap: ! ! - map capslock to meta key ! remove Lock = Caps_Lock add Mod3 = Caps_Lock This works correctly on Intrepid on my lenovo T61's built-in keyboard. When I plug in a USB keyboard, caps lock is not mapped to meta, though it still is mapped that way on the built-in keyboard. If I then re-run xmodmap on my .Xmodmap, caps lock on the USB keyboard gets mapped correctly; however, unplugging and re plugging in the USB keyboard results in its caps lock key being reset to the unmapped state. This worked correctly on hardy. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/287215/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp