configure the keyboard for your macbook and ubuntu 12.04 (and 12.10)
I love the new Ubuntu 12.04 Precise Pangolin. Unity - and the graphics drivers - have finally reached a stability that satisfies me and let me keep GNU/Linux as solo operating systems on my Macbook Pro 6,2.
What drives me crazy is the default keyboard mapping, surely not thought for who owns an Apple computer.
First, the Unity Launcher (a.k.a. Dash) default shortcut is the
key (or Win key). This key corresponds to the
key on Apple keyboards. Under Mac OS X, the combination
opens Spotlight, while
are for Copy&Paste.; That is, the
key is a supercharged
I spent some time to search the best combinations to reproduce this behavior under Ubuntu. Here is what I managed to create:
I swapped the left
and the left/right
keys. That is,
After the first modification, it becomes unconvenient to open Dash with the
key. Therefore, I changed Unity Launcher key to
. This (sort of) emulates OS X behavior.
To implement the first tweak, create the file
with the following content:
remove control = Control_L remove mod4 = Super_L Super_R keysym Control_L = Super_L keysym Super_L = Control_L keysym Super_R = Control_L add control = Control_L Control_R add mod4 = Super_L Super_R
Logout and login again. Congratulations, you have the swapped keys. Ubuntu should already take care to load the file automatically.
It is important to not manually load the .Xmodmap file. It may result in a double application of the mappings, resulting in a re-swap of the keys.
To achieve the second tweak, install the package
. Open it using the
command, or search for it in Dash. Find
Ubuntu Unity Plugin->Behavior->Key to show the launcher
and change it to
, using the Grab key combination button. It may be also shown as
You can now have a behavior similar to Mac OS X in Ubuntu 12.04. You can change the virtual desktop using
. You can cut, copy, and paste using
. You can open the Unity launcher with
I hope that this little how-to can help frustrated Apple users who want to embrace GNU/Linux freedom.
I do not use a commenting system anymore, but I would be glad to read your feedback. Feel free to contact me.