Phil Mac OS

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…

The Raspberry Pi is a tiny and affordable computer that you can use to learn programming through fun, practical projects. Join the global Raspberry Pi community. Two sets of emails between Steve Jobs, Phil Schiller, Eddy Cue, and various other senior Apple executives, disclose the exact thinking behind how Apple approached Kindle on iOS.The current.

UPDATE: Many of these methods have problems with Snow Leopard. This gzipped layout is reported to work fine. Read comments from here for more information. (22 October 2009)

This page supersedes two older versions of these instructions (version 1, version 2). If you want more background information you might find useful stuff there.

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.

  1. 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.
  2. Next, open System Preferences and click ‘International’. Click ‘Input Menu’ and select the checkbox next to ‘British - Windows - 2’.
  3. 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.
  4. 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)

Comments

Thanks Phil, after reading this I've decided to order the Mac Keyboard, life is complicated enough.

Posted by Richard Hyett on 21 November 2005, 10:26 am Link

Really easy -- worked a treat -- thanks!

Posted by Nick on 26 November 2005, 9:20 pm Link

Wow thanks Phil, this has been bugging me for weeks ! Now I have full control over my @~'#/'ing keys !

I find it odd that nobody seemed to have tested the 'British' keyboard layout on a PC keyboard. This one is shared through a KVM switch with one of my PCs.

As a web developer, I'm always using those keys and it's a real teeth-grinder to have to switch contexts depending on which machine I'm coding on.

A curious side effect after dragging the file seemed to be that none of the current apps would load the new layout and kept defaulting back to British (1).

Well I quit all apps, and restarted them, had no real effect, but a system restart seemed to pick up the user profile changes.

Thanks again for saving my sanity - Neil

Posted by Neil Smith on 4 December 2005, 4:55 pm Link

Hi Phil. This is just so useful! Small thing... huge sanity impact. Cheers, Respect etc - Nick.

Posted by Nick Buckley on 6 December 2005, 10:05 am Link

Apple messed up here. Part of the selling point of the Mac Mini is that it doesn't come with a keyboard and mouse and you can just reuse the one you have. Part of the the Mac Mini's target audience is switchers - these people, in Britain at least, will own a standard British keyboard. They'll plug this in to their shiny Mac Mini and find that Mac OS X does not allow them to map the keys correctly. Very poor. Just as well there is someone out there who made the effort to find a work around and share it.

Posted by mike on 24 December 2005, 9:15 pm Link

Thanks Phil, i did as you said, and it worked fine. By the time I'd done as you said I knew more than the man in the Cancom shop who sold it to me!

Just 2 irritating extras:

1. I can't get rid of the greyed out check/tick in the British (union jack symbol) box of Internaional input menu. This means that occasionally my keyboard defaults back to that and away from the newly installed British windows 2 layout. Any ideas on how to remove the greyed out check?

2. My numeric keypad on the right hand side of the keyboard obstinately refuses to change from numeric mode, no matter how many times I press the Num Lock key. This is really annoying when I am used to using the delete key instead of the full stop. Again, any help much appreciated.

Many thanks,

Rod

Hi Rod.

1) I've no idea I'm afraid. Personally I don't mind having the standard British layout as an option, as I need it when just using my PowerBook's keyboard. But the times it randomly switches to this is annoying. It does it when I use Internet Explorer or Virtual PC, among other times...

2) I'm afraid I don't have a numeric keypad on my little Windows/PC keyboard, so I can't help fix that. Sorry!

Posted by Phil Gyford on 20 January 2006, 4:14 pm Link

I KVM switch between my Mini and XP all the time and was going insane also. Much appreciated Phil!

Posted by Scott on 29 January 2006, 6:52 pm Link

THANK YOU! I've been 'testing' running the 'patched' OSx86 on my PC notebook, and the keyboard layout was very irritating! Everything is now perfect.

Posted by newtrax on 28 February 2006, 4:28 pm Link

One note - in 10.4, the keyboard layout didn't appear as available until I logged off and back on again. After that, it was smooth sailing :)

Posted by Richard Aspden on 6 April 2006, 5:47 pm Link

Thanks Phil,

I was starting to think I must be the only one having this problem, and I only have it when using the keyboard through my KVM switch. If using the keyboard directly, it uses the Mac drivers it came with. Through the KVM the drivers complain no suiable keyboard is attached.

I still have some minor problems though.
When using the defulat british layout, both the #/~ and / keys produce ' and ' '. If I switch to the British 2 layout they both produce '#' and '~' but I can't get both sets of symbols on the same keyboard choice. As you can probably guess, all 4 come in quite handy when using shell scripts.
Also the £ symbol doesn't seem to work in 'terminal' windows, but as you can hopefully see, it did here.

Posted by Roddy Sharp on 6 May 2006, 9:27 am Link

I'm not sure what to suggest I'm afraid Roddy -- it works OK on my keyboard so I wouldn't be able to test an alternative.

You could try looking at the older versions of these instructions and see if you can make your own file. I think that requires ResEdit, running in OS 9/Classic though, but maybe there's an alternative method?

Posted by Phil Gyford on 6 May 2006, 10:44 am Link

Thanks very much. Apple support were unable to tell me how to do this! Makes working with my kvm switch much better :-)

Still page still took some hunting down, we need more links to it to help it raise the Google PageRank!

Posted by flossy on 21 August 2006, 11:16 am Link

The most frustrating issue of my PC to Mac transition is now resolved :-) Shame the 'experts' in Apple stores don't know how to do this. Many thanks!

Gareth

Posted by gareth on 27 August 2006, 11:25 pm Link

This is exactly what I've been looking for since starting my new job (where everyone works on Macs!) Only problem is I can't get it to work. I think I'm following the instructions exactly, but even after pasting the .rsrc files into the Keyboard Layouts folder I'm not seeing the British-Windows option in the Input Menu pane.

Any advice?

A reboot of the ol' Mac sorted it - thank you!

