Re-Map any key on keyboard (Microsoft Windows)


To totally unlock this section you need to Log-in


Login

If you are tired of the way certain keys on your system work, such as the Caps Lock key, you can re-map them to function as a different key by using a registry hack (see below). But there should be an easier way, right?

This is where SharpKeys comes into the picture: It’s a small utility that will let you easily map one key to another key easily, or even turn the key off, without having to enter the registry at all.

For instance, we used the key mapping to just turn off my Caps Lock key, since we never use it.

Note that we’ve tested this in Windows 10, Windows 8, Windows 7, and Vista, and it works fine in all of them in our testing.

Re-Map any key on keyboard (Microsoft Windows)

You can click the Add button to bring up the Add New Key Mapping dialog, where you can either select the keys to map from the lists, or just click the Type Key button and press the key manually (which we find much more intuitive).

Re-Map any key on keyboard (Microsoft Windows)

Once you are done, click the Write to Registry button and you’ll be told to log off or reboot for the changes to take effect.

Re-Map any key on keyboard (Microsoft Windows)

Re-Mapping using Registry Editor

Windows doesn’t have a default setting to allow for disabling the key, so what we have to do is re-map the key to something non-existent so as to completely disable it. To do this manually, you’d open up regedit.exe and browse down to the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

Re-Map any key on keyboard (Microsoft Windows)

Here’s the format of the binary data in the Scancode Map key, with the important parts in bold:

00000000 00000000 02000000 00003A00 00000000

Here’s how it works:

  • The first 16 zeros are just there to waste space.
  • The “02” in bold represents how many keys you are going to re-map plus 1. (It really represents the length of the data, but whatever)
  • The bolded “0000” is the key we actually want Windows to map TO, which in this case is nothing, or 0.
  • The bolded “3A00” is the key we are mapping from, in this case the caps lock key.
  • The next 8 zeros are there to waste space as the null terminator.

You can map between multiple keys by incrementing the “02” and then adding another of the colorful bold blocks in the middle. The 3A00 in the mix is the scan code. For example, if you wanted to disable the caps lock key and then change scroll lock into a caps lock key:

00000000 00000000 03000000 00003A00 3A004600 00000000

It might seem complicated, but it’s really fairly simple once you start working with it.

Somw downloadable examples

Now that you’ve learned how these things work internally, you can download and extract the zipfile which contains the following files:

  • ChangeCapsToControl.reg: Changes Caps Lock to be a Control key.
  • ChangeCapsToShift.reg: Changes Caps Lock to be a Shift key< ./li>
  • SwitchCapsToScrollLock.reg: Disables Caps Lock and swaps Scroll lock to be Caps Lock.
  • KillCapsLock.reg: Disables Caps Lock.
  • DisableKeyboardRemap.reg: Uninstalls the preference by deleting the key.

Once you’ve applied one of these registry files, you’ll have to reboot your computer for it to work. To uninstall, you can use the uninstall registry tweak, or you can simply delete the Scancode Map key entirely.

Download Reg Keys examples

The following section will let you download the Reg Keys examples above listed. You will need to be registered and logged in on HeelpBook to do so. It's totally free.

[wpfilebase tag="file" id="247"]

ScanCode Mappings

The following tables will show you the complete ScanCode mappings for a typical keyboard (click on the images to view an enlarged version):

Re-Map any key on keyboard (Microsoft Windows)

Re-Map any key on keyboard (Microsoft Windows)

Download SharpKeys

The following link is available to downdload directly the program SharpKeys. You will need to be logged in on HeelpBook to download it:

[wpfilebase tag="file" id="246"]