Skip to main content

Apple Aluminium Keyboard on Linux

Since I'm a sucker for shiny things, and since I got used to the lovely keyboard on my Macbook, it only seemed right to get a new brushed aluminium keyboard for my non-Macbook computer. Well, that and a hand injury requiring me to have a keyboard with less than 1/16th of an inch key travel ...

I previously used it on Windows and getting it to work with Bootcamp was pretty easy. I even wrote instructions on my old blog. I've since started using it as my primary keyboard on my desktop machine with Ubuntu, and setting it up on there was even easier. There is a built-in keyboard map for it, and everything just works. I use the US layout because I'm more likely to type # than £, but altgr+3 produces the £ so all is good.

Unfortunately there are two things that irk me about this keyboard. First is that there is no insert key. Second is that you have to hold down Fn, which is where the insert key should be, to make the F keys work. Fortunately a bit of magic can make everything OK.

Building A New Insert

I decided to use F13, which is located directly above Fn, as a replacement insert key. I used xev to determine that the scan code of F13 is 191 (the others following on in a linear fashion). Making it into insert is just a bit of xmodmap magic, so put this line into .Xmodmap in your home directory.

    keycode 191 = Insert

That's it. It will be enabled when you log in. If you want to enable it immediately, type this:

    $ xmodmap .Xmodmap

Magic. You now have an insert key.

Fn-less F Keys

I found many, many blog posts by other people trying to figure out how to convert the media keys into standard F keys. Most of them spent time with xev trying to map the scan code of the F keys to the X11 function key mappings. This is a long winded and entirely unnecessary task if you have a 2.6.x kernel. Add this line to /etc/rc.local:

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

On reboot, you will have standard function keys. The media keys are still accessible by holding down Fn, so it's the best of both worlds. If you are running Compiz, you could map the exposé keys to that. Of course, enabling it without a reboot is as simple as running that command as root.


Popular posts from this blog

Another canal walk

The sun has started being a little more present lately, so some mornings are actually quite pleasant. On one such morning I decided to have a wander up the canal.

The clouds made everything look a bit Toy Story, and the low sun gave a lovely light and contrast to everything else.

Of course, it wasn't sunny everywhere. But even in the darker places, such as right underneath Leeds railway station, the sun had a go at peeking in.

Shooting the Enterprise

I was recently asked if I could help out providing an image for a magazine article about stress management. For reasons as yet undiscovered the requested image would be of the USS Enterprise flying through a storm in space. Unfortunately I didn't have a lot of time (just a couple of hours), but I did have a very nice model of the Enterprise D I could use to build the image around.

Thinking fast, I rigged up a rather slapdash rig consisting of a black reflector backdrop, an umbrella and stand from which dangled the model by a thread, and a couple of strobes. One light above, diffused, to provide the key light, and another, reflected and lower power, to fill some of the very dark shadows. It ended up all looking something like this:

Using a fast shutter, f/16 and cunning flash positioning I managed to keep the background black and give the model suitably textured lighting so it didn't have that flat, uniform, shadowless appearance of, well, a model. The narrow aperture obviously…

Leeds Hyperbeastly

It's been five long months since I posted anything to this blog. Including this post here, I have posted no less than three times in 2014. As you can tell, I am nothing if not prolific.
A lot has changed since the last time I posted anything. I sold all my SLR gear, for a start, and switched to micro four-thirds. I got a lovely, lovely little Olympus OM-D E-M10 and a small selection of lenses including the must-have Panasonic 20mm f/1.7 pancake and the stunning Olympus 45mm f/1.8. Marvellous, and the camera, four lenses and spare batteries and SD cards in a bag that wouldn't fit the SLR and a single lens. Cracking stuff, because it's now small enough to carry all the time. In fact the body and pancake lens is barely bigger than my Fuji X10 compact!
Anyway, the point of this post; I've taken several walks through Leeds while I've worked there over the past few years and I've been finding it more and more difficult to find non-boring subjects. Everything is so dr…