Wow! Thanks for this!

Haven't bought a Mac yet, but planning to get a MacBook when Leopard comes out (hopefully a Core 2 one as well).

Does this still work when using the standard iBook/PB/MB/MBP keyboard, in that you don't have to use an external keyboard to use the proper layout?

I also mentioned this site on my blog, thanks again for this hint!

Posted by Peter Upfold on 30 September 2006, 5:15 pm Link

Hi Peter. Yes, the custom layout will still apply when using the built-in keyboard on a Mac laptop. Personally I prefer to switch back to using the default Apple layout though, so that what's on the keys matches what I type. But then I've been using Macs for years so I don't find the British Mac keyboard layout annoying - I understand that it can be for people coming from decent UK keyboards.

BTW, you'll find the # symbol if you press Option/Alt 3.

Posted by Phil Gyford on 30 September 2006, 9:36 pm Link

Eh...I may be doing something wrong but the @British Windows 2@ (they were supposed to be quotation marks...!) icon doesn't appear on the input menu in the international folder, even though I copied it into my existing library/keyboard layouts folder...

Any suggestions? I'm using OS X v10.4.7

Thanks

Posted by Micheal on 7 October 2006, 8:00 pm Link

No idea, sorry Micheal -- it works for me. I assume you've tried Restarting.

Posted by Phil Gyford on 8 October 2006, 10:54 am Link

thanks a lot...

But there must be some OSX-native way to handle this; ResEdit is one of the great OS9 tools that should be obsolete by now...? Hard-headed as I am I'll find it --someday.

