Remapping Caps Lock

I remap the Caps Lock key to be a control key on every computer that I use regularly. Here’s why.

  1. Caps Lock is a nearly worthless key taking up valuable real estate.
  2. I’m more likely to use Caps Lock accidentally than intentionally.
  3. I use the Control key far more often than the Caps Lock key.
  4. The Caps Lock key is in a consistent position on all keyboards but the left Control key isn’t.

Some people swap the Caps Lock and and left Control keys. I prefer to just disable the left Control key. On desktop keyboards, I map the useless Scroll Lock key to act as a Caps Lock key for those rare instances when I actually want to type a long sequence of capital letters.

KeyTweak is a convenient program for remapping a Windows keyboard.

On Linux, you can use the xmodmap utility.The following commands disable the left Control key and turn the Caps Lock key into a control key.

xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "remove Control = Control_L"
xmodmap -e "keysym Caps_Lock = Control_L"
xmodmap -e "add Control = Control_L"

See Dave Richeson’s comment below for Mac instructions.

Related post:

41 dumb things to check

Posted in Computing
14 comments on “Remapping Caps Lock
  1. Bill Casarin says:

    To get more use out of the caps-lock key, I’ve remapped it as another modifier key. It’s a bit more involved but you can make it work in both windows and linux (google ‘home row computing’).

    Some things you can do with setup:

    Global vim-like key bindings
    - Map cap+hjkl to arrow keys
    - Map caps+g to pg-up
    - Map caps+b to ctrl+arrow left
    - Map caps+w to ctrl+arrow right
    - etc

    You’ll never need to use your mouse again!

    Cheers.

  2. John Johnson says:

    Another reason for disabling left-control – I got used to hitting it (and scrunching my fingers) until I used Emacs so much I decided to use the registry hack. I still occasionally reach for the old control key and start typing unintentionally in HHHIN CAPITAL LETTERS.

  3. TwoPi says:

    All netbooks should be sold with KeyTweak preloaded.

  4. Isaac says:

    Heh. I use xmodmap on my EeePC to make the SuperL/Windows key into a modifier key used by my WM.

  5. I. J. Kennedy says:

    I map capslock to control as well. In fact it was the first XP device driver I ever wrote, because I was highly motivated. On the rare occasions I’m on my desktop, I use an old 84-key keyboard, which has the control key where God intended it! Can’t imagine what they were thinking when capslock got moved to its current, prominent position.

  6. Alessandro says:

    In Windows, “the useless Scroll Lock key” is sometime useful: you can get a memory dump file of an otherwise unresponsive system using the scroll lock key; see http://support.microsoft.com/kb/244139

    Then the dump file is useful to diagnose the problem (often due to a bugged device driver) using a debugger like windbg.

  7. I also re-map the Caps Lock key to be the Control key. It is one of the first things I do when I get a new computer. It is very easy to do on a Mac:

    Apple menu->System Preferences->Keyboard->Keyboard tab->Modifier keys

  8. Craig says:

    I just drop caps lock altogether and leave left control as is. So, I have two control keys.

    remove Lock = Caps_Lock
    keysym Caps_Lock = Control_L
    add Control = Control_L

    I’ve noticed that I like using caps lock as control when I edit text in emacs, a time when I rarely touch the mouse and when both hands are generally glued to the home row on the keyboard.

    On the other hand I have found that I like control in its “normal” spot for other tasks. These “other tasks” tend to be more mouse centric. Like editing a photo in gimp or pasting text in and out of my web browser.

    The downsize to all of this is that remapping keyboards really makes your computer, “your computer”, and as such the computer’s of others tend to be much harder to use. I truly realized this when I once tried the Dvorak mapping.

  9. George Crews says:

    As a programmer, I use CapsLock for such things as manifest constants, etc. so a swap makes more sense for me. In Ubuntu Linux, I swap the keys from the desktop menu by selecting System -> Preferences -> Keyboard -> Layouts -> Options -> Ctrl key position -> Swap Ctrl and CapsLock

  10. I’ve been using AutoHotKey to do something similar to what Bill Casarin mentions.

  11. I posted the details of my approach to updating navigational keys in case it is of interest:
    http://jeromyanglim.blogspot.com/2010/07/how-to-edit-text-faster-on-windows-by.html

  12. FreshCode says:

    If you’re ever on a Windows box, here’s a portable app I made to temporarily remap Caps Lock to backspace without rebooting or logging off: http://www.freshcode.co.za/post/Remap-Caps-Lock-Without-Reboot.aspx

    I would be happy to add support for other keys such as Control and Escape if it would be useful to others.

  13. Dov Grobgeld says:

    I’m curious what BIOS version that you used for your eeepc while remapping? I recently upgraded my BIOS on my eeepc 1005HA and since then, remapping stopped working. If I run xev I can see that pressing the physical Caps Lock key inhibits additional scan codes from being sent until Caps Lock is released again. This stops remapping since if no scan codes are produced by the BIOS, you obviously can’t remap them. I have confirmed that my remapping stopped working in both Windows and Linux.

    Since I’m a heavy emacs and shell user, and since I have used the control key to the left of the A-key since the original IBM XT computers, this more or less makes my eeepc useless.

  14. Graham says:

    On my windows machines I have Cap remapped to Delete, and I love it. I’m a writer and i’m constantly changing words and editing articles, having the delete key under my left pinkie makes life easy. However, I ‘m unable to reconfigure this on a Mac, can you please help. The positioning of the delete key on my Air, top corner causes a slow down in my rate of typing.

    Thanks

    GG

5 Pings/Trackbacks for "Remapping Caps Lock"
  1. [...] This post was mentioned on Twitter by John D. Cook, John D. Cook. John D. Cook said: New blog post: Remapping Caps Lock http://bit.ly/bGWoR3 [...]

  2. [...] Remapping caps lock Patterns in Windows keyboard shortcuts Visual Studio keyboard shortcuts [...]

  3. [...] Why and how to remap Caps Lock (Windows, Linux, and Mac) Deleting the Windows recycle bin icon [...]

  4. [...] Remapping Caps Lock Using Windows without a mouse How much does typing speed matter? [...]

  5. [...] Once you have mastered these shortcuts and developed the necessary muscle memory you will find these shortcuts very useful. For example, I am writing this post in emacs and so the shortcuts are the same as on the command line (as an aside, you spend a lot of time in a text editor once you start programming and having the command line shortcuts and your editor shortcuts the same is a big advantage as you don’t need to think when moving between them). When typing I am always hitting the first letter of the next word before I get to the space bar. So, for example, if I was trying to type `on the’ I will often type `ont ‘by mistake (something I did writing this very paragraph). This simple error can be corrected immediately by hitting `Ctrl + t’ as soon as it is made. The alternative is to use two backspaces, a space and the ‘t’ to get back to what I wanted to type. Likewise, my typing speed is sufficient that it is quicker for me to delete backwards a few words (`Ctrl + w’) when I have made a typo and then re-type the words. All this may seem a little anal, and you do have to train yourself to use these keys rather than automatically heading for the backspace key (or worse the mouse), but you will be genuinely surprised at how much more efficient you become using these shortcuts. One last thing, the position of the ‘control’ key on almost keyboards is in an awkward position for regular use. One trick to alleviate this problem is to `remap’ the caps lock key to become the ‘control’ key. If you do this then to hit the ‘control’ key a simple reach with your pinky is sufficient, rather than awkwardly reaching down and across a bit. There are plenty of guides on the web on how to do this in your various OSs, including OSX, Windows 7 and Linux. [...]