I use i3wm, and to map cap lock to escape, I run:
setxkbmap -option caps:swapescape
This works fine, but sometimes while hitting the F1 key, my pinky can accidentally hit the Escape key, which turns on CapsLock.
Gnome has a very nice way to do this, where Shift + Escape = CapsLock. Hitting Escape on its own will do nothing.
I don’t use that so I’m mostly shooting in the dark, but… does
caps:escape_shifted_capslock
do what you want?(source:
localectl list-x11-keymap-options | grep esc
)Commenting because fellow caps-esc swap enthusiast, and I would like to know the answer as well
deleted by creator
I switched because of neovim, and got used to it. I was never the kind of guy to press caps to type capitals, always just kept shift pressed down with my pinky, so i basically never used the caps key anyway
Maybe this can help https://github.com/sezanzeb/input-remapper
It’s option
caps:escape_shifted_capslock
I think.You can look through
/usr/share/X11/xkb/rules/base.lst
for all the options.Edit: Just looked up when this was added, this is a new option from 2024:
This is not an answer to your question, but your left pinkie will thank you if you map CTRL to CAPS.