This is an old topic but it comes closer than any of the others I've seen to addressing my issue.
That issue is, I can't find a good thorough explanation of how xmodmap is used to change modifier keys. I've looked at the man file and I'm no stranger to Google but...
I'm using an Apple aluminum keyboard on a Dell running 9.10. It works fine, but I want to rearrange my modifier keys. I know that involves manipulating "mods" in xmodmap somehow -- that's what I can't find.
My keyboard's bottom row, from left to right:
control (keycode 37)
option/alt (keycode 64)
command (keycode 133)
command (keycode 134)
option/alt (keycode 108)
I've set nothing in keyboard preferences, but have used an .xmodmap file to change my two command keys to Alt_L and Alt_R, and the two option/alt keys to Meta_R and Meta_L.
Now xev shows that the proper keys are producing the proper keycodes, my remapping is working, but the effects aren't what I wanted. All keyboard shortcuts that are listed as using Alt+something still use the actual option/alt key, rather than command, which is what I wanted.
For instance, Alt+F10 toggles maximization; if I click that shortcut and type in command+F10 instead, what's recorded is Alt+Mod4+F10, and I need to press BOTH the option/alt and command keys plus F10 to get the action. Presumably this is why there are "remove" statements in people's xmodmap files, but I don't know how to use them.
tl;dr I'd like the machine to think I'm pressing alt when I press command, and think I'm pressing (what is that usually, the win key?) when I press option/alt. I'm good on control.
Any pointers very much appreciated! Here, for the heck of it, is the output of xmodmap -pm:
shift Shift_L (0x32), Shift_R (0x3e)
control Control_L (0x25), Control_L (0x42), Control_R (0x69)
mod1 Super_L (0x40), Super_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod4 Alt_L (0x85), Alt_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)