If you have a Mac and want to use a keyboard that’s designed to be used with a British Windows-based PC, you’ll notice that some of the keys don’t produce the expected characters. @ and ” are generally swapped, for example. In addition the Command (Apple), Option and Control keys may be swapped round. Each of these problems needs to be tackled separately…
Moving Command, Option and Control keys
If you’re using Mac OS X 10.0.1 - 10.3.8, then uControl lets you swap and change the Command, Option and Control keys around via a moderately friendly System Preferences pane.
uControl doesn’t work on Mac OS X 10.4+ (Tiger), but Apple has built a similar feature into the System Preferences. Open the System Preferences application and click ‘Keyboard & Mouse’. Then click the ‘Modifier Keys…’ button in the bottom left. Re-map your keys and click OK. I change mine to look like this picture:
In some versions of OS X, these changes apply to all keyboards — so if you have a laptop with a PC keyboard plugged in, you’ll have to re-map the modifier keys whenever you want to use your laptop’s keyboard. At some point, certainly in OS X 10.5.5 you can choose these changes to apply to only your external keyboard.
Moving punctuation keys
Another addition since Mac OS X 10.4 (Tiger) is the ‘Change Keyboard Type…’ button next to the ‘Modifier Keys…’ button in the ‘Keyboard & Mouse’ preference pane. I hoped this would take standard Windows-oriented UK PC keyboards into account, but I’ve had little luck with it. Whichever keyboard type it suggests for me, none fix the problem of wrongly-mapped characters.
Instead, we will use a custom Keyboard Layout to re-map the troublesome keys. While I haven’t had problems with this over the years, I can’t take responsibility for anything that goes wrong if you follow these instructions.
- Download this zip archive or this gzip archive, unzip it, and place the enclosed British-Windows-2.rsrc file in your ‘/Users/yourname/Library/Keyboard Layouts/’ folder (if you don’t have a ‘Keyboard Layouts’ folder there, just create one). You should make sure to unzip the file by double-clicking it in the Finder, rather than using the command line, as it appears this can corrupt this particular file.
- Next, open System Preferences and click ‘International’. Click ‘Input Menu’ and select the checkbox next to ‘British - Windows - 2’.
- Make sure the checkbox at the bottom of the window, next to ‘Show input menu in menu bar’, is selected and then quit System Preferences.
- Now you should be able to select the ‘British - Windows - 2’ keyboard layout from the little icon towards the right of the menu bar.
Hopefully your keys should now be re-mapped successfully: try typing! This layout swaps ” and @, and also the ` and \ keys. You might need to log out and back in again (or restart your Mac).
If the \ and ` are now the wrong way round then try this alternative layout by Andy Pearce, available in zip, gzip or uncompressed formats, created with Ukelele. Follow the same procedure above, but use this ‘windows-uk.keylayout’ file instead of the ‘British - Windows - 2’ layout.
Again, if you have a laptop and want to use its own keyboard, you’ll have to use the Input Menu to manually change back to whichever Keyboard Layout you were using before (simply ‘British’ in my case). Also, note that whenever Mac OS X prompts you for your password to authorise something it flips back to your default Keyboard Layout — so if you use any of the re-mapped characters in your system password, be careful. Some applications, such as Virtual PC and Internet Explorer also seem to use the default Keyboard Layout — annoying, but not the end of the world.
For more information about how to create and edit a Keyboard Layout file, read the older instructions: version 1, version 2. Although these days you’re probably better off using the aforementioned Ukelele.
UPDATE: Moved Andy Pearce’s layout further up as this solves a common problem with \ and ` being swapped in my layout. (17 November 2008)