This is a long standing Debian bug. It seems to relate to an underlying kernel bug which has been long since fixed. The problem seems to have been that Caps_Lock
did not work for non-ASCII characters, so the workaround was to map Shift_Lock
or CtrlL_Lock
to the caps lock key instead.
On the Debian side the issue is created by ckbcomp
which is used by console-setup
to create the console keymap from the XKB keyboard description. Note that the original code referenced in the bug report using Shift_Lock
seems to have been replaced by different code which switches for CtrlL_Lock
instead. If you are interested you can search for usages of the broken_caps
variable in the ckbcomp
Perl script.
I have no idea if the code is still necessary for any reason, maybe it is worth bumping the bug report. However, the workaround is to put the following line in /etc/kbd/remap
and it should be fixed after a reboot:
s/CtrlL_Lock/Caps_Lock/
Or for a temporary fix until the next reboot, run the following in a tty
session:
dumpkeys | sed s/CtrlL_Lock/Caps_Lock/ | sudo loadkeys
Update
It seems that /etc/kbd/remap
is only actually used if setupcon
is not available. A better workaround is just to put the following line in /etc/rc.local
:
dumpkeys | sed s/CtrlL_Lock/Caps_Lock/ | loadkeys