4

I use an IBM Model M, so I don't actually have Win keys. In Windows, I've had right-alt set to act as the Win key, and I'd like to set that up on Ubuntu as well. I went to the Keyboard Layout Options http://i.imgur.com/KJOUD.png

and found an option for Left Alt is swapped with Left Win, but I didn't see one to do the same for the right.

Swapping the left just doesn't work for me--Alt+Tab is particularly difficult with only Right Alt acting as Alt. Am I just missing something, or is there no way to swap Right Alt and Right Win?

Jorge Castro
  • 73,717
Kerrick
  • 1,861

1 Answers1

2

I've answered the same question here: How do I swap Left Ctrl with Left Alt on my keyboard?

The short answer is to create a file called ~/.Xmodmap

It needs to contain the following xmodmap expressions to change the key mapping and reset the modifier mapping for both keys. The file needs to contain the following:

clear control
clear mod1
keycode 37 = Alt_L Meta_L
keycode 64 = Control_L
add control = Control_L Control_R
add mod1 = Alt_L Meta_L

Next time you login the new key mappings will be active. To have the changes take effect immediately run the following from terminal:

xmodmap ~/.Xmodmap
cossovich
  • 1,014