Standardising the Mac Keyboard

My MacBook Pro is, ironically, the best portable PC I’ve owned. The Big Old Alien is slightly faster and more powerful, but you’d never use the word "portable" about it without gritted teeth, and since the PC world went to silly wide (=short) screens as standard, nothing else with a 15" screen can match the Apple’s bright, colour-accurate and relatively tall display. The form factor and elegant, strong body suit me very well.

The initial teething problems with accessing external displays resolved themselves when I bought some slightly higher quality display adapters. Ironically the best one for VGA has "Dell" written on it. The multi-touch trackpad works well with Windows as soon as you set the bottom right corner to provide a right mouse click, and the spacing and action of the keypad allows me to type quickly and fairly accurately in a way which isn’t possible on many of the other laptops I’ve owned.

The keyboard layout, however, is a different matter. I’m sure that Apple’s position is that you should just use Apple keyboards all day every day and get used to it, and that the more common layout is a Microsoft/IBM standard anyway. The latter point might be true, but that doesn’t help those of us who operate in a more heterogeneous world. I have to work on PCs as well. About half the time, I use my Mac via Remote Desktop, from a PC with a standard Microsoft Keyboard. Even when I’m working on it directly, and even though I’m not a true touch typist, my muscle memory is sufficiently good that I default to the UK PC positioning of the ", @, \ and # symbols, all of which I use quite frequently. And occasionally Frances gets to use it, and she is a touch typist who uses PCs all the rest of the time.

I therefore decided that something had to change, and that was the Mac! Unfortunately turning it into a "standard" PC layout is non-trivial, but I’m getting there.

The first step was to implement a proper "Delete" key, without which the Mac is unusable in many Windows programs. The solution to that one’s fairly well documented: you use SharpKeys to adjust the registry, and remap a suitable key to send the Del scancode, which is an easily reversible but permanent fix. I chose F12, which is easy to map and in pretty much the same relative position to Backspace as most Windows laptops. I believe it may be possible to use the CD Eject button instead, which would be even better, but I haven’t got that working yet.

The next layer is the Windows keyboard definition. Microsoft provide a free utility called the Microsoft Keyboard Layout Utility, which allows you to define the mapping for the main text keys. The advantage of this is that you can define multiple layouts and switch between them on the fly, if, for example, you work in several languages. I initially tried having the Apple layout, plus one based on a standard UK keyboard. This works tolerably well, but you can get tripped up if you haven’t switched the layout correctly, as you have to switch the keyboard separately for each application used in a login session. It also doesn’t resolve the problem of muscle memory on the Mac. Something more enduring was required…

I decided it was time to try and sort out the MacBook keyboard more directly. It’s relatively easy to pop the keycaps off and swap the standard text ones around. First change is to swap the \| key with the ~ key, which puts them into their correct positions for PC users, and remap their output in a copy of the Apple keyboard layout. While I was at it I remapped the non-shifted character on the ~ key from a grave accent to a # – consistent with PC keyboards and about 1 million times more useful in this hash-tagging world!

Apple’s approach to the quote keys appears to be wilfully obstructive. All European keyboards since the age of typewriters, including British ones, put the double quote above the 2. So do older American keyboards. However the US IBM Selectric typewriters put the @ above the 2 and the double quote above the single quote, and that became the standard for US PC keyboards. For reasons which I can only assume are due to an arrogant American company trying to impose American standardisation on others the UK MacBook keyboard follows US rather than standard UK practice. Fortunately they don’t impose the same change on the rest of Europe, so a partial solution presents itself by purchasing a replacement 2/" key for a German machine (from the excellent http://www.thebookyard.com), and swapping the outputs of the two shifted keys in the keyboard mapping file.

At this stage I have a single keyboard map which works with both the native keyboard or a PC one, and outputs all the symbols I regularly use on PC rules. The majority of keys on the MacBook keyboard also follow their labels. There are two exceptions: the @ key is generated by shift+quote as expected, but not shown on the key, and the same goes for the #, as the base symbol on the ~ key. Unfortunately as far as I can see there are no variants of the MacBook keyboard for any country which have these key combinations, so getting replacement keycaps is not an option. However I can probably live with this limitation.

The one remaining annoyance is the fact that the Fn and Ctrl keys are the opposite way round on the Apple keyboards to most PCs. That’s a bit of a problem with muscle memory for Ctrl+key shortcuts. However I’m gradually training myself to hit the standard PC Ctrl key on its right edge, which is almost the right position for the Mac Ctrl key as well. The real fix is to develop a new keyboard driver which swaps those keys altogether, and then swap the key caps. That’s not for the faint hearted, and I’m not going there unless I have to (and have lots of spare time).

There’s one more layer! Smile Some of my software (particularly XnView, which I use for image management) uses the numeric keypad, which doesn’t exist on the MacBook (one of the big advantages of the Alienware M17X being so enormous!). However that has a relatively quick fix, using AutoHotkey to temporarily map the equivalent keystrokes from the standard number keys. This has the advantage that I only need to have those changes in place on demand, and can tweak the mapping on the fly if needed.

It’s a complicated process, and definitely not standard end-user territory, but I’m nearly there!

This entry was posted in PCs/Laptops, Thoughts on the World. Bookmark the permalink.

Leave a Reply

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