pixel pixel

pixel pixel pixel
PrevIndexNext  Using a British/UK Windows keyboard with an Apple Mac in OS X (1) Tue, 1 Jan 2002

(printable version of this page)

UPDATE 4: (20 Novermber 2005) This page has been superseded by these instructions.

This page was originally at http://www.gyford.com/misc/windows_keyboard_mac01.php

UPDATE 3: (2 February 2003) This page is now out of date. See this page for the latest instructions.

UPDATE 2: (21 November 2002) uControl lets you swap and change the Command, Option and Control keys around via a moderately friendly System Prefences pane. I think it was originally based on DoubleCommand, mentioned below.

Also, Nick Perry emailed me to say…

After a bit of snooping around (notably on http://developer.apple.com/technotes/tn2002/tn2056.html and others), I figured it should not be necessary to merge the resource into any other resource files, but instead place the single modified resource on its own in /System/Library/Keyboard Layouts

After a bit of playing around I got it to work perfectly - simply by dropping a single .rsrc file into that folder.

Much as you did, I extracted the current British layout, but from /System/Library/Keyboard Layouts/Roman etc - using /Developer/Tools/DeRez. I then edited the text resource and recompiled it into a .rsrc file using Rez. I made a few more changes from the resource you created - for istance, the backslash and backtick keys seemed to be transposed. Also some keys reverted to mac layout with caps lock on, so I corrected those, and I also copied the euro symbol to Opt-4 as most British Windows keyboards have the euro on AltGr-4.

Feel free to post this simplified info, and the attached rsrc file if you wish. The .r file is just the text version of the resource as output from DeRez.

So, with uControl and Nick’s file you could probably avoid all the instructions below! On my keyboard Nick’s changes seem to have reversed the backslash (\) and backtick (`), but I suspect different keyboards have their own variations. Thanks Nick.

UPDATE: (2 July 2002) UK PC Keyboard Patch for Mac OS X has appeared as an alternative solution after Tim had identical problems to mine. It works in a similar way to DoubleCommand, mentioned below.

There may be a better way to get a British Windows keyboard working with a Mac and I’m surprised I can’t find one anywhere on the web. So here’s what I’ve done. I hope it’s useful. Let me know if you find it does or doesn’t work. 12th June 2002.

There are two things we need to do. First, moving the Command, Option and Control keys into their familiar Mac positions. Second, because British Windows keyboards have a different layout to British Mac keyboards, we need to move some of the punctuation keys around so that when, for example, you press Shift-2 you get ” rather than @.

Moving Command, Option and Control keys

By default the actions of Command, Option and Control are in an unfamiliar order on a Windows keyboard, mapped to the Windows, Alt and Ctrl keys. The simplest way I’ve found to switch these is to use DoubleCommand. This lets you switch various keys around by setting a number in a text file (you’ll have to read the Readme.rtf for the details). I used the number 608, making the Windows key Control, Ctrl key Option and Alt key Command. Although my Windows key actually does nothing now, so there’s room for improvement! (Be aware that some people have had serious problems with DoubleCommand, although I haven’t. Yet.)

Move punctuation keys

This process is rather more complicated unfortunately. You’ll need a copy of ResEdit which must be run in Classic/OS9, and which can cause major damage if you’re not careful.

We want to create a new keyboard layout which will be accessed from the keyboard menu (System Preferences > International > Keyboard Menu). Follow the instructions in the first post on this page. The instructions don’t say that you’ll have to make a copy of Localized.rsrc in a different folder (unless you’re logged in as root) because ordinary users don’t have write access to the file in its original location. In step 3 duplicate the “British” KCHR resource (ID 2) and name it something like “British - Windows”. Now we need to alter some of the key mappings in this new resource.

I used these instructions as a guide to the process. It’s not hugely clear, but hopefully you can figure it out. To give you a start, here’s a step-by-step guide to changing Shift-2 to result in a ” rather than @:

  1. Open your “British - Windows” resource by double-clicking it. The window that opens has three areas. The largest, top-left area lists all the possible characters that could be printed. Next to that is a smaller area of “slots”, each relating to a keypress. Each of these can be assigned a character from the first area. The bottom of the window shows a keyboard (the layout of which you can change using the “View As…” item from the KHCR menu).
  2. When you hold the Shift key the characters on the keyboard section of the window change to show what each key generates with Shift held down. You can see the 2 key changes to “. We want this to be @. While holding the Shift key, click the ” on the keyboard section. The ” square on both the upper sections of the window are also highlighted. We want to replace the ” in the right-hand section with a @ from the left-hand section.
  3. Note where the highlighted ” in the right-hand section is. Find the @ in the left-hand section and drag it to the right-hand square that contains the “. That’s it! Now you need to swap the @ in the right-hand section for a ” using a similar process and then find which other characters in the keyboard section don’t match the positions of those on your real keyboard.

Now save your Localized.rsrc file and continue with the first instructions from step 4, dragging the file on to QuickConvert again, replacing your active Localized.rsrc file and restarting your Mac. Switch to your “British - Windows” keyboard layout, open an application you can type in to and try your new key mapping.

You may have to go through all this a few times until you get the keys all mapped correctly as they’re not always obvious. If this is all a real pain for you, you could try downloading the Localized.rsrc I’ve made and using that (after unstuffing it of course). Backup your origional version (found in System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/ Resources/English.lproj/) and replace it with my version. I’d be interested to know if it works for you!

Some credit for all this goes to this page. I’ve been using a US PowerBook and a British layout Goldtouch Ergonomic keyboard, but hopefully the instructions should work for anyone with a British Windows/PC keyboard.

[Powered by Chronicler]