How do I swap the left Alt and the left Super ("windows") keys in Saucy Salamander? I just upgraded and I have noticed the keyboard layout dialog has changed, and I can no longer find the options window. I use this option because occasionally I use a Sun keyboard that has super next to space, which I'm not used to.
You can use the following commands in terminal to swap Left Alt with Left Super:
xmodmap -e "keycode 64 = Super_L NoSymbol Super_L" #this will make Alt_L to act as Super_L
xmodmap -e "keycode 133 = Alt_L Meta_L Alt_L Meta_L" #this will make Super_L to act as Alt_L
To get this change for every session, after you have run the previous commands create a file called .xmodmap
with the new keymaps, using the following command:
xmodmap -pke > .xmodmap
Then, create a file called .xinitrc
in your home directory, containing the following line/command:
xmodmap .xmodmap
-
Thank you for your answer! Unfortunately I don't find modifying the Xmodmap configuration every time I change keyboards (once or twice per day) very user friendly. – Joni Oct 23 '13 at 16:29
-
@Joni the change is permanent (for your user) if you create the
.xinitrc
file as he indicates – Braiam Oct 23 '13 at 16:33 -
@Braiam, depending on where I am I use the laptop keyboard or the Sun keyboard with the funny layout, which means having to swap or unswap the keys almost every time I start work. – Joni Oct 23 '13 at 17:11
-
I'm marking this answer as accepted because it's more general and may help future visitors better even if it's not the best solution in my particular case. – Joni Oct 24 '13 at 9:42
The layout options can be changed in gnome-tweak-tool, in the "Typing" section. The setting to configure "Alt/Win key behavior" is the last one in the list.
-
1While your answer is correct and straight to the point, this it can't be generalized to any two keys. – Radu Rădeanu Oct 23 '13 at 16:16
-
the "Typing" section doesn't appear to even be in the gnome-tweak-tool an ymore... – chrismarx Mar 13 '14 at 18:11
-
-
-
1