Keyboard: Swapping CAPSLOCK with ESCAPE
Is there any way to swap the CAPSLOCK with the ESCAPE key?
This is a very common setup/requirement for Vim users.
The classic XOrg approach is: setxkbmap -option capslock:swapescape.
I'd love to see this as well. I'm not a vim user, but just years, and years, and years of muscle memory to having them swapped.
You can configure that in ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config
More specifically you'll want to add options: Some("caps:swapescape") to the config file. Example:
// ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config
(
rules: "",
model: "",
layout: "us",
variant: "",
options: Some("caps:swapescape"),
repeat_delay: 600,
repeat_rate: 25,
)
Yeah, I did try that.
This config seems to be overwritten on each login. Might be something happening in the greeter.
My config was being overwritten when I had errors in my config file. Could that be the case for you? Are you seeing any errors such as errors loading cosmic-comp config logs in your /var/log/syslog?
Thanks @jpttrssn! Any way to rebind so that Caps -> Esc Esc -> Esc (esc still works) Shift + Caps -> Caps
Thanks @jpttrssn! Any way to rebind so that Caps -> Esc Esc -> Esc (esc still works) Shift + Caps -> Caps
You can use caps:escape_shifted_capslock. See man xkeyboard-config for all available options under Caps Lock behavior.
Kinda related--is there a way to remap caps:escape_shifted_capslock and swapping left alt with meta in the Some(..,) args? Should it be a vec or a string?
Anyone knows how to set CapsLock to Meta+Space, to switch IME like MacOS?