How do I remap caps-lock to caps-lock, preferably via bash? I mistakenly used the following command while in caps-lock was active:
setxkbmap -layout us -option ctrl:nocaps
I am trapped in caps-lock now. This happens to me about once every other month. I usually use the naive approach of rebooting my computer to fix this issue. I would like a better solution. I need to temporarily undo the above bash command, so that I can turn off caps-lock.
see: How do I remap the Caps Lock and Ctrl keys?
Alternative solutions:
a bash command that toggles caps lock on/off.
any other keyboard tricks that turn off caps-lock without caps-lock. I already tried the on-screen keyboard, but it contains no caps-lock key.
cat /etc/default/keyboard
– nobody Jan 19 '20 at 10:52setxkbmap -option caps:
might work, but it sporadically fails for me, will investigate later. – user202729 May 15 '22 at 05:42setxkbmap -layout us -option
– Matthaeus Gaius Caesar May 15 '22 at 21:43