How to Remap the CapsLock and Escape Key in Windows

This hack can help anyone use their keyboard more efficiently. Usually power users want to remap the CapsLock and Escape keys in Windows. If you think about it, it can be useful to pretty much everyone. Think about how often you actually use your CapsLock key compared to the Escape key. Now think about how far you have to reach for each of those keys. The CapsLock key is by far, much easier to reach. So the logical solution would be to swap them! If you’re running Windows 7, 8 or 10, this will work for you.

Once you start swapping keys, the options are endless. Any key could be swapped. But we’re just going to look at a couple of options. If you find this article helpful or are wondering about another set of key combinations, please let me know in the comments.

Swap Esc and CapsLock Keys

These are probably the most commonly remapped keys. Especially among users of the text editor Vim, popular among power users. Use the following steps will remap the CapsLock and Escape Keys in Windows. After completing these steps, when you press the Escape key, it will enable/disable caps lock. When you hit the CapsLock key, it will trigger escape.

  1. Copy and paste the following snippet into a text editor.
    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,3a,00,01,00,01,00,3a,00,00,00,00,00
  2. Save it to a file named `swap-esc-caps.reg`.
  3. Open the start menu and search for “Regedit” (click “Yes” if any dialog appears)
  4. Click on “File”
  5. Click on “Import”
  6. Select the file you have just saved (i.e. ‘swap-esc-caps.reg’)
  7. Log out and then log back in for the changes to take effect. Sometimes a full restart is required.
  8. Start using your keyboard more efficiently!

Map CapsLock to ScrollLock

This option basically gives you two escape keys. After following the instructions below, your Escape Key and CapsLock keys will act as an escape key. Your ScrollLock key will now toggle CapsLock.

  1. Copy and paste the following snippet into a text editor.
    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,3a,00,46,00,01,00,3a,00,00,00,00,00
  2. Save it to a file named `swap-esc-caps.reg`.
  3. Open the start menu and search for “Regedit” (click “Yes” if any dialog appears)
  4. Click on “File”
  5. Click on “Import”
  6. Select the file you have just saved (i.e. ‘swap-esc-caps.reg’)
  7. Log out and then log back in for the changes to take effect. Sometimes a full restart is required.
  8. Start using your keyboard more efficiently!

This guide shows you just a couple of remapping options. If you’re interested in more, take a look at this article for Vim users. It provides a few other key mappings which you may find helpful. I chose not to include them here since there is a very small group of people who would want to use them. But if you’re getting into remapping keys. It will prove useful.

What do you think?