The strange Terminal-behaviour looks like a Unicode-problem to me:
Shift-` -> 302254 (not '¬'),
Shift-3 -> 302243 (not '£').
Maybe these characters shouldn't be used in the Terminal in the first place, when I aquire similar characters from the Special Characters menu it gives similar result...?

Further there's an issue with the OSX startup login; try using a re-mapped keystroke in your system-password and you'll find you need blind-typing ability on the unmapped keyboard-layout to actually get in (eg. '@' will need to be typed as Shift-2 again). After you got in the keyboard works as expected, great!

Posted by philip brands on 10 October 2006, 12:33 pm Link

Almost, but not quite Philip: It's not just the startup login, it's any OS X dialog that requires the username/password, eg, if you try to install something that requires permission. Then you have the same problem with @ and ' being back to the way they shouldn't be. Also, in iCal, if I select an event and edit the time/date in the Info drawer, my selected keyboard (as indicated in the OS X main menu) reverts to the standard UK keyboard, and stays that way -- I have to change it back manually. Weird.

Posted by Phil Gyford on 10 October 2006, 8:50 pm Link

weirder... if you log into the system with the terminal there's none of this behaviour -- keyboard maps as re-mapped.

Points in the direction of buginess of Apple's 'loginwindow' process if you ask me... I'll leave you the honour of filing a report ;), cheers!

Posted by philip brands on 10 October 2006, 11:05 pm Link

Phil,

Thanks for this - I'm new to Macs and this 'oversight' by Apple was causing me to gnash my teeth.

I also get the 'reversion' problem, particularly with Finder which insists on using the British layout. Plus, my keyboard setting is not remembered between logins so I have to re-select your layout each time. Would an AppleScript run at login be able to fix this - i.e. select your layout?

Posted by Stuart Turner on 2 November 2006, 10:57 am Link

Possibly, but I don't think I've had this problem myself. I wish Apple would just fix this problem properly.

Posted by Phil Gyford on 2 November 2006, 2:18 pm Link

Hi,

I've just started using a Mac and the differences in key positioning for writing code are driving me crazy! However, when I download your keyboard layout, the ZIP file just unpacks a 0 byte file. Any chance you could post the actual layout file?

I also have an issue with Home/End keys. End takes me to the end of a document instead of a line. I know I can press Option-Right Arrow to do this, but its driving me crazy!

Will your layout file fix this too?

Thanks for the help!

Hello,

I have recently returned from working in the US and whilst over there,due to the AMAZING exchange rate, I bought me a new mac book.

Now the problem I have is that it has a US layout keyboard. I know I wont be able to physically change the keys but how can I change the function? Now that I am back I need to use the pound symbol!

Hope you can help!

Posted by Tommy P on 6 December 2006, 11:25 am Link

Flp -- I'm not sure what the problem is; the zip file works fine for me.

Tommy P -- Have you tried using the keyboard layout from this page?

Posted by Phil Gyford on 7 December 2006, 3:52 pm Link

Just a quick note to say 'thanks!'

I've recently switched from an XP PC to a Mac Mini - awesome machine, the software integration still amazes me, and I've been extremely impressed by how stable it all is (and I'm also a Linux user). The one thing that did annoy me is the lack of support for British PC keyboards. Seems very odd considering the fact that they're aiming this thing at 'switchers' like me.

Phil mac os catalina

I would buy an Apple keyboard but they're squidgy and nasty and I like my tactile keyboard which I've had for years. Anyway, I can finally use it properly with Mac OS thanks to you, so many thanks for all your effort and for sharing it with the world.

And thats the first time I have been able to type an @ key first time on this mac since my wife bought it. Thank you soooooo much

Posted by david bell on 17 February 2007, 8:44 pm Link

Hello there,

I've only recently switched to a mac and realised that there is no 'sharp' key (using musician's terminology). Any ideas as to how I can print this symbol?

Many thanks,

Dimitri

Posted by Dimitri Skliros on 21 February 2007, 1:43 pm Link

Try Option (or Alt) 3.

Posted by Phil Gyford on 21 February 2007, 3:29 pm Link

Just got my new MacBook and the keyboard layout hack works like a charm.

Thanks for saving me from learning two layouts and switching. :D

Posted by Peter Upfold on 22 February 2007, 8:30 pm Link

Hi Phil,

followed intructions on mac mini running 10,4 but won't pick up british mapping. does this work with 10.4.

many thanks

Al

Yes, works for me.

Posted by Phil Gyford on 4 April 2007, 1:57 pm Link

My Mac mini won't recognize my PC keyboard, although it did at one time. The Help advice is to go to System Preferences, click Keyboard and Mouse and then click Keyboard to get an option to change the keyboard. However, when I click on Keyboard, nothing happens. For environmental reasons, I hate to buy a new keyboard when I have a perfectly good one, but as things stand I have a computer that I works pretty well as a CD player. Any suggestions?
Thanks,
Chris

Posted by Chris Mills on 25 April 2007, 3:09 am Link

My imac intel is using a mac bluetooth keyboard, on my profile the volume buttons and eject does not work, on my feance's profile they work just fine. How can I fix this?

Thanks

Dave

Posted by david stanton on 2 May 2007, 6:20 pm Link

Can anyone help me.

Am using a XP PC and the keyboard has suddenly decided to switch key charcters so when I press for @ I get ' and vice versa.

Thanks that is the best fix ever, your a genius!

Posted by Christian on 18 June 2007, 8:25 pm Link

Thanks this is great.

Just to go back to some of the earlier comments, I have deleted the master keyboard layouts (Mac HD/Libary/Keyboard Layouts ( well moved them to the desktop)) and this allows you to untick the british keyboard option. I have then poped the layouts back where they belong and this seems to work fine without reverting back.

Thanks again

Thanks a lot Phil !

This has been THE largest stumbling block for me in OSX, I've simply refused to use OSX because of the differences in keyboard layouts, now I'm one step closer to giving it a try :)

Posted by Jesper on 11 August 2007, 11:49 am Link

Thankyou sooooo much for this article! I have spent all day trying to figure out why the hell my Mac wouldn't map a simple keyboard! The files you have linked are much easier to use than the other option (downloading Logitech's Control Centre for Mac & then extracting the Logitech.bundle file).

Thankyou again :)

Posted by CJ Davies on 23 August 2007, 9:53 pm Link

Hi Phil,

Should this work on 10.3.9 os. I have carried out the required steps above but have not been able to get this to work.

Many Thanks

Posted by JMDS on 23 September 2007, 7:39 pm Link

It worked for me, as far as I remember (I'm now on 10.4.10). Although you could try the previous version of these instructions, see if that's any better -- I forget when 10.3 came out and whether those older instructions were current at that time.

Posted by Phil Gyford on 24 September 2007, 5:01 pm Link

There seems to be a supplied layout in Mac OS X 10.4.10 called British Microsoft which seems to overcome the usual printable character issues. The Intellipoint/type software downloadable from microsoft also allows you to map the windows and alt keys to the Apple behaviour

Posted by Tony Dyer on 2 October 2007, 11:13 am Link

Interesting Tony... But this thread suggests that the layout is installed as part of the software that comes with a Microsoft keyboard, not as part of OS X 10.4.10 -- it's not installed on my OS X 10.4.10 anyway.

Maybe the software is downloadable from Microsoft's site and would work with Windows keyboards not manufactured by Microsoft...?

Posted by Phil Gyford on 3 October 2007, 5:13 pm Link

Can't get this to work. Problem is driving me nuts. The changes I make in the Keyboard Layouts folder don't seems ot get registered with the system. I mean they don't show in the international list of languages. Using a new MacBook with the latest OS.

Any tips would be welcome ))(@ ':!£@£^%^&*.

Posted by Rupert Fisher on 7 October 2007, 7:32 am Link

Phil Mac And Louie Unbroken

Ref: Pete's tip above, it's not very clear, so just for those who want to remove the default British layout and run with only the modified UK layout enabled.

Go into /System/Library/Keyboard layouts (and NOT just /Library/Keyboard Layouts as he says)

Drag Roman.bundle to the trash - it will ask you to authenticate, do so.

DO NOT EMPTY THE TRASH.

While Roman.bundle is in the trash, you will find you'll be able to unclick the default British layout. Go into the international input menu and unclick British, leaving only the new UK layout enabled.

Then pull Roman.bundle back from the trash and drop it back in /System/Library/Keyboard layouts.

You should probably log out and back in again, just to clean things up - and you should find all is right with the world.

The only caveat I'm going to put is I'm aware that some badly behaved applications (mainly Microsoft) seem to demand a 'known' keyboard layout and apparently misbehave to get them. If they can find the 'known' keyboard layout they randomly switch to it (as noted by a gazillion people in the discussion above). If they can't find the 'known' keyboard layout, I wouldn't be at all surprised to see the application crash. I don't have any such applications so I can't easily try this out. However, for me at least, all is now good with the world.

Posted by Paul Neve on 23 October 2007, 10:28 am Link

Fantastic! This worked like a charm! I can even report that this works on OS X 10.5 Leopard.

You have no idea how long I've been banging my head off this problem, thanks so much!

Bart.

Posted by Bart Busschots on 26 October 2007, 10:58 pm Link

Seems there's a problem with the zipfile – unzip reports:

Archive: British-Windows-2.rsrc

End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.

However, the Finder unzips it without complaint, but the file it creates is zero-bytes long. I think this is the cause of the 'it doesn't show up in the layout list' problems.

I don't know what to suggest -- I click the link for the zip file, it downloads, Stuffit Expander unzips it and I end up with a .rsrc file of 3,537 bytes in length. I'm not sure what to do any differently. I've just re-zipped and uploaded it, so you're welcome to try again.

Posted by Phil Gyford on 10 November 2007, 4:51 pm Link

Fine detective work. But it shouldn't be this hard. Apple should be supplying a British keyboard map for Windows/PC keyboards. The UK Mac Mini page doesn't say 'spend fruitless hours poring over Apple Docs, User Forums and talking with Apple Support Staff'... I'm kicking up a fuss. We'll see how far it gets. FWIW, I used to run Dell's OS Development Group, and managed their UNIX Development team - I know a bit about keyboard mapping, and how these businesses work. Wish me luck ;)

Posted by http://openid.aol.com/jezchatfield on 30 November 2007, 11:23 am Link

I have a Mac Mini upgraded to Leopard, and tried to follow the suggestions to use the British-Windows-2.rsrc file. I successfully changed over to use the new keyboard layout. I then wanted to make the new keyboard the default so I then tried the fix to remove the original keyboard check in the configuration.

On my MAC there was no Roman.bundle in /System/Library/Keyboard layouts, but there was an AppleKeyboardLayouts.bundle file. I assumed this might have been a name change in Leopard and copied it to the desktop and put the original in Trash. Unfortunately the next time I restarted I had lost the original UK keyboard from the Input Source selector.

Worst of all the new keyboard does not allow me to enter ANY characters in any Authentication dialog, this prompt is occuring when I try to drag the original AppleKeyboardLayouts.bundle file to /System/Library/Keyboard layouts.

Any suggestions please on how to get out of this?

Posted by dqj999.pip.verisignlabs.com on 4 December 2007, 5:10 pm Link

Thanks for posting this information - it looks very useful though unfortunately I have not been able to get it to work.

I am running Mac OS X 10.4.11 and seem to be having a similar problem to some others who have posted here: when I try to uncompress the archive I get a file of size zero bytes.

Would anyone be able and willing to post a copy of the uncompressed British-Windows-2.rsrc file, or alternatively, Phil, would you be prepared to make a copy of it available in a linux-readable format (e.g. compressed tar)? It would be much appreciated!

Posted by tonip on 17 December 2007, 11:55 am Link

You download the Microsoft Intellitype software rather than Phil's patch. You'll need to restart and when you do, instead of selecting 'British - Windows - 2' as stated above, select 'British Microsoft' and all your keys will be mapped as required.

You don't even need a MS keyboard.

Posted by Bill Turner on 7 January 2008, 9:51 pm Link

Leopard + IBM Model M via USB adapter here. The intellitype software didn't recognise the IBM keyboard though it's done wonders for my scrollwheel mouse :-) Happily, the British-Windows-2 patch worked once I'd logged out and back. So thanks of this post! The only keys remaining to be tweaked for the IBM keyboard are the pipe/backslash key.

Posted by Huw Thomas on 31 January 2008, 9:35 pm Link

Further to the above, I just tried the older British-Windows.rsrc.sit file and the archive seems to be corrupt, is it working for anyone else?

Posted by Huw Thomas on 31 January 2008, 9:57 pm Link

It works fine for me... I'm not sure what else to suggest.

For those having a problem with the zipped British-Windows-2.rsrc file, I've uploaded a .tar.gz version, linked to from step 1 above, so you can try that instead.

Posted by gyford.com on 31 January 2008, 10:21 pm Link

Sorry, it was the 'older' version of the file that doesn't seem to be working; the 'British-Windows-2' version that you presented above is fine. I just noticed your comment that the alternative one maps the and ` keys differently, so wanted to try it as that would be a better mapping on the British IBM Model M. It's not the end of the world if these keys are swapped though! In any case, thanks for looking into it.

