Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From time to time I have to use a backup laptop (typically when I forget my power cable like today) but it has a broken "j" key.

What I'd like to do is remap my tilde key to "j" using the scancode map key in the registry but I not certain what hex values would do this. In short, I need to make the following reg file:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:[the hex value to change the accent/tilde key to "j"]

I'm aware of software that can do this for me but I'm a big believer in not downloading and running executables from the internet that fiddle with my keystrokes and/or registry if it can be avoided.

share|improve this question
up vote 1 down vote accepted

Easiest tool I've found for this is the utility KeyTweak - available here:

Provides a nice GUI for making the registry changes you want. I've used it to move a few keys around on my notebook that weren't where my fingers were expecting them...

Here's a TechRepublic overview that may be useful, too:

share|improve this answer
Thanks for the links, Yosh. I'm sure KeyTweak would work but I'm looking to do this manually. – Blomkvist May 11 '11 at 12:59
KeyTweak is also handy for finding the scan codes (use Full Teach Mode - but on a computer with a working keyboard). FYI, ~ is 41 and J is 36. – yosh m May 11 '11 at 13:05
Oops - should have mentioned the HEX values: 29 and 24 respectively. Take a look at for a full list of scan codes. Also in PDF at – yosh m May 11 '11 at 13:11
In re-reading your question, I understand you actually want to learn how to muck around in the registry yourself to change this rather complex value. Personally - I don't recommend that - it's safer to use a tested and reliable tool, like KeyTweak. However, if you really want to get into the guts and create a .REG file, you can learn all about it here: – yosh m May 11 '11 at 13:19
Alternatively, try KeyTweak - you can use its feature to show the Raw Map and see what you need to put there (or just go into RegEdit to see what it created). Be sure to backup your registry before you go diving into it, though... – yosh m May 11 '11 at 13:27

Well I guess since one of the reasons this site exists is to catalog problems and their solutions and since Yosh helped me by giving me a link that may not always work, I figured I'd lay it out. As it turned out I was only off by a single digit.

If you have a broken key in XP and need to swap it out with another, copy and paste the following into notepad:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode map"=hex:00,00,00,00,00,00,00,00,AA,00,00,00,BB,00,CC,00,DD,00,EE,00,00,00,00,00

Replace the letters above with the following:

AA = the number of keys you're going to change +1 (This is why it wasn't working. I didn't count the null )

BB = the hex scan code of the dead key

CC = the hex scan code of the surrogate key

DD = CC (this is really optional it just maps the surrogate back to the dead key)


When you're finished, save it as whatever.reg, double click it, then reboot.

So in my situation it looked like this:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,24,00,29,00,29,00,24,00,00,00,00,00

And voila, I've got jjJJJjjjjjJJJj's again

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .