xmodmap solution
I think you can do this using xmodmap, a tool to modify keymaps. Since my keyboard does not have a right Super key I cannot confirm this solution, so please leave a comment if it doesn't work.
All steps are done in a terminal
Print the current modifier map
Run
xmodmap
This should print the current modifier map which should like something like this
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
The important line is the mod4
line, this line shows which key codes are mapped to the Super_L and Super_R key symbols.
Backup the key map
Before we change anything it is a good idea to backup the current key map, we can do this with
xmodmap -pke > ~/.xmodmap.orig
Now if anything goes wrong you can simply type
xmodmap ~/.xmodmap.orig
to restore your original key map. (If you made some serious mistakes and you cannot properly type anymore, a reboot also works)
Check current key map for the Super keys
Assuming that the Super keys have consecutive key codes (0x85 and 0x86 in this case) we can check the current mapping by running
xmodmap -pke | grep -wA1 $((0x85))
were of course you should change the 0x85 by the key code you have from your modifier map. This should give you
keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_R NoSymbol Super_R
( the $((0x85))
converts the hexadecimal number to decimal)
Copy the behavior of the left Super to the right Super
As you can see from the previous step the right Super key has key code 134 but we want it to have the behaviour of the left Super key which has keycode 133. We can do this by remapping the key using
xmodmap -e "keycode 134 = Super_L NoSymbol Super_L"
Checking if it works
If you now do
xmodmap -pke | grep -wA1 $((0x85))
you should see
keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_L NoSymbol Super_L
meaning that both keys now have the same behavior. Also the modifier map should have changed on the line with mod4
, we can check this by running
xmodmap | grep 'mod4'
which should give
mod4 Super_L (0x85), Super_L (0x86), Super_L (0xce), Hyper_L (0xcf)
And of course the shortcuts which you mentioned should work too!
Make mapping persistent
If it works, you can make sure that these settings are automatically applied when you boot. Run
echo 'keycode 134 = Super_L NoSymbol Super_L' >> ~/.xmodmaprc
to store your custom key mapping in the file ~/.xmodmaprc
. Run
echo 'xmodmap ~/.xmodmaprc' >> ~/.xsessionrc
to make sure the custom key map is executed when your window manager loads.
Best Answer
This is easy to fix. You need to get the Gnome Tweak Tool and navigate to the keyboard settings. On Cinnamon, you can do the same by opening Settings->keyboard->Layouts->Options. You should see something like this:
Open the "Alt/Win key behavior" and change it from "Default" to "Hyper is mapped to Win":
That should solve the issue.