Remapping a Mac’s Keys

Mac Keyboard

As I may have mentioned in previous posts, I really like my new Macbook (initial hardware teething troubles aside), but one thing has been bugging me. I’m a programmer by trade, and simply because I’m always on a keyboard, can touch type very well. On a PC keyboard.

The Apple keyboard layout has a few quirks. Having the function key in the bottom left, where Ctrl should be is a tad annoying, but I am fairly used to it as I have used IBM ThinkPads quite extensively.

What I cannot get used to, however, is the way that it’s just not a UK-PC style keyboard. Shift-2 should give me quotation marks! The hash key, which I happen to use a lot, for example “#!/bin/bash”, doesn’t even exist on the keyboard – one has to use Alt-3 to get it. And backslash should be next to the Z key.

Given the fact that I touch type and don’t look at the keyboard very often, I figured I could simply remap the offending keys to my preferred layout. It took me a while to figure it out, but now it’s done. You can download my keymap here.

Once you’ve got it, put it in your ~/Library/Keyboard Layouts directory, log out and back in again, and it should be available to you in the “International” section of System Preferences, under the “Input menu” section.

Experiment at your own risk. if you somehow muck up your keyboard (I can’t see how you could, but still…) then don’t blame me.

Oddly when you’ve got multiple inputs defined, the hotkey to switch between is defined as Cmd-Space, which overrides the existing hotkey (in my case, set to Quicksilver). Just turn off the hotkey for input selection and you’re good to go.

Ah, I can now get back to typing easily again:

ls -l | less
foo@foo.com
#!/bin/bash
#This is a comment

4 Replies to “Remapping a Mac’s Keys”

  1. May I ask how you created this keyboard layout? I am not only a UK keyboard user but I am interested in tweaking around the position of a few keys such as the T & F due to ergonomic (carpal) reasons. Thank you and look forward hearing from you.

  2. Hi Sid… gosh, let me try and cast my mind back… I’m pretty sure it was using an application called Ukelele. Their site appears down at the moment, but Googling for “Ukelele Mac Keyboard” brings up other places where it might be downloaded. Obviously use caution if you download it from somewhere other than the developers’ site.

  3. Dude – same story with me. Learning Mac keys is ruining my hard earned Windows and Linux keyboard chops. Love my Mac mini but want that freakin hash key where it belongs so writing perl and bash isn’t such a pain. Cheers mate!

Leave a Reply

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