Posted by Huw Thomas on 31 January 2008, 10:46 pm Link

Yes, I know which version you meant -- the older version works fine for me.

Posted by gyford.com on 31 January 2008, 11:01 pm Link

Weird. I wonder if there's a corrupt copy in a cache upstream of me somewhere ... I'll try again from a friend's house when I get the chance. Anyway, thanks again for your help with getting my keyboard working.

Posted by Huw Thomas on 31 January 2008, 11:16 pm Link

Very helpful - thanks a bunch!!! :-)
The swapped '/@ keys were driving me nuts.

Posted by Christof on 12 February 2008, 3:17 pm Link

Works a treat on OS X 10.5 (Leopard) with my Microsoft Natural Keyboard Elite. Although, I would advise restarting the machine (or maybe just logging out?) as the Finder wasn't working correctly with the new keyboard layout until I restarted. Hardly surprising, but worth knowing.

Cheers!

Posted by Rory Hunter on 27 February 2008, 6:54 pm Link

Any ideas about this problem?

Help! I can't get this work at all in 10.5.2.
I've put the .rsrc file in /Library/Keyboard Layouts, ~/Library/Keyboard Layouts and anywhere else I can think of but it simply doesn't show up in the list.

Any advice? Do you have an MD5 of the file in case it's corrupted?

Ah OK, working now. I was (foolishly) using Unix tools to unpack/install the archives which doesn't recreate the essential resource fork info etc.

Great result - thanks!!!

Thanks so much for this!

(Fixes same issue for me with a Logitech Navigator keyboard on a Mac Mini G4 running 10.4.11)

I was just remarking to myself that it's strange no official fix has been released. Then I thought... I guess they fixed in Leopard... err then I noticed the posts above! 3 years on, maybe Apple don't know.

Hello.
Thanks a lot : working with the nice Microsoft Comfort keyboard in French ! on my Apple (no download).
But nobody had never this answer.
Best regards : Thierry

Posted by Thierry LOOTEN on 18 April 2008, 10:24 pm Link

Works except when renaming files. ANy ideas?

I've just got this working on a Mac Pro, Leopard 10.5.4 and a UK/GB layout Microsoft Ergo 4000 keyboard (USB). I used the older 'British-Windows' layout and so far all my keys including the slashes seem to be in the right places!

Well, apart from the two extra bracket keys above the number-pad which are unique to this keyboard, they both come out as the letter a!

Anyway - thank you! :)

Is there anyway to set the layout on a PER KEYBOARD basis? For example an Apple Laptop with the 'Apple UK Layout' and an USB keyboard with the industry standard IBM/Windows UK Layout?

Does anyone else have a problem in finder with enter not triggering a rename? If I switch back to the Mac 'British' layout its fine, but Phil's 'British Windows' doesn't work for this.

I guess this is what Eddie was asking about in May 2008 (three comments back).

