Caps -> Control with xmodmap

There was a post on my blog in August 2008, where I described how to change the caps key into control on via Xorg configuration files.

This is nice and handy if you have control over you xorg.conf. But it will not work, if you don’t have that control (or if you don’t have such a file). You can use xmodmap insteed. Create the file .xmodmap in your home directory and put the lines

clear Lock
remove Control = Control_L
keycode 66 = Control_L
add Control = Control_L

into the file. In order to change the key settings you need to run xmodmap /.xmodmap