Re-mapping CapsLock on Windows, Linux, and OSX

I consider myself a wholehearted proponent of the righteous war against the nefarious CapsLock key. Here is how you can go about fighting the good fight on your local turf; be it Windows, OSX, or Linux.

Windows 7

As usual, Microsoft has forced us to endure the depths of the system registry in order to get our way. The following registry edit will re-map your CapsLock key to Ctrl:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

Toss the above into a file ending in .reg. Double click the file to apply the change, then reboot. Your CapsLock key is now an extra Ctrl key. Simply delete the key from the registry to undo.

You’ll notice that I set this in the Local_Machine tree. I attempted to use Current_User, but it didn’t seem to work. I’m looking for any input from some Windows gurus on what I am missing here.


On the other side of the spectrum, CapsLock key behaviour in OSX can be modified from a GUI. Open the “Keyboard & Mouse” panel in your System Preferences, and click on the “Modifier Keys” button. From here, you can remap CapsLock to another key.


If you are using Ubuntu, you can navigate to System->Preferences->Keyboard->Layouts->Options. From here, you can modify the CapsLock key behaviour. In order to make CapsLock an additional Ctrl key, check the options under the “Ctrl Key Position” tree.

If your distribution does not have a GUI to change this, you can simply change it by hand using xmodmap:

xmodmap -e 'remove Lock = Caps_Lock'
xmodmap -e 'keysym Caps_Lock = Control_L'
xmodmap -e 'add Control = Control_L'
Share and Enjoy:
  • StumbleUpon
  • Facebook
  • Twitter
  • Reddit
Re-mapping CapsLock on Windows, Linux, and OSX

2 thoughts on “Re-mapping CapsLock on Windows, Linux, and OSX

  1. Gniourf says:

    Beign a heavy vim user, I remapped CapsLock to the Esc key… but the message is still “We don’t need a CapsLock key at all!”.

Leave a Reply

Your email address will not be published.