Since upgrading to 11.10, xmodmap
seems to be working nowhere near as well. I would like to be able to run xmodmap
after unlocking a locked screen, as it doesn't work. I have to run it from a terminal (twice). I don't want Caps_Lock or Menu keys after I log in.
Preferably, I would like xmodmap
to go back to being useable. It doesn't run automatically at startup anymore like it used to. I have a script at startup that has to run it several times before it actually does things. Here is my .xmodmaprc
file; hopefully somebody will be able to find something wrong:
clear mod1
clear mod3
clear mod4
clear lock
keycode 66 = Hyper_L
remove lock = Hyper_L
add mod3 = Hyper_L
keycode 133 = Alt_L
add mod1 = Alt_L
keycode 64 = Super_L
add mod4 = Super_L
keycode 135 = Super_R
add mod4 = Super_R
keycode 118 = Multi_key
Meanwhile, if fixing this file doesn't fix the problems I'm having, I would like to know how to run xmodmap
after resuming from suspend or unlocking from a locked screen.
I am also having this problem on 11.04. This was not always the case -- it just started happening to me some day, so my best guess is that it was due to some sort of software update.
Nevertheless, it is extremely irritating. I found this thread, which suggests that you can add a script
/etc/acpi/resume.d/50-xmodmap.sh
that runs on wakeup to invokexmodmap
.Though someone else suggested that this bug may not get fixed and that you may be forced to use the GUI. Because my desired remapping is pretty simple (I just want to remap Caps Lock to Control), that's what I did. This was actually tricky to find, as I had to:
Admittedly, if you're a long-time
.Xmodmap
user, this is pretty annoying, but it's better than runningxmodmap
manually every time you log in.You need to change the name of your xmodmap file to ~/.Xmodmap
That's the name of the file which Ubuntu looks for which gets processed by xmodmap each time you start an X session.
It seems xmodmap support is being phased out:
(from Bug #289781 on xserver-xorg-input-evdev)
The graphical configuration Tweak tool might offer the settings you need. You can install it with
apt-get install gnome-tweak-tool
and use the tab Typing to configure some common keyboard tweaks. (The same settings used to be in the standard System Settings before Ubuntu 12.10).