I am using a Cordless Logitech Keyboard, However when I switch to the british-2 fille.

None of my keys work at all.

Anyone got any ideas?

Forgot to mention I am using 10.5.2

Hi,

I was wondering if you can help. I am newbiw, I am experience Linux & windows users. But this keyboard thing has got me.

I am using iATKOS v4i 10.5.4, I have copied .rsrc into /System/Library/Keyboard Layout/ but it is not working. Am I missing a step somewhere? Do I need uncompress or compile something? If so, how do I do this?

Most of my keys work except for '@#`

Posted by Hitesh Patel on 28 July 2008, 7:35 am Link

Hi,

Just wanted to say thanks for taking the time to post up the info and the nifty UK layout. Saved me a lot of head scratching!

Cheers,

Andy

P.S. Dale - you have to restart your applications after changing the keyboard layout. Try something simple like Textedit at first and you'll see it works again after you restart it :)

I had issues where the resource file wasn't playing the game.

I had chosen to use the .tar.gz file 'cos it looked more Unix-y.

When I tried, using the Winzip file it just worked. Also, the system recognised it and gave it a 'Unix executable file' icon. The .tar.gz unzipped file was just plain old unrecognised.

And ... THANKS!!! ... Apple's culture imperialism stops here. :-)

Posted by James Jones on 19 August 2008, 12:39 pm Link

Actually ... there is one issue. I've got a back-slash key to the right of the left shift key. It's always mapped to #~. I've tried swapping between British and British 2 and it doesn't make a difference. All the seems to do is change the top-left key below Escape betwen back-tick and back-slash. I've probably not given enough information but if anyone's got this problem please tell me ...

Posted by James Jones on 20 August 2008, 1:50 pm Link

I'm using Leopard, and I found neither of the layouts above seemed to work for me. However, I found a utility called Ukelele which allows you to edit the keyboard layout and save it as an XML file, which seems to work (in my version of OS X, at least, which is 10.5.4).

If it's useful to anybody, I've saved the layout I created here:

You'll need to right-click that link, select 'Save linked file as...' then save it somewhere (e.g. the desktop). Then open your home folder, go into Library, then Keyboard Layouts, and then drag the file into there. Then log out and back in again, and you should find the 'windows-uk' keyboard layout in the International dialogue box list.

This is for a standard Windows keyboard with British layout (i.e. double quote at shift+2, hash next to the enter key and backslash in the bottom left).

Alternatively, you can create your own:

Hope that helps!

Posted by Andy Pearce on 21 August 2008, 1:17 am Link

Thanks boys. two tips

1= Phil is right. if you download his keyboard layout, don´t trust the zip to be unpacked during the download. it maybe gets corrupted and won´t work.

find the original zip archive and unpack yourself, fresh.

2= nice Ukelele tip Andy. but your download layout link leads to a file with '.xml' at the end of the name. change filename to end '.keyboardlayout' or it won´t work

Posted by James on 21 August 2008, 11:41 am Link

Actually the link definitely points to a file with the correct ending - I can only assume that Safari is renaming the file as you save it. The file is indeed an XML file, and if you left-click you'll find Safari tries to render it as an XHTML page (which fails, of course, but it's not XHTML at all). I assume that this automatic detection is also causing it to be renamed.

As James suggests, you should remove any XML extension and rename the downloaded file to:

windows-uk.keylayout

Alternatively, if it's easier, I've created zip and gzip versions here, which should preserve the filename:

www.andy-pearce.com/ra…
www.andy-pearce.com/ra…

Hopefully one of these solutions will work for you.

Posted by Andy Pearce on 21 August 2008, 12:38 pm Link

In response to Dale 12th July 2008:

I have exactly the same problem - setup the British-Windows-2.rsrc file in the correct place - rebooted and now cannot type at all. I had a check in the input menu in International and only have a few languages in there - mostly Far Eastern ones, no european/north american. I can only do so much as anything like copyiong files requires my password, which I can't type!!

How do I get these back?

Steve

Posted by scouser_steve on 1 September 2008, 5:19 pm Link

Try removing the file and rebooting? Try one of the alternatives, like those Andy Pearce offers, above?

Posted by gyford.com on 1 September 2008, 5:27 pm Link

Hi Phil thanks for the info however just 1 more keyboard annoyance ! the pipe and back slash are in the wrong place top left of the keyboard ! instead of bottom left any idea !! ?

Posted by Trevor Cockayne on 28 October 2008, 2:59 pm Link

Nice solution Phil, would appreciate if you could address the pipe and slash keys as described by Trevor

I'm afraid the pipe and backslash work fine for me -- on my keyboard the key is bottom left, next to the shift key, and it works with this keyboard layout. So I'm unable to do a new version of the layout because I don't have a keyboard that I could test it on.

If anyone else does and can, I'm happy to include it here.

Posted by Phil Gyford on 28 October 2008, 5:22 pm Link

Many thanks Phil - it worked a treat for me once I restarted the Mac.

Posted by Dion on 1 November 2008, 10:22 am Link

I've just upgraded from my old PowerBook to a new MacBook and found that the pipe and backslash are now reversed for me too! I tried Andy Pearce's layout and that did the job for me. I'll make them a bit more prominent in the post now.

Posted by Phil Gyford on 17 November 2008, 4:59 pm Link

For people's information:

Using a PS2 keyboard with a USB adaptor caused the backslash and the hash key to emit the same keycode so nothing could fix that.

Using real USB keyboard has fixed that problem for me.

Posted by James Jones on 22 December 2008, 5:09 pm Link

A note of caution to the tip regarding removing the 'roman' keyboard bundle from your /System/Library/Keyboard Layouts/ directory.

Not seeing this individual file, I deleted the AppleKeyboardLayouts.bundle file I found instead. This appeared to work, I was able to clear the default British layout, and select only the Windows Uk file I wanted. Super.

