Remap Caps Lock To Ctrl

Useless Key No More

Caps Lock must be the most useless key on modern keyboards. I mean who locks their CAPS before typing, apart from angry flamers and the unwary?

Well with that question out the way, here's how to remap the Caps_Lock key to a second Ctrl key using xmodmap.

Create an .xmodmap file in your home directory and copy the following to it:

remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L


Save and close the file.

Create an .xsession file in your home directory and add the following:

xmodmap ./.xmodmap

Save and close the file.

Now type the following to source the .xsession file:

. ./.xsession

Or restart X server. Your Caps_Lock key should be re-mapped to Ctrl.

Test it and see.

Done!