Last Updated: February 25, 2016
·
523
· nickfletcher

Remapping capslock to control in linux

Create a .xmodmap file if you don't already have one in your $HOME folder.

Then simply add:

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

To have it load on startup, you may need to add:

xmodmap .xmodmap

To your .xinitrc

OR

Create a .profile file if you don't already have one in your $HOME folder.

Then simply add:

xmodmap -e 'remove Lock = Caps_Lock'
xmodmap -e 'keysym Caps_Lock = Control_L'
xmodmap -e 'add Control = Control_L'

Log out and back in.