Andy's Blog

Tutorial: Remapping a US Keyboard in the UK (Windows)
30/11/11

Lots of countries have their own keyboard layout so that they can cater best for what their residents are typing. Some more dramatically different than others, the US QWERTY layout is very similar to the UK QWERTY layout, with a few subtle differences. This means that is not uncommon for us English folk to find ourselves using a US layout board. Indeed, I’m typing this on a US keyboard right now. Although not that different, it can cause some confusion, this post will guide you though the process I used to remap my US keyboard to get the most out of it.

When using a US keyboard you have four options:

1 Learn to use it use it in US mode. This works great (all the keys do what they say) until you want to type a £, then you have issues.

2 Use it in UK mode. This works pretty well as long as you’re happy with some keys not doing what they say. But you may fall apart at the complete absence of the backslash (\) or vertical pipe (|) key.  If you have no idea why you’d want these, go ahead and uses this.

3 Set Widows up to switch between UK/ US keyboard modes on a hotkey so you can switch language if you need to type a missing key. Works well, but is a bit of a fiddle to keep switching.

4 Use the free Microsoft Keyboard Layout Creator tool to make your own custom layout. This works really well as long as you can remember how your keys are modified.

This tutorial will guide you, step by step, through the process of making your very own hybrid layout that can type everything you need. First things first, lets familiarise ourselves with the differences:

  • The backslash key moves up to above the return key
  • The double quote (“) swaps places with the at (@) symbol
  • The pound sign (£) symbol is replaced with the hash (#) symbol (confusingly this is often called the “pound symbol” outside of the UK)
  • The broken vertical pipe (¦) and tilde (~) symbol moves up and replaces the ¬ symbol

The changed keys are marked in orange in the bellow pictures:

A UK Extended Keyboard

A US International Keyboard

 

Most of these changes are pretty simple, put your keyboard mode to UK and they will re-gain their correct (ahem) position, albeit with a different symbol written on the keyboard. The biggest problem is the complete absence of the backslash key.

My solution to this was to completely remap that key onto the UK hash key (occupying the backslash slot, above the return key, on a UK board) so that we have the following characters assigned to the same key:

  • Primary: #
  • Secondary (Shift): ~
  • Ternary (Alt Gr): \
  • Quaternary (Alt Gr + Shift): |

You can think of this as the key behaving normally (# and ~) until the Alt Gr key is pressed, when it takes on the role of the other key (\ and |). Of course, there are other mappings you can change if they make more sense to you – you could take a US layout and put the £ symbol on Alt Gr + 3 if you like, I just liked this one.

To achieve this remapping we use a free Microsoft program called the Microsoft Keyboard Layout Creator. Here’s how you do it:

1 Download and install keyboard creator

2 Start keyboard creator and click File>Load Existing Keyboard

3 Select United Kingdom Extended

4 Double click on the “#” key on the onscreen keyboard, then click the “All button”

5 Now enter “U+005c” (without quotes) into the “ctrl+alt+<key>” box (ctrl+alt is the same as alt gr) and “U+007c” (without quotes) in the “shift+ctrl+alt+<key>” box, as shown below:

6 Hit OK (Why does this have a step to itself?)

7 Click Project>Properties, and give it a (very short) name and description

8 Click Project>Build DLLs and setup package. Save it to a easy to find location

9 Now find the files your just created and run setup and install the new keyboard

10 Finally, now you have the keyboard installed you need to tell windows to use it. Go to control panel > Change keyboard or other input methods. Click on the “Keyboards and languages” tab, then on the “Check keyboards…” button.

11 In the drop down box, select the name of the new keyboard you just installed.

12 Hit “OK” and reboot your computer. You’re done!

If you can’t be bothered with all the that, you can download both the source Keyboard Creator project or the compiled installer (Disclaimer: both of these are provided “as is” with no warranty or guarantees. You use them at your own risk. I take no responsibility for any direct or indirect consequences of using these files. Thanks).

Good day!

Share This


Author Profile Picture
Posted by Andy on the 30th of November, 2011 at 9:00 pm. Filed under Blog Post, Misc/ Random, Technical, Tutorial. Replies can be followed via the response RSS feed. Or you could leave a comment.
Advertisement
Looks Like you have an ad blocker installed. Frowny face.

Comments

Profile Picture

john landaw

(September 2nd, 2013 at 3:16pm)Reply

This changed some of the keys attributes but as I do not have alt gr key could not access that backslash!

Any help out there?

John

Profile Picture

Andy

(September 2nd, 2013 at 10:25pm)Reply

Some keyboards will, rather than having an "Alt" and "Alt Gr" key, will just have two alts. In this case, the Alt Gr key is the one to the right of the space (it is Alt Gr, it just has something else written on it).

If you have a small keyboard that only has one Alt key, you'll probably have to get creative and use the steps here to set a different key as your modifier. You can always revert back to your order keyboard layout in control panel, so a bit of experimentation may be in order.

Profile Picture

Dan

(August 13th, 2013 at 12:12pm)Reply

Thanks, that was exactly what I was looking for... I missed the \ key on my laptop's keyboard! Nice to have it back.

Profile Picture

David

(August 2nd, 2013 at 9:25am)Reply

Excellent. Was driving me crazy that I couldn't have the keyboard just as I wanted.

Profile Picture

Mike Pelton

(June 13th, 2013 at 10:18pm)Reply

Great piece - many thanks. Just noticed in Windows 8 (not tried in 7 or previous) that you can toggle between input languages with Windows Key + space bar, so if like me you have a separate US keyboard (that'll teach me to read the small print) you can flip between layouts very easily.

Profile Picture

dan

(June 11th, 2013 at 7:12pm)Reply

Almost a great guide. Was following along fine until I got to adding it in the panel. Windows 8 has changed the menus and I couldn't find how to add the newly created one. Anyone know how to?

Profile Picture

Andy

(June 11th, 2013 at 10:12pm)Reply

Yup, looks like its a little different on Windows 8 (thanks for pointing that out).

First, install the keyboard layout as described and restart your PC. Once it’s restarted, go to the desktop and put your mouse in the the very bottom left corner of the screen, a little picture of the Start screen will pop up. RIGHT click, this’ll open a little shortcut menu, click on “Control Panel”. Now click “Change input methods” (under “Clock, Language and Region).

Next to where it says “English (United Kingdom)” click the “options” link on the far right. Under “Input method” you should see both your current layout and “United Kingdom Extended - On US International layout” (or whatever you called it when you compiled the keyboard) listed. Click Remove on the old layout to set your new layout as default.

If you want to go back again, you can re-add the old layout by clicking “Add an input method”.

Hopefully that helps. Happy typing.

-Andy

Profile Picture

Furbian

(May 31st, 2013 at 5:13pm)Reply

Thanks, very useful and a good idea to use the Right alt modifier.

Profile Picture

Tim Bushell

(May 16th, 2013 at 9:42am)Reply

Genius. That's like heaven. Hit SHIFT+2 and I get speech marks! :-) I can't believe there aren't more places to find this information - rather than all that waffle about remapping actual keys.

Nicely written article, Andy. Thanks

If you ever need any training, visit the site and mention my name: I'm sure we can get you a great discount on a dev course.

Profile Picture

Tamas

(March 11th, 2013 at 10:27am)Reply

Thanks. I have been looking for it for a while what happens when you attach a US keyboard with UK layout settings.

Profile Picture

Graeme Costa

(March 6th, 2013 at 12:27am)Reply

Hi Andy
Good work !...worked on second attempt... I probably made a mistake on the 1st (he he!)
Regards
Graeme

Profile Picture

Thanks!

(February 19th, 2013 at 9:48am)Reply

Typed on my freshly remapped keyboard! :o)

 

Reply or Comment

Your Name
Your website (if you have one)
Comment (Required)
Commenting requires no personal information, but new comments will be held for moderation for a short period before appearing on the site.