Lately, i’ve been working a lot on my ubuntu machine at work. For several reasons, i’ve wanted to swap the ctrl and alt keys:

  1. I’m used to the OSX command key being right there where your thumb rests on the keyboard.
  2. The pinky+index finger combination of ctrl+t or ctrl+v hurted my wrist

since i’m a heavy shortcut/keyboard user, the default ubuntu setup wasn’t working very well for me.

I found the solution here. Create a file in your home dir: ~/.Xmodmap and put this in it:

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

It swaps the ctrl and alt keys, and makes your wrists and thumbs happy. There’s only one downside though. The ‘switch application’ key combination of ctrl+tab now becomes a little less handy… But that can be fixed too (keyboard settings > shortcuts).

Regards
Toon