Although there are lots of different articles how to change the left Alt to simulate win , I want to map the right Alt to do so. I want to move to 11.10, I fall back to unity 2d and dont have a win key. I kennot even get the keycode in the articles I found…
Any help or good suggestions?
Ubuntu – How to set right Alt to work as a Win(Super) key
shortcut-keys
Best Answer
You can use xmodmap to remap any key on the keyboard; in particular, you can remap the right Alt to act as a Super/Win key.
Create a file named
.Xmodmap
in your home directory with the following content:When you log out and then log in again, GNOME should ask you if you want to load the
.Xmodmap
file; answer "yes" and you're ready to go. (You will only asked once.)Alternatively, you can load the
.Xmodmap
configuration from a terminal at any time:There are a few things that can vary depending on the X server version and keyboard model. The following items could help you adapt the
.Xmodmap
file to your specific environment.Check that your right Alt key is initially on mod1: Issue the command
xmodmap
in a terminal window, and you should get an output like this one:If the
Alt_R
tag does not appear in the mod1 line but on a different one, adjust your.Xmodmap
accordingly.Check that your right Alt key is keycode 108: in a terminal window, type the command xev, then focus the small square window that popped up. If you type the right Alt key there, you should see lines appearing in the terminal window. Look for a stanza like this one:
The number after the
keycode
word is the one you want in your.Xmodmap
file for remapping right Alt.