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 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 post41 dumb things to check

14 thoughts on “Remapping Caps Lock

  1. 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. 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. Heh. I use xmodmap on my EeePC to make the SuperL/Windows key into a modifier key used by my WM.

  4. 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.

  5. 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.

  6. 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

  7. 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.

  8. 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

  9. 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.

  10. 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

Comments are closed.