I then logged out with the AppleKeyboardLayouts.bundle file still in the trash. Big mistake! When I came to log-in, I found I couldn't type anything, either with my new cordless keyboard, or the original Apple one. Fortunately I have myself set as an administrator with auto-login so I switched the mac off, then on again. I was then logged in, and could type again so I tried to copy the AppleKeyboardLayouts.bundle file out of the trash, and into the /System/Library/Keyboard Layouts/ directory, I was asked to authenticate this, and found that again I couldn't enter my password.

After a few hours of panic and frantic attempts to copy the file using VNC and using cp from the terminal, I succeeded.

Copy the AppleKeyboardLayouts.bundle from the trash onto the desktop

Open terminal.
type:
sudo ditto ~/Desktop/AppleKeyboardLayouts.bundle '/System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/'

{note that the destination file command has quotes around it, and specifies the destination 'directory' name of AppleKeyboardLayouts.bundle, as this 'file' is in fact a directory, which is why I couldn't get cp to work}

Press enter.

This should then ask for your password, type this in (don't panic if you can't see your password as you type it) press enter, and assuming the command was typed correctly, you should now be able use the standard log-in and authentication windows again. Big sighs of relief all round!

Posted by Mark Stevenson on 31 December 2008, 4:38 pm Link

Thanks for the info! Saved me lots of time :) :)

Posted by OS X Coder on 4 February 2009, 10:50 am Link

Phil - thanks for this fantastic bit of web community support! I join a very long line of grateful people - shocking that these posts go back so far and a fix is still not built into the latest Apple OS...

Posted by Tim HArrison on 19 February 2009, 3:14 pm Link

Thank For Informations...

Posted by Tutorial Photoshop on 16 May 2009, 11:52 am Link

Hallelujah! As a recent Mac switcher trying to work with ALT F3 to get a hash in Mac Dreamweaver was driving me nuts so this is an exceptionally useful post. Thanks!

A British Windows keyboard is a dream too far I suppose... ;-)

Thank you, I can't believe the oversight by Apple by not implementing a proper UK-English keyboard layout. Incidently I am using a Wireless USB keyboard and needed to use Andy Pearce's layout.
I can now program without tearing my hair out in frustraion.

Posted by Henry Durrant on 21 June 2009, 9:31 pm Link

If you find your backslash key (i.e. the extra key between the left Shift and Z) isn't working (and isn't even detected by Ukelele), this patched version of ApplePS2Controller.kext should help:

It was written to support a French ThinkPad X40 keyboard but also works for UK keyboards. It adds a new 'Change Keyboard type' button to the Keyboard & Mouse preferences pane. I find this works well with Andy Pearce's 'windows-uk' keymap, though the Alt key on my keyboard has now changed from Command to Option (it can be switched back using Keyboard & Mouse preferences pane).

Totally rocks! I can't believe this article came up with I searched on Google for 'custom keyboard layout british pc keyboard mac os'

Posted by Julian Harris on 1 August 2009, 9:52 am Link

Thanks - just to let you know this fix is still helping newbies (to Mac) like me, all this time later. Thanks.

Posted by Barcode on 18 August 2009, 9:39 am Link

Quite brilliant! As a programmer, you have no idea now long this bl**dy keyboard has been driving me mad.
Thank you, thank you.

Snow Leopard problems.

Hurrah! Snow Leopard is here. Boo! My flippin' keyboard isn't working.

I am using a Microsoft Natural Keyboard 4000 and Intellitype 7.0 with the British Microsoft layout, and it works - sort of. If an application is 32 bit, such as Firefox, it is fine, but if I then open a Terminal, which is 64 bit, it switches to the Apple supplied British layout.

I've tried both Phil and Andy's layouts but neither of those seems to work across all applications, and it does seem to be linked to whether the application is 64 bit or 32 bit. You can watch the icon for the Input menu change when you switch applications, and when you go to pick a layout some of them are now grayed out.

e.g. British, British - Windows - 2, and windows-uk are all available in Firefox (32 bit). Only British and windows-uk are available in Terminal (64 bit). The windows-uk layout is almost usable apart from the backslash. Grrr! :)

Does anybody else have a problem with Snow Leopard and British English keyboards?

I found this FWIW, which doesn't seem to be correct, I've a Mac Mini 2009 and a far as I'm aware it's running the 32 bit kernel, Microsoft implies that the problems exist only with 64 bit kernels, but it seems it also causes trouble with 64 bit applications and libraries.

'IntelliType Pro and IntelliPoint for the Mac version 7.0 is compatible with the 32-bit version of Mac OS® X 10.6 (Snow Leopard™). Microsoft Hardware is developing a 64-bit compatible version. This version will be available on or before 10/2/2009. While in 64-bit mode, only basic device functionality will be available.'

I'm going to complain to Apple that they still haven't fixed this most elementary problem.

If anyone else has problems, or alternately everything is working fine, please reply.

Posted by G Webb on 28 August 2009, 2:59 pm Link

@G Webb, I have the same issue. The problem is related to whether the application you are using is running in 64-bit mode and therefore which core OS libraries it's using. Unfortunately, as soon as you use a 64-bit application, the language reverts to British and stays at that setting. I've reduced the problem by forcing my frequently used applications to start in 32-bit mode: right-click on the application icon and choose 'Get Info'. In the 'General' section under the label colours is a check box for 'Open in 32-bit mode'. This reduces the number of opportunities for the input source to change. However, the Finder runs as 64-bit and when I tried starting that in 32-bit mode other applications started behaving very oddly, some even refusing to start, so I was never able to go 32-bit only and 'solve' the problem.

Thanks for the info on Microsoft's update schedule, I missed that when I looked at their update page previously. October can't come fast enough!

As for Apple fixing the problem, that's not entirely correct. They changed the way kernel drivers have to be written for 64-bit which is why Microsoft have to release an update for their hardware. That's not to say it wouldn't be nice for there to be built-in support for a 'British - PC' default language to use with UK keyboards...

Posted by LMOP on 4 September 2009, 10:39 am Link

