SharpKeys: Monday, January 26, 2004 at 12:39 PM by Randy
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:
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:
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 randyrants.com 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...
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.
Posted on: February 02, 2004 at 11:51 AM by Andy F
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
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'.
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.
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
webpage
Nothing worked so far... Any help appreciated.
I am running 98SE, might this have any impact ?
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 :)
Posted on: March 01, 2005 at 12:19 AM by Gertrud IV
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 ? ;)
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.
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
Posted on: November 13, 2007 at 06:42 PM by Shrishti
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 ??
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?
Posted on: November 23, 2007 at 05:34 AM by Enrico
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...
Thanks
Posted on: December 11, 2007 at 02:24 AM by stephan
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):
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.
The views expressed on this web site are mine, and mine alone. They do not reflect the views of anyone else, including my employer, and they are not endorsed or approved by anyone other than myself: my opinions are of my own design.