Xmodmap remapping modifiers not working?
I'm not an expert myself, but I'll give it a try. First of all, let us make an xmodmap
script at ~/.Xmodmap
. I understand you want the right alt to function as a super key. I suggest this:
clear mod1
clear mod4
!Make right alt to look like Super_R
!I'm assuming your right alt has keycode 108, you can check using xev
keycode 108 = Super_R NoSymbol Super_R
!Add the Super_L and Super_R keys to the modifier mod4
add mod4 = Super_L Super_R
Your other alt key and super keys may now be messed up, but you can assign them to anything you want analogously. (If you don't want to change them at all, use xev
to see what they did originally and assign them to that.) Just put all clear
s together first, then the assignings of keycodes to key names, then finally the assignings of key names to modifiers, and I think it should work.
Normally, ~/.Xmodmap
should be executed automatically on login, but if not, you can try adding a line
xmodmap ~/.Xmodmap
or
sleep 4 && xmodmap ~/.Xmodmap &
to ~/.bash_profile
.