When I press my left Super key the gnome shell appears and when I press the right Super key it does not. Moreover pressing right Super + T does open a terminal at once, but when using left super I have to press the T twice, when I press the T only once it is similar to just pressing the T without holding Super left. This last point also occurs with other shortcuts that I defined (like Super+L, Super+E), but not with Super+Up/Down/Left/Right.
What I want is to press either Super key to get the gnome shell and to use either Super key in combination with T to open a terminal immediately (and similar with other shortcuts). I use Ubuntu 12.04 LTS and the gnome 3 shell.
Best Answer
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
This should print the current modifier map which should like something like this
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
Now if anything goes wrong you can simply type
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
were of course you should change the 0x85 by the key code you have from your modifier map. This should give you
( 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
Checking if it works
If you now do
you should see
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 runningwhich should give
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
to store your custom key mapping in the file
~/.xmodmaprc
. Runto make sure the custom key map is executed when your window manager loads.