Mapping keys on a Mac keyboard
I love my Macbook Pro. It is a thing of beauty, and a joy to use. I’m actually really starting to like Mac OS X as well, and while I frequently feel like a bit of a n00b and find some of the Darwin vs Linux differences a bit distracting, I’m yet again in the position of prefering something other than Linux on the desktop. It’s not that Linux doesn’t do everything I need, because it does. It’s just that.. well, the Mac just does everything with a bit more flair.
But that’s not the point of this post. I wanted to quickly write about a small beef I have with my Mac.
When I’m sitting at my desk at work, I have the mac plugged into a Dell 20″ widescreen display, with a printer and wireless keyboard and mouse connected via USB. This is great, because all I have to connect in the morning is one USB cable (to the hub in the monitor) and I get all the devices sitting on my desk (including a sync cable for my Palm Pilot when I need it). The keyboard is a Dell, one of those “multimedia” keyboards with volume knobs and all that guff. It’s a lovely setup.
The problem is that, being a PC keyboard, the keys don’t map into the same positions as on the notebook keyboard. The Windows key maps to the Apple key by default, but the positions of the Windows/Apple and Alt keys are transposed. Mac OS X has a nifty keyboard mapping utility that lets me swap these two keys, but the effect is global and I can’t find any way of restricting it to the external keyboard. I know that the Mac can distinguish between the two keyboards, because it tells me not to be silly if I press a key on the built in keyboard when I’m trying to identify the external keyboard in the control panel. So why won’t it let me map the keys separately?
This is a little thing, really, but it means I have to remap those two keys every time I switch between using the Mac at my desk or on its own.

