Remap Caps Lock

Another quick tip. It has been said many times before but it bears repeating – how to remap Caps Lock in Windows to something far less annoying.

Caps Lock, apparently a left-over from typewriters where holding down shift required quite a lot of force, is easily the most annoying key on your keyboard. Its uses are very limited, it is often pressed by accident and the effect is significant. So much so that OS password screens display pop-up balloons or similar when it is pressed.

The cure: remap it to Shift. That’s probably what your little finger went over there to find anyway and is the least surprising of the re-mappings available.

Remapping registry edit

Remapping in Windows requires a registry edit. The key is:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map

Change or add “Scancode Map” as binary data:

00,00,00,00,00,00,00,00,02,00,00,00,2a,00,3a,00,00,00,00,00

A restart is required.

The meaning is:

  • first 8 bytes are header information which is unexciting all zeros.
  • The next four is the number of mappings in the data including a null terminator (so in this case 2).
  • The next four is the mapping  made up of two 2 byte words with the key to change to 0x2A (Shift), the second is the key we would like to change 0x3A (Caps Lock).
  • The mapping is followed by a 4 byte null terminator.
  • All words are stored little endian.

The MSDN article with extact details is available at: http://msdn.microsoft.com/en-us/library/windows/hardware/gg463447.aspx

Posted in Tools
One comment on “Remap Caps Lock
  1. Interesting, what a chore windows makes things! It’s also common to remap tab in vim to the escape key so it’s more comfortably in reach.

Leave a comment