CAPSLOCK KEY NEVER SHOULD HAVE TAKEN UP SUCH A USEFUL SPOT ON MODERN KEYBOARDS.
On typewriters Shift and Capslock shifted the mechanism to switch between the lower case to upper case letters. Having a large and easily accessible key for that was probably a good thing because it required more physical force and having a large and readily accessible key was good idea ... 50 years ago._
A Command Line Wizard knows the control key, on the other hand, should be much easier to access.
xremap
xremap by k0kubun is a rust based tool to remap lots of neat features beyond the CAPSLOCK issue. Take a look at that for more advanced keybinding that works across X / KDE / Wayland.
Wayland:
sudo apt install dconf-cli
dconf write \
/org/gnome/desktop/input-sources/xkb-options \
"['caps:ctrl_modifier']"`
raspberry pi
Starting in Bookworm (2023 era) the pi uses Wayland and Wayfire.
Edit: ~/.config/wayfire.ini
Find the xkb_options=
under [input]
and modify to read:
xkb_options=ctrl:nocaps
Note: it is comma separated values of you want to keep/add other things.
X / Terminal
/usr/bin/setxkbmap -option "ctrl:nocaps"
Make that perminate:
/etc/default/keyboard
XKBOPTIONS="ctrl:swapcaps"
Detailed steps:
sudo vi /etc/default/keyboard
For swapping the Caps Lock with Ctrl, change to:XKBOPTIONS="ctrl:swapcaps"
For just changing Caps Lock (and not the Ctrl key):XKBOPTIONS="ctrl:nocaps"
To apply the new configuration:sudo dpkg-reconfigure keyboard-configuration