Some folks prefer the Left Control key just to the left of the A key on their keyboards. If this is you, read on.
Linux
If you are the only user of your machine, you can edit
/etc/default/keyboard
and add or change the XKBOPTIONS
line so it
reads as:
XKBOPTIONS="ctrl:swapcaps"
[I don't think this affects X sessions, so there is more to do.]
XFCE4
If you share your machine with others, change the keyboard mapping in
your own account. Under the Xfce4 desktop environment (Xubuntu), open
the Session and Startup settings in your Settings menu or System
Settings application (xfce4-settings-manager
).
Select the Application Autostart tab and click and the application configuration
dialog opens:
Fill in the fields:
- Name:
Swap CapsLock/LCtrl
- Description:
swap CapsLock and LeftCtrl
- Command:
/usr/bin/setxkbmap -option "ctrl:swapcaps"
This creates a file in $HOME/.config/autostart
called Swap
CapsLock-Ctrl.desktop
that contains:
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Swap CapsLock/Ctrl
Comment=swap CapsLock and Left-Ctrl
Exec=/usr/bin/setxkbmap -option "ctrl:swapcaps"
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false
Variations
If ctrl:swapcaps
does not tweak your keyboard as you like, read the
manual page for keyboard(5)
:
man keyboard
In its FILES sections it suggests looking at
/usr/share/X11/xkb/rules/xorg.lst
for a complete list of options.
Here are some of them:
ctrl:nocaps | Caps Lock as Ctrl |
ctrl:lctrl_meta | Left Ctrl as Meta |
ctrl:swapcaps | Swap Ctrl and Caps Lock |
ctrl:ac_ctrl | At left of 'A' |
ctrl:aa_ctrl | At bottom left |
ctrl:rctrl_ralt | Right Ctrl as Right Alt |
ctrl:menu_rctrl | Menu as Right Ctrl |
ctrl:swap_lalt_lctl | Swap Left Alt with Left Ctrl |
ctrl:swap_lwin_lctl | Swap Left Win with Left Ctrl |
ctrl:swap_rwin_rctl | Swap Right Win with Right Ctrl |
ctrl:swap_lalt_lctl_lwin | Left Alt as Ctrl, Left Ctrl as Win, Left Win as Left Alt |