A lot of people suggest turning the Caps Lock key into a Control key. The more I’ve thought about it, the more it does actually make sense. The Caps Lock key enjoys prime real estate on the keyboard, typically right next to the home row, while its function is only rarely (if ever) required. For many applications (such as my favourite editor Vim) the Control key is a regularly used and vital element of, well, control.
I created a file called ~/.xmodmap with the following contents:
!! Swap Caps_Lock and Control_L
remove Lock = Caps_Lock
remove Control = Control_R
keysym Control_R = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
Adding the following line to my ~/.xinitrc (before the command to execute Enlightenment, my window manager) resulted in the key swap being active each time I start an X session:
xmodmap ~/.xmodmap &
My .xmodmap file turns the Caps Lock into a Control key, and makes my right hand side Control key into the Caps Lock. This means that my left hand side Control key (which is the one I always used) remains unaltered.
Remapping these keys in X was the easy part; I’m still waiting for the neurons in my brain to remap to the new and luxuriously located Control key.