Keyboard Remapping: Part II

A while ago, I discovered a blurb about how keyboard remapping would allow me to disable the Caps Lock on my keyboard, without having to use a special keyboard driver, provided I was using Windows XP or Windows 2000. On my desktop I usually have a Microsoft keyboard, so I can use their driver, but on my notebook(s) I didn’t had that option – in fact, with keyboard remapping, I was able to make the Caps Lock key act like a Shift key, which seemed even better. Now that I have an IBM ThinkPad – which does not ship with a hardware based Windows or Application key – I’ve had to take this remapping stuff to the next level.

First off, if you’re planning on doing this, start with the original post before attempting anything custom. That’s a good way to get started and from there you can attempt the more advanced mappings. Also, if you are uncomfortable with mucking with the registry, don’t! Find someone in your office that is very comfortable with it and show them this page; you’ll be much better off in the long run… even thought this remapping bit shouldn’t crash Windows if done wrong, it might disable your entire keyboard which would [be pretty funny but also] annoying.

Back to business. IBM included a nifty little utility they call Keyboard Customer which did all of this for me from a graphical UI. This was great until I started looking at task manager: it was loading the utility three times – once as a Service, once as a SYSTEM process, and once as a USER process. The problem with this, besides making my Alpha-Geek hackles rise in protest, was that depending on which one got loaded first, my defined mappings would get lost. I fixed this problem by turning off the EXE that was running as a Service, but I still wasn’t thrilled about it.

What I wanted the keyboard to do was the following: a) map Caps Lock to the Left Shift key, b) map the Right Ctrl key to be a Windows key, c) map the Right Alt key to the Applications key and, d) turn off the Back/Forward buttons. The problem that I originally saw with this was trying to figure out what the scan codes were for the keys in question. When I went to Microsoft to look at their scancode listing my head spun around, twice. Scan codes, break codes, modifiers for the keys in question… bah! Then I found my ray of hope on a page from Jim Hope: he was mapping a Stop button on an old ThinkPad to the Windows key. That was all I needed to get my own mapping done: a working example.

On the Microsoft scan code listing, only pay attention to the scan code – ignore the break code for this task. Also, if the code for a key is E0 5B (which what the Windows key is) it will go into the editor as 5B E0. And so, open RegEdit.exe, navigate to the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
You may, or may not see the REG_BINARY value of Scancode Map on the right hand side. If you don’t have one, create one, but make sure it’s REG_BINARY. Into this you will enter a string of Hex based numbers telling Windows what you want to remap. The order is as follows – anything that follows a // is a comment and should not be typed.

00 00 00 00 00 00 00 00
// This is required by Windows – it will always be 0’s

06 00 00 00 2A 00 3A 00
// the first word is the number of remappings you are going to use, plus the null terminator; I have five mappings plus the null, hence the 06 00 00 00. The other word of 2A 00 3A 00 is the first remapping of the key itself – caps lock’s scancode is 3A (shown as 3A 00) and that is mapped to the left shift key (scancode 2A, shown as 2A 00). This is always in the form of “Target key, Key to Remap”.

5B E0 1D E0 5D E0 38 E0
// the first word remaps Right Ctrl (E0 1D) to Windows keys (E0 5B), the second word remaps Right Alt (E0 38) to the Applications key (E0 5D)

00 00 6A E0 00 00 69 E0
// the first word turns off the Back button (E0 6A) but point it to nothing (00 00), the second word does the same to Foward (E0 69).

00 00 00 00
// This is the null terminator that is required – always 1 word and always all 0’s.

If using an IBM ThinkPad, uninstall the Keyboard Customizer (or turn it off). Then reboot and you’ll find that the the keys are remapped. For the specific setting described above, with all five mappings, you can copy this text:

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,06,00,00,00,2a,00,3a,00,5b,e0,1d,e0,\


into notepad, save it as an .REG file and run it. I included the explanation for people that want to make other keys to other things, so good luck to all!

Also, please insert any obviously required disclaimers about you doing this at your own risk and isn’t responsible for any mishaps of any kind, etc., etc., etc. – it’s just still common sense to me, but some people seem to think it’s required…

