Is there a way to use system.scm to swap ctrl and caps lock in guix?
I have the following in my system config
(operating-system
(locale ...)
(timezone ...)
(keyboard-layout (keyboard-layout "us" "alt-intl"
#:options '("ctrl:nocaps")))
(host-name "marvin")
;; ...
)
This does not swap, but makes my caps lock key a another control. I would guess that using ctrl:swapcaps
would achieve what you want.
I haven’t used guix system, my guess is that you need to configure your desktop ( I swap ctrl and caps in sway using guix home), or if you are using your os without a desktop maybe editing .inputrc ( I haven’t tried it).
@mirkoh it would be better to set in a lower level but in the graphical context I would do the following:
If you use X, you could run xmodmap to change the keys after login.
Not sure if the situation under wayland improved but How to customise keyboard mappings with Wayland - Unix & Linux Stack Exchange should get you going.