Do you already use right Alt?
You could map it to the Windows key in Gnome settings:
- System->Preferences->Keyboard
- Layouts
- Options...
- Alt/Win key behavior
- Left Alt is swapped with Left Win
Or you could map Caps Lock to the Windows key, and choose another shortcut for changing languages.
In the same control panel:
and then:
- Key(s) to change layout
- too many options to mention
Common choices include:
- Left Alt + Left Shift
- Left Ctrl + Left Shift
- Left Ctrl + Right Ctrl
but being an Emacs
user, I would suggest the Both Ctrl keys together
option.
If those options are insufficient, you will need to use xmodmap
.
You could map Right Control to Windows at the shell like this:
xmodmap -e 'remove control = Control_R'
xmodmap -e 'add Mod4 = Control_R'
Depending on your system, you can probably also put the equivalent settings in .Xmodmap
, e.g.
.Xmodmap
remove control = Control_R'
add Mod4 = Control_R'
If you'd rather use xmodmap
than the Gnome control panel, you can change Control_R
to something else, for instance right Alt is either Alt_R
or ISO_Level3_Shift
, depending on your keyboard settings, e.g.
xmodmap -e 'remove ISO_Level3_Shift = Mod5'
xmodmap -e 'add Mod4 = ISO_Level3_Shift'
works for me.