Comment 27 for bug 287215

Revision history for this message
Thomas Albright (thomas-albright) wrote :

After many hours, I found a workaround for this problem.

The first workaround I tried was adding a rule to /etc/udev/rules.d/ to run xmodmap automatically when the keyboard is plugged in. This works, but not on a consistent basis. It seems to depend on the timing of when the keyboard is actually registered by the system. Sometimes, xmodmap is run before the keyboard is actually registered, so the changes are not effective.

Here is the workaround: Instead of using xmodmap, use xkb. I believe xkb is being run when the USB keyboard is plugged in, and running xkb erases the xmodmap settings. So rather than fight it trying to use xmodmap, just use xkb. It was a little tricky to figure it out, but it only took an hour. My key settings now stay consistent when I plug in a USB keyboard.