pxkw.hatenadiary.com

めもめも

How to remap CapsLock to Ctrl or swap them.

(Tried and successful on Ubuntu 13.10)

[1/2] Edit option in a configuration file.

Edit XKBOPTIONS in the file /etc/default/keyboard.
SU permission will be required.


To remap CAPS to CTRL, add the following option.

ctrl:nocaps

e.g. XKBOPTIONS="ctrl:nocaps"


To swap CAPS and CTRL, add the following.

ctrl:swapcaps

e.g. XKBOPTIONS="ctrl:swapcaps"

[2/2] Apply the configuration.

Run this command with SU permission

dpkg-reconfigure keyboard-configuration

and follow the guidance.