I have the following contents in my ~/.Xmodmap file. It seems a couple times a day (without rebooting or logging out) I need to rerun the command "xmodmap ~/.Xmodmap" to reset my settings. The only thing I can think is that it seems to happen when I walk away from my computer for a bit. Maybe it forgets the settings when the computer locks itself?

remove control = Control_L
remove mod1 = Alt_L
keycode 64 = Control_L
keycode 37 = Alt_L
add control = Control_L
add mod1 = Alt_L

Anyone else seeing similar issues?


UPDATE: I did some more research and it turns out this was because I had my USB keyboard plugged into my monitor's USB port. Simply plugging my keyboard into the back of computer fixed it. I guess when the monitor turns back on Ubuntu sees it as a new keyboard and doesn't feel the need to re-apply the .Xmodmap settings.


I'm seeing the same thing. It's driving me nuts. If anybody can figure out why this is happening, please let us know!

Update: I found this thread: http://ubuntuforums.org/showthread.php?p=8419110

It seems there's an interaction between xkb and xmodmap that's making the xmodmap settings get lost. I don't know anything about xkb, but it seems that that is the thing we're supposed to do now.

  • I solved this issue on my end. Hopefully the same applies to your problem. If your keyboard is plugged into the monitor, switch it out to the PC. – PKKid May 4 '12 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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