Slim Aluminum Apple Keyboard under Ubuntu

Slim Apple Aluminum Keyboard

Initially there were a couple of quirks about the Apple keyboard under Ubuntu. I’ve only used this under Interpid and Jaunty. I believe that there are some basic issues with this keyboard in Hardy due to the version of the kernel it’s running.

Let’s begin. Firstly the keyboard function keys only worked when the Fn key is pressed. Ideally I’d rather press the Fn key to access the extra function like Brightness, Volume, etc. The solution is really simple. Add the following line to /etc/rc.local above the line which says “exit 0″.

Lucid/Maverick:

echo 2 > /sys/module/hid_apple/parameters/fnmode

Reboot to take effect.

The second problem was a little more confusing. Basically the Apple keyboard doesn’t appear have a # key!

Hint: It does, it’s just not printed on the key.

I initially installed Ubuntu with the United Kingdom keyboard. So the following are the steps I followed to allow me to overcome this issue …

  1. Select System > Preferences > Keyboard
  2. Go to the Layouts tab
  3. Click Add
  4. Under the By country tab I chose Country: United Kingdom and Variant: United Kingdom Macintosh
  5. Click Layout Options…
  6. Under Miscellaneous compatibility options, select both Default numeric keypad keys and Numeric keypad keys work as with Mac
  7. I then removed the old United Kingdom keyboard layout.

Now with the new United Kingdom Macintosh layout enabled you can get a # symbol by pressing Right-Alt + 3. You can now also get the € symbol by pressing Right-Alt + 2

That’s it for GNOME users, XFCE users must ensure that the keyboard layout is set to United Kingdom Macintosh instead of Use system defaults.

Please replace “United Kingdom” with your preferred country.

Further information is available at https://help.ubuntu.com/community/AppleKeyboard.

8 thoughts on “Slim Aluminum Apple Keyboard under Ubuntu”

  1. it seems that much of this discussion regards function keys and other special keys, but what about the more ordinary keys that are placed differently on a PC and an Apple keyboard? Examples are @, , $, ½, §, {, }, [, ] ….
    My Linux computer correctly recognizes my Apple Aluminum keyboard and also that it is Danish. Alas, then it forgets everything and gives me a PC-keyboard. Not so clever. Can I remap these characters to the keys where they belong on the Apple keyboard?

    thanks,
    peter

  2. Even better than putting it in rc.local, which is run at every boot, one can use a udev event trigger which is run every time that specific keyboard is plugged in (covering for instance the case in which the computer is booted first and the keyboard attached later).

  3. echo 2 > /sys/module/hid_apple/parameters/fnmode <— doing that will replace what's inside the file with a 2. It's easier to just edit(vi/nano) the file and add the 2 manually instead of doing echo. 😉

    1. Replacing the contents is the idea. This pseudo file is regenerated every boot so the echo will always set the parameter correctly. Using vi/nano will only replace it until you reboot then it’ll revert to it’s old value.

  4. Weird, but on my system (Ubuntu 10.04 with the wired Apple Alu keyboard) the fn key doesn’t even work. Doesn’t do anything. Xev remains silent if I press the fn-key….. Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *