Monthly Archives: September 2014

Who uses Caps Lock anymore? More Control!

When I started using emacs again some time ago, I noticed quickly that it was very uncomfortable to move my little finger down to the left control key in order to do the many emacs control sequences. I wanted something much easier to use, or else emacs likely wouldn’t last. I recalled a while back remapping my caps lock key to another control key, so I looked into it. Not only is this good in Linux, but I was able to do it in Windows 7 as well, with a registry entry.

Here is a link to my github page with the required Windows registry update. Note that this has been tested on Windows 7 only. If you try it out with other versions, let me know if it works so I can update the post!

For Linux, three lines added to ~/.bash_profile or ~/.bashrc would do the trick:

xmodmap -e 'keycode 66 = Control_L'
xmodmap -e 'clear Lock'
xmodmap -e 'add Control = Control_L’

Once that file was sourced or you relog, it takes effect and you have a much more comfortable control key on your hands!

Update 10/15/2014:

You can also achieve the same results with a single command:

setxkbmap -option ctrl:nocaps

This of course uses a different command, so you have another option if you prefer to not use xmodmap, or if it’s not available for some reason.