Change tilde key to "j" key using Scancode Map

2

1

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.

Blomkvist

Posted 2011-05-11T12:29:19.553

Reputation: 2 379

Answers

1

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

http://webpages.charter.net/krumsick/

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:

http://www.techrepublic.com/blog/window-on-windows/how-do-i-remap-my-keyboard-with-keytweak/861

yosh m

Posted 2011-05-11T12:29:19.553

Reputation: 2 048

Thanks for the links, Yosh. I'm sure KeyTweak would work but I'm looking to do this manually. – Blomkvist – 2011-05-11T12:59:10.683

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 – 2011-05-11T13:05:53.227

1

Oops - should have mentioned the HEX values: 29 and 24 respectively. Take a look at http://www.ee.bgu.ac.il/~microlab/MicroLab/Labs/ScanCodes.htm for a full list of scan codes. Also in PDF at flint.cs.yale.edu/cs422/doc/art-of-asm/pdf/APNDXC.PDF

– yosh m – 2011-05-11T13:11:29.500

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: http://msdn.microsoft.com/en-us/windows/hardware/gg463447.aspx

– yosh m – 2011-05-11T13:19:50.373

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 – 2011-05-11T13:27:34.957

2

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)

EE = BB

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

Blomkvist

Posted 2011-05-11T12:29:19.553

Reputation: 2 379