Ubuntu, Apple International English keyboard, and the hash sign

Trying Linux is something I do every few years. That’s to say “Trying desktop Linux”, as I do work with Linux servers all the time. The latest attempt is ongoing right now, with the goal of getting X-Plane to run with a nice multi-display setup (which I’ll undoubtedly write a whole other blog post about).

It seems that every year people keep telling me that installing Linux is really easy nowadays, and that it’ll “just work”. I guess it would for most people. It appears that I’m not most people.

All I wanted to do was install Kubuntu 12.04 and X-Plane, so I can start working on the multi-monitor setup. Before I could get to that, though, I needed to get my Apple aluminum keyboard working properly. I’ve got one with the International English layout, and despite the fact that that can be selected during installation, it just doesn’t work.

This is a known issue with no easy solution. First of all, the “fn”-key needs to be fixed. The function keys are by default mapped to the media functions, so you need to press fn to get the regular function key functionality. This can be fixed by a process that’s fairly easy to find on the web. Edit a configuration file as root:

$ sudo nano /etc/modprobe.d/hid_apple.conf

Add this line to the file, save and exit:

options hid_apple fnmode=2

Run this:

sudo update-initramfs -u

Reboot. The function keys should now work as you’d expect them to.

There’s still a whole bunch of keys that don’t work as advertised on the labels. In my case at least section/plusminus, grave/tilde, apostrophe/quote and most annoyingly three/hash. These I fixed with xmodmap:

nano ~/.Xmodmap

Add this to the newly created file:

keycode 49 = grave asciitilde
keycode 12 = 3 numbersign
keycode 48 = apostrophe quotedbl
keycode 94 = section plusminus

And run:

xmodmap ~/.Xmodmap

After this, your Apple International English keyboard should type the characters printed on the keys. The fixes should also persist between reboots of the system.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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