Wednesday, June 2, 2010

Swapping Caps Lock and Control (Left) keys in X Window

Temporarily, from the shell commandline:

xmodmap -e "remove lock = Caps_Lock"
xmodmap -e "remove control = Control_L"
xmodmap -e "add control = Caps_Lock"
xmodmap -e "add lock = Control_L"


Permanantly, in (Debian) xorg.conf:

Add the Section:

Section "InputDevice"
Option "XkbOptions" "ctrl:swapcaps"
EndSection

(You'll need to restart X for this to take effect)

No comments: