Remapping the Caps Lock Key

Read any article on optimizing your workflow with Emacs and odds are the first recommendation is to remap 【caps lock】 to 【Ctrl】. For as long as I can remember, the first thing I've done when setting up a new machine is to remap the caps lock key. I did this long before I started using Emacs—not because I was worried about RSI issues but because I was tired of hitting 【caps lock】 instead of 【Tab】 and getting a bunch of unwanted capital letters in my text. For me, the remapping was simply a way of turning off the caps lock function. (Why are they still putting that key on the keyboard, anyway?)

Recently I decided to try actually using 【caps lock】 as 【Ctrl】. It hasn't been easy. After years of bending my pinkie down to the standard 【Ctrl】 key, it felt unnatural to use 【caps lock】 instead. After a few weeks, I'm finally getting used to it and except for occasionally mixing up 【Shift】 and 【caps lock】, I've pretty much retrained my muscle memory.

Actually, I've discovered that having two control keys is handy. For most key sequences modified with 【Ctrl】, I used the 【caps lock】 key but when the sequence is modified by both 【Ctrl】 and 【Meta】 (such as 【Ctrl+Meta+f】 to move forward by a sexr) it's convenient to use the standard 【Ctrl】 key.

If you've remapped 【caps lock】, what was your experience? Did you have a hard time getting used to it or did it seem natural to you right away? My difficulties may be the result of using the standard 【Ctrl】 key for so long. In any event, I'd be interested in hearing about other people's experiences.

This entry was posted in General and tagged . Bookmark the permalink.

13 Responses to Remapping the Caps Lock Key

  1. csar says:

    Long before i used emacs, i had Caps lock remapped to Esc, because i used vim.
    The switch from normal Escape to Capslock-Escape was easy and felt like a big relief.

    Then, when i switched to emacs, Caps lock became Ctrl very soon, because the default Ctrl was just too painful. So i never used Emacs for a long time with just the default Ctrl keys.

    Now i'm thinking about mapping Ctrl to some other key, because my left pinky hurts after prolonged emacs editing sessions. Any ideas for a better Ctrl position?

    • jcs jcs says:

      Any ideas for a better Ctrl position?

      It's hard to see what it might be. Maybe the right Alt key if you can hit it with your thumb. The most natural choice is the Windows key but it looks like a reach for the thumb and you'd probably use your pinkie otherwise. On the Mac, the key corresponding to right Alt is the Cmd key.

    • Raimon Grau says:

      I followed exactly the same path, and from time to time I also feel my pinky struggling a bit.

      Been thinking about getting a foot pedal, but not sure if I have to start worrying about my foot pain :). Nah, seriously, I'm not sure if it'll be useful. Anyone experienced with those gadgets?

  2. John says:

    Some of us are old enough to remember when Sun and Apple shipped keyboards with the control key in the correct location; I'll never really forgive either company for bowing to the PC convention of having caps lock in such a prominent spot.

    (IIRC, Apple also used to have the nubs on the 'k' and 'd' keys for finger placement, which is a much better place because it's easier to detect the nub on the wrong finger if your index finger is on one of those keys than notice the absence of the nub.)

    So anyway, yes, it's a very natural and useful change to remap that key to control.

  3. Xah Lee says:

    i think for laptop keyboard, the best Ctrl position is CapsLock.

    for standard PC keyboard, i think swapping Ctrl and Alt is good, or leave them as is and use palm edge to hit Ctrl. I do that, and i've read now and then people do that too, on hacker news, stackoverflow. Another guy who uses TypeMatrix keyboard and stuck a gum thing to the Ctrl so he can push it with palm edge. I sent me a photo months ago but i haven't post it yet.

    one good thing about not swap out CapsLock is that you can now have a extra mod key. I used to use it for M-x. but now i use Menu key for M-x. and CapsLock is a prefix for entering unicode chars and ()[]{}.

  4. chuck says:

    I have a tendency to fumble into the caps lock key when I go for the A key and end up typing at the start of the line. This is very annoying.

  5. Peter Reavy says:

    I genuinely don't get this obsession with making Caps Lock into Control.

    I use Caps Lock as it was intended. So I don't have to type more than 2 capital letters in a row without using shift.

    You'd think it would be more important to make the right Alt (Alt Gr) into a true Alt. Then for Alt-X you'd type the Alt with your right hand while typing the X with your left hand. Actually I'm going to try that now.

    • John says:

      I imagine everyone has different use cases, but how often do you need to type multiple capital letters?

      As an Emacs and shell user, I use Control countless times a day. I miss caps lock roughly twice/year.

      • Peter Reavy says:

        Just in case anyone else is hesitating, I remapped my Caps Lock to Control last week. Despite my scepticism it turns out I really don't miss Caps after all and it's worth having Ctrl in a more comfortable place just to type Ctrl-L in Chrome. Still acquiring the habit of using my new key in Emacs itself but I'm sure it will come.

  6. PuercoPop says:

    I've also mixed up shift with control so now I try to press shift with the right hand. In my case it is a necessity as in a mac the ctrl key is in a brain dead position.

  7. Alex says:

    It's been good to me. I was suffering very bad RSI type pain in my little finger. So much so on my work machine the left caps-lock is stuck to my monitor with blu-tack to ensure I don't fall into old habits ;-)

  8. aerique says:

    I had remapped Caps Lock to Ctrl as well but never really used it much since I try to hit Ctrl with one hand and the key that goes with it with the other hand, so the Ctrl key position isn't much of a problem in that case.

    So I had it remapped to Backspace since I use that key A LOT and its default place on the keyboard is retarded. Recently I switched to Evil-mode in Emacs and have Caps Lock remapped to Esc and I use Ctrl-H for Backspace. I still need to get it into my muscle memory though.

  9. Thom M says:

    I mapped capslock to ctrl about 18 months ago when I decided to give emacs a go, and immediately thought "why didn't I do this 20 years ago". Emacs aside, even just general application hotkeys, like even cut/copy/paste are immediately much more comfortable.

Comments are closed.