31 thoughts on “Keyboard Remapping: Part II”

  1. Yes, I suppose that pretty much sums up what I was feeling. Interesting way to put it, but brazenly truthful and upfront, no?

    I never knew you read my page…:o)

  2. You’ve got a typo above. in the comments about the size word you list 04 00 00 00, but I’m sure you meant 06 00 00 00 which is what you had put in the actual registry.

  3. Hey i just bought an illuminated keyboard and i love it, but the only thing is that the home key is right next to the backspace key and every once in a while i hit the home key and it ruins everything. im sure i could have bigger problems, but its quite frustrating.

    if you could tell me how to edit my registry so that the home key functions as a delete key in addition to my standard delete key that would be great. thanks

  4. @Andy – check the SharpKey’s application: it should have what you need. (Click on SharpKeys on the menu at the top right of this page)

  5. Can the above be used to map combining keys?

    I want to combine accent keys to form Sanskrit

    letters — like the US international keyboard,

    it allows pressing á (accent, and then a), and

    it combines them into 1 char. I need to add

    some for Sanskrit for words like ” Prāṇā” (That’s

    supposed to be long a’s and a dot under the ‘n’.

    Is the above a way to create combining keys?

    Is there a more standard way to do this?


  6. Combining keystrokes is sorta beyond what the XP-based key remapping setting is for. If there was one key on the keyboard that did this, it might be possible, but there’s no way for this particular setting to map say “X” into being “Ctrl+Shift+X”… just to be sure I would try SharpKeys, which is downloadable via this site.

  7. I followed your instructions step by step but couldn’t get to any result so

    far = (

    If i am getting to

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

    i see only the empty Default key.

    I tried

    – to create a key called ‘Scancode map’ into String format containing the

    exact string onto your webpage as a start

    – to create a key called ‘Scancode map’ into binary value format containing

    the exact same HEX numbers that the ones onto your webpage as a start

    – To do the same two steps under the

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\00000C0C

    since my machine uses the French Canadian keyboard and i though maybe you

    forgot to mention to put it there

    – to create a key called ‘REG_BINARY’ in both formats as mentionned

    previously because i though maybe that was the name to give to the key

    – To create a .reg file with the exact cut-n-paste of what i found onto your


    Nothing worked so far… Any help appreciated.

    I am running 98SE, might this have any impact ?

    Thank you verry much !

  8. Yeah – it’s only supported on Window 2000 and above. Win9x ignored the setting entirely. If you do switch to 2K/XP/2003, I also recommend using SharpKeys – it does all the mapping for you :)

  9. Games want to disable two buttons close to the keys they use constantly: Left Windows and CAPS LOCK (lwin makes gamer end up in…Windows and CAPS LOCK…DO I LOOK ANGRY ? ;)

    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,00,00,5B,E0,00,00,3A,00,00,00,00,00

  10. It works fine for me, but I’ve noticed that (in my Thinkpad) there is always one key (different every time I restart) that is missing (not functioning). Sometimes I don’t even bother cause it is F9 for example, but it has been the alt key, tab, “A”, etc.

    I remapped left control as windows logo key.

    Any help or comment would be appreciated.

  11. Can you help. the follwowing keys have swapped places ” and @

    How can i swap them back


  12. Grab a copy of SharpKeys and you should see the registry key that you’ll need to delete.

  13. See the FAQ: You can’t use this program to change key behavior – you can only move the entire key at once.

  14. Ahhhh, finally I can be productive on my laptop keyboard!!! Thank you so much. What a concise and clear explanation — I had my windows key successfully mapped on my previous Lenovo, then Lenovo squeezed in a real windows key on my new laptop, but the home and end were relegated to function keys — annoying.

    I remapped to right alt and right ctrl to home and end resplectively —

    “Scancode Map”=hex:00,00,00,00,00,00,00,00,03,00,00,00,47,E0,38,E0,4F,E0,1D,E0,00,00,00,00

  15. hey there… can anyone please tell me how i can fix the keyboard buttons “home ” and ” end”. They seemed to have swapped in MS word.

    If i press “home”… it takes me to the end of the paragraph and when i press “end”, it takes me to the start. Its quite annoying ! can anyone please help me out with this ??

  16. Can’t fix it for Word specifically – the remapping that is being talked about here will remap it for everything. I’d check the options in Word – maybe you’ve accidentally remapped something?

  17. How can i map an IBM R51e Keyboard to use the www back and forward buttons as WinKey and menu?

    I used a scancode utility but it only show the code 57450 and 57449…


  18. hey thanks, the back and forward browser keys were really anoying…

    this deactivates the lenovo browser forward/backward keys (above the left/right arrow key):

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]

    “Scancode map”=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,6a,e0,00,00,69,e0,\


  19. Hey all, if you need a free and VERY EASY to use keyboard remapping tool that functions without having to do registry manipulation, geek talk and all that stuff, you can get it from my site above.

  20. I tried such a mapping on a WinXP Home system with an multimedia keyboard (USB or PS/2, no special drivers). I used “KeyTweak” to generate the registry entries and they seem to be correct.

    Unfortunately the “Scancode map” is completely ignored! (Yes – I did reboot the machine;-)

    Are there any restrictions to know?

  21. Is there any way to get SharpKeys to recognize the “alt” key (also known as the “option” key on the Apple Keyboard that I want to turn into the “Command” key” on the keyboard. The program can’t seem to sense when the “alt” key is pressed.

  22. Hey!

    How do i disable both the Insert key and delete key in scancode map??? .. i never use thoose keys and i need to disable them..?

    I’ve currently only got the two code, but individualy, not but together. could someone help with this???


  23. I now have XP on my IBM T42 with [backwards] and [forwards] keys mapped to something much more useful. I got a bit sick of accidentally pressing the [backwards] key only to have my webmail client send my unsent new email into a deep black void.

    Thanks to all who posted on here for pointing me in the right direction. Tried and tested and it works! Woohoo indeed!!!!

    So [backards] = [WindozeStart(R)]

    and [forwards] = [applicationconext]

    00 00 00 00 00 00 00 00

    03 00 00 00 5B E0 6A E0

    5D E0 69 E0 00 00 00 00

  24. This is my first visit here, but I will be back soon, because I really like the way you are writing, it is so simple and honest

Comments are closed.