Trying to switch to an apple keyboard on Ubuntu 12.04 brings up a number of issues. There's lots of old information out there on google, I'm going to post this as the current solution.

apple keyboard

1) On a regular keyboard, you're used to having alt next to the spacebar, and the silly Windows, "Command ⌘", or "Super" key sits unused between ctrl and alt. But apple puts their ⌘ key right next to the spacebar making the alt key you use all the time harder to thumb. Trying to fix that with xmodmap and .xinitrc has no effect outside of terminal applications.

2) alt-f2 to run commands doesn't work anymore? That was actually broken until 12.02, but should be fixed now. That stumps you until you realize:

3) that the f* keys across the top by default now do nifty/useless things like changing the volume of the music. There's a "fn" key where the useless "insert" key used to be that you have to hold to get them to do their normal behavior.

4) The naive approach of using Settings / Keyboard / Shortcuts / System has the "Show the run command prompt" Disabled and italicized, and you are unable to enable it

run command disabled

5) Some instructions on the web tell you to use ccsm, the "CompizConfigSettingsManager" under "Gnome Compatibility" and enable the "Run Dialog" but it stubbornly stays disabled:

ccsm run dialog

6) The "PrintScr" key at F13 doesn't do anything, with or without the "fn" key.


The answer is surprisingly simple.

1) Under Settings / Keyboard / Layout Settings / Options you can swap around the alt/⌘ keys to your liking. I'm trying this option, which swaps Alt and ⌘ just on the left side of the keyboard. But the other option "Control is mapped to Alt keys, Alt is mapped to Win keys" also works, while removing the stupid "⌘" key entirely.

enter image description here

2) The alt-f2 key was already there, just hidden behind needing to hold down "fn". You can change that behavior to what you really want by

$ echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode

and to make that permanent

$ echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
$ sudo update-initramfs -u -k all

3) You can set up the "PrintScr" stuff yourself in this settings dialog. Use the f13 key and the settings will change it from "Print" to "Tools". Here's a picture of half of the settings having been changed.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.