I have used xkb to remap the right windows key (RWIN) to Hyper_R because I want to use it with AutoKey for some special shortcuts. I did it by editing
/usr/share/X11/xkb/symbols/pc
modifying the RWIN line:
key <RWIN> { [ Hyper_R ] };
(Here's the answer that guided me)
From what I can tell, this works and the right Windows key now fires Hyper_R. However, It seems that in Ubuntu (Xubuntu to be exact), Hyper and Super somehow are doing the same thing. So Super + e launches the editor, and so does Hyper + e.
I'm not sure why this is or where I can change this behavior. I want Hyper and Super to be different modifiers.
For some reason Ubuntu currently assigns both Super and Hyper to Mod4. You can see this in /usr/share/X11/xkb/symbols/pc:
I was able to change this to put super and hyper on separate modifiers without needing to be root or modify any system files. I'm not sure if this is the best way as I am definitely not an xkb expert, but it's a way that has been reliable for me.
First, create a local symbols file. I have mine in ${HOME}/.config/xkb/symbols/local. This assigns Super to Mod3 and Hyper to Mod4.
Then recompile the existing map to add a "local":
Put this in a script to be run when you log in. You can run it as an ordinary user.
With
xmodmap
you can change this behavior with 2 commands: