Slim Aluminum Apple Keyboard under Ubuntu

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 …
- Select System > Preferences > Keyboard
- Go to the Layouts tab
- Click Add…
- Under the By country tab I chose Country: United Kingdom and Variant: United Kingdom Macintosh
- Click Layout Options…
- Under Miscellaneous compatibility options, select both Default numeric keypad keys and Numeric keypad keys work as with Mac
- 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.
Alan Doyle on August 30th 2009
Alan Vallis responded on 26 Feb 2011 at 10:14 pm #
For the benefit of fellow Linux learners. The command “echo 2 > /sys/module/hid_apple/parameters/fnmode” must go before “exit 0″
Works in Ubuntu/Mint 10.10 too.
Alan Doyle responded on 27 Feb 2011 at 8:35 pm #
Doh! Exactly. I’m so used to making that change I don’t see the “exit 0″ anymore. I’ve update the tutorial to make it a bit clearer. Many thanks
Angelo responded on 29 Jul 2011 at 8:41 am #
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?