Ubuntu – Change behavior of Control key on Ubuntu with Mac keyboard

keyboardmacUbuntu

On Ubuntu 10.10, is there any way to change the keyboard layout to where the Command key acts like the Control key?

And, if hardware makes any difference, I am on a 13" Aluminum Late '08 MacBook.

Best Answer

Keep in mind that the Command key is the same as the Windows key (or Super) in Bootcamp/whatever.

  1. Back up. Santa will thank you.
  2. Read this guide and this guide if you want to get a basic idea of what I'm doing in step 3.
  3. Add these two commands to your startup (System->Administration->Startup Applications):

    xmodmap -e 'keycode 133=Control_L'
    xmodmap -e 'keycode 37=Super_L'
    

    That'll take care of the left side, swapping the Command and Control key functions.

  4. Add these two commands to your startup too for the right command and control.

    xmodmap -e 'keycode 134=Control_R'
    xmodmap -e 'keycode 109=Super_R'
    

It'll only work as soon as you log in though.

Related Question