@G Webb, my original comment has been deleted for some reason. [Sorry, I've managed to restore it. Phil.]

Until Microsoft release their update you can get 64-bit British keyboard layouts here: liyang.hu/osx-british.… . Note that you have to unzip the file and put the contents of the extracted folder, not the folder itself, in '/Library/Keyboard Layouts'. 'British (PC 105)' maps to my Microsoft Natural Keyboard 4000.

Posted by Laurence Passmore on 4 September 2009, 10:58 am Link

Hi Laurence.

I came back here to see if there were any replies, but at least to leave my latest findings, I too found that link and am using the layout you mention. It doesn't help with all the extra media type keys, but it'll do for now. Well done Liyang Hu.

It seems that .keylayout files work in 64 bit and 32 bit apps, but the .rsrc files don't. I guess that the 64 bit libraries only support the former method, and that the .rsrc way of defining layouts was deprecated at some time in the past.

Phil Mcsween

One other link I found that I'm not using but might help others.

UK.keylayout for Mac OS X 10.2 or higher
by Matt Sephton
www.gingerbeardman.com…

Thanks for letting me know that it's not just me Laurence, and thanks also to Phil whose blog is the best source of information regarding this issue that I've found.

Posted by G Webb on 5 September 2009, 3:09 pm Link

Hi guys, I just upgraded to Snow Leopard and got very annoyed that my British - Windows - 2 layout stopped working.
Using a combination of windows-uk and Ukulele, I have created British - Windows - 3, which has the keys arranged in the same way as British - Windows - 2, except it works in 64 bit and doesn't revert to the British layout when you press capslock.
You can get it here, uncompressed. You may wish to upload a compressed version to your site.
Enjoy!
files.me.com/mwaness/3…

Posted by Lexi on 15 September 2009, 9:56 am Link

Wonderful, thanks Lexi. I don't have Snow Leopard yet -- could one or two other people confirm that Lexi's file does the job, then I'll add it to the main part of this page.

Posted by Phil Gyford on 15 September 2009, 10:09 am Link

Hi,

Thanks for all the info - just Lexi's layout with my shiny new Snow Leopard Mac Mini and my DiNovo Edge Logitech keyboard and now my ' and @ are in the right place - hurray!

Thanks,
Chris

Posted by Chris Kimpton on 16 September 2009, 8:05 pm Link

I can confirm that Lexi's layout works with my Kinesis Advantage keyboard and Snow Leopard. A great relief! (Thanks)

Posted by Michael Foord on 19 September 2009, 1:41 pm Link

Well Microsoft have released IntelliPoint 7.0.1 which is described as: 'IntelliType Pro and IntelliPoint for the Mac version 7.01 is compatible with the 32 and 64-bit version of Mac OS® X 10.6 (Snow Leopard™). Please use the drop-down menus below to get the appropriate software for your mouse or keyboard.'.

Don't bother. First, you can't actually get to 7.0.1 from the drop down menu (for the Natural Ergonomic Keyboard 4000 at any rate) - it directs you to the previous version 6.x.x because 10.6 is not listed as a valid operating system (in fact, nor is 10.5). Second, when you can find it:

it's labelled as Microsoft-Mouse-d260.dmg; the installer is called 'Microsoft Mouse Installer' and the file is labelled as version 1.0. Hmm. Anyway, if you run it, the blurb confidently declares that it is in fact 'Microsoft IntelliPoint and IntelliType Pro 7.0.1 Software for Macintosh'. However, it only updates the mouse driver to 7.0.1 - it does NOT install a keyboard driver at all.

So in short, as a rollout it's a total botch. Files are difficult to find; files are labelled incorrectly both internally and externally. Microsoft keyboard support for 64-bit 10.6 is still non-existent as far as I can tell.

Posted by Laurence Passmore on 6 October 2009, 10:53 am Link

Thanks! Looks like this will work great for my sister. She just came back from her vacation and is unfortunately having to use a UK board right now until she gets a new one. I hope it works!

Posted by XP Drivers on 13 October 2009, 11:48 pm Link

Thanks Lexi - I've put a gzipped copy of your layout here, and linked to it from the top of the post: www.gyford.com/phil/wr…

Posted by Phil Gyford on 22 October 2009, 1:16 pm Link

Just posting to say thanks for British - windows - 3, using it with Snow Leopard now. @' ~#@:; :)

The info on this page has been a major help in getting my Logitech EX110 keyboard more to my liking, however there was still one last bugbear to fix after I installed british-windows-3.keylayout. The key between left-shift and z was outputting backquote and ¬ when it should have been doing backslash and pipe, and the key to the left of 1 was doing the opposite.

Examining the file, it seems that the code 10 and code 50 values were swapped around from what they should be for this keyboard, so if anyone else has the same problem, you can try editing the file accordingly in a text or XML editor, or use this Unix sed command to create a new keylayout file:

I have tried to make use of the latest software from both Microsoft (7.01) and Logitech (3.1) on Mac OS X 10.6. As people have found out above even these latest offerings released after Snow Leopard don't provide 64bit capable keyboard layouts.

My solution, which may help others who want layouts other than the British layout linked here, is to update the layouts provided by Microsoft or Logitech as follows:

1. Install the Microsoft and/or Logitech drivers
2. Right click on the /Library/Keyboard Layouts/*.bundle file and Show Package Contents
3. Find and move the *.rsrc file out of the bundle into an emtpy folder
4. Download Apple Font Tools Release 3.1.0 from the Apple webite
5. Install or extract the klkchrtoxml executable. This is in 'Apple Font Tool Suite 3.1.0.mpkg' -> 'Keyboard Tools.pkg' -> 'Archive.pax.gz'
6. At a command prompt run this application with the name of the .rsrc file as the parameter and it will extract and convert the .rsrc file into .keylayout and .icns files
7. Move all of the .keylayout and .icns files back into the bundle where the .rsrc file was
8. Reboot

I prefer the Microsoft British layout to the Logitech one because it does not assume that you want to compose characters when pressing ` or ~.

Now we just need Microsoft and Logitech to do this for us in the next versions of their software...

Posted by Andrew on 18 November 2009, 12:11 am Link

I've got a new mouse so I thought I'd see if Microsoft have a new driver and whether or not they've sorted out the keyboard issues. I also came back here for a quick look to see what is the latest state of play.

Anyway there's now a 7.1 (d270) disk image. Great, surely Microsoft have now sorted out all the problems? I'll install that, what could possibly go wrong?

I installed the desktop (mouse and keyboard) driver and I restarted my Mac. My keyboard (Natural 4000) stopped working. I wasn't even responding to things like the caps lock. I tried sleeping, restarting, shutting down, unplugging and hot-plugging the keyboard. Nothing would get it to respond. So I plugged in another non-MS keyboard which worked and ran the un-installer for IntelliType.

Now I didn't check whether a driver was really installed, as Laurence mentions up page, but anyway the un-installer at least got rid of the problem that was stopping the Natural 4000 from working, and I'm back to using Liyang Hu's PC 105 layout.

So if you try 7.1 IntelliType be careful, you might need another keyboard to hand or a way of remotely logging in and running the un-installer to get back to normal operation.

Posted by G Webb on 29 December 2009, 11:12 am Link

Argh, just got a new Mac Mini with 10.6 remembered the earlier hoopla about British layout. The Windows-3 keylayout doesn't work at all for me, when I switch to it, no keys can be typed at all.

Posted by perry.ismangil.com on 19 January 2010, 9:16 pm Link

Ok, panic over. Forgot to logout! #~ `¬?/@' (not swearing, trying the keys out!)

Posted by perry.ismangil.com on 19 January 2010, 10:05 pm Link

A minor gripe here - don't refer to them as 'British Windows' keyboards. The correct term is simply 'British Standard' (see British Standard BS 4822). It is *Apple* that have the nonstandard keyboard. Their UK keyboard is more an American layout with some things moved about.

In any case, thanks for the info. I routinely work across Windows (and Linux) and the Mac, and it is annoying to switch layouts. In addition to this, i hate the Apple keyboard, and have a 'PC' one connected to my iMac.

Thanks, worked relatively well. I'm trying to create a layout for my hackintosh, but I can't seem to get it working with Ukulele? Do you know of any tutorials?

Posted by Stephen on 23 March 2010, 12:05 am Link

I've come to this site trying to get my UK keyboard to work correctly with my Mac mini. I've downloaded the british-windows-3-1.keylayout file but can't open it. There's nothing in Mac help about zipped files. Is there a special unzip programme for Macs?

Posted by Karol Gorny on 25 June 2010, 7:18 pm Link

Zipped files usually just unzip automatically, particularly if you download them with Safari. You could use Terminal to do it if you know you way round a command line, otherwise try Googling for Mac unzip tools I guess...

Posted by Phil Gyford on 25 June 2010, 8:15 pm Link

This worked for me aswell thanks a lot.
One quick question, as i work within a school and our Apple Macs are joined to a Domain, is there anyway you know of that we can push it out for all users instead of just the stand alone users?

Many Thanks

Dan

I don't know anything about that kind of thing I'm afraid, sorry.

Posted by Phil Gyford on 20 July 2010, 3:01 pm Link

Thanks for the response.
Is it possible to apply the settings globally, so that it applies to every user that logs in to the mac, and not just each user as we are in a multi user enviroment?
Thanks again.
Dan

Dan, rather than put the layout file in ‘/Users/yourname/Library/Keyboard Layouts/’, try putting it in '/Library/Keyboard Layouts/'. That might do the trick.

Posted by Phil Gyford on 21 July 2010, 8:43 am Link

It keeps changing back to the normal British keyboard layout when I click on some applications. I cannot disable this standard British one it is greyed out. How do we KEEP the British Windows 2 layout always?
Thanks

Posted by Steve on 14 September 2010, 4:39 pm Link

Cheers I’ve been running the patched OSx86 on my PC, and the keyboard layout was vdoing my NUTT IN! But things seem to work fine know, thnaks to you!

Posted by Damian Brauer on 12 October 2010, 3:42 pm Link

Am having same problem as Steve, i.e. it seems to default to the standard British keyboard which is greyed out and can not seem to be disabled. Any help appreciated! Thanks

Posted by Jacob on 30 November 2010, 6:26 pm Link

Hey,

Have just bought a new mac mini Snow Leopard 10.6.5. I'm having the same problem. I can install new layouts and select them but it doesn't fix the @' mapping problem. There is a british one that is greyed out and always selected too, might be an issue?

Help! Thanks!

Posted by Alex on 14 December 2010, 10:59 pm Link

Hi there,
Just want to say this has been brilliant for using my wireless Logitech MK250 desktop with my Imac. Does anybody know how I can get a CD/DVD to eject using a windows keyboard with a mac?

Posted by Jason on 30 January 2011, 10:00 am Link

Brilliant - this has helped me no end! No more frustrations with my keyboard.

Posted by James on 3 February 2011, 11:43 am Link

Dear Phil, Thank you so much for this I have been searching for ages to find a solution!

Posted by John I McNeilly on 20 April 2011, 11:55 am Link

Brilliant!

Took a restart to get Safari to work with the new layout, but otherwise no problems.

Good clear instructions - thanks!

Neil.

Posted by Neil White on 28 May 2011, 7:46 pm Link

Good call!

cheers Andy..

Posted by Andy jones on 24 July 2011, 10:55 pm Link

TYVM, I got my trusty old Sun Micro. USB Keyboard to work properly on the iMac '@ 2' :-)
the iMac keyboard looks nice but I've recently realised that it is painful for actually typing any thing !
i.e. actually doing useful work LOL ;-) cheers.

Posted by Simon on 10 September 2011, 7:23 pm Link

Commenting is disabled on posts once they’re 30 days old.