So, I decide to do a system upgrade (including all xorg packages) the other day and suddenly xmodmap isn’t working any more. Specifically, these lines in my .xinitrc no longer do the job (of making Caps lock my mod3 key (for use in Xmonad)):
xmodmap -e "remove Lock = Caps_Lock" xmodmap -e "add mod3 = Caps_Lock"
So after tons of googling, I found this page: http://forums.gentoo.org/viewtopic-t-857625.html.
Basically, to get the same behavior back, I have to have
remove Lock = Caps_Lock remove mod3 = Super_L keysym Caps_Lock = Super_L add mod3 = Super_L
in my (new) ~/.xmodmap file, and then do this in my ~/.xinitrc:
xmodmap -e "remove Lock = Caps_Lock" xmodmap -e "add mod3 = Caps_Lock" xmodmap ~/.xmodmap
This is a very, very ugly hack, but even after spending a solid hour trying manual xmodmap commands and this and that and all sorts of combinations, this is the only method that works.
I have no idea which package exactly broke xmodmap’s former 2-liner functionality, but it was sometime in the past couple months, probably. If the old 2-liner starts working again, I’ll let you all know…