Make your Caps Lock key another Control key in Linux

switch caps lock and controlYou aren’t even using your Caps Lock key, and if you are, you shouldn’t be. If you’re like me and you write a lot of code, especially in Emacs, you probably hit your Control key much more than Caps Lock. Since CapsLk is occupying some of the best real estate on the keyboard, right next to the home row, you might be better off swapping your left Control key with Caps Lock.

I swapped my left Control and Caps Lock keys after switching from Vi to Emacs, and it makes a lot of sense for me. A few days afte I switched to Emacs, my pinky started hurting because I was reaching for the Control key so often, and I worried that I was developing Emacs Pinky (See also: Celebrity Programmers with Repetitive Stress Injuries). Swapping Caps and Ctrl helped.

Swap Caps Lock and Control

Make your Caps Lock key another Control key

setxkbmap will reset to your default settings after restarting. If you like the new arrangement, make it permanent by adding the setxkbmap directive to the end of your .profile or .bash_profile.

Caps Lock: cruise control for cool

Don’t buy the hype.


Incoming search terms:

One thought on “Make your Caps Lock key another Control key in Linux

  1. Also useful to map Caps Lock to escape in Vim. Just another trick to stay on the home row more often than not.