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 LayoutYou 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]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…