Hi!

On 3/17/23 3:31 AM, Rodrigo Morales wrote:
   What's the Guix way to map Caps Lock to Escape?

I actually have some similar setting mapping Caps Lock to Control in my operating system configuration, I think this may work:

<snip>
(operating-system
  (keyboard-layout (keyboard-layout "us" #:options '("caps:escape")))
  ; ...
<snap>

Then you can use this configuration for Xorg by adding the 'set-xorg-configuration' service:

<snip>
(service
  (set-xorg-configuration
    (xorg-configuration (keyboard-layout keyboard-layout)))
<snap>

Note that this approach also applies this setting to TTYs, if you only want to modify the keyboard layout in Xorg you can modify the second snippet:

<snip>
(service
  (set-xorg-configuration
    (xorg-configuration
      (keyboard-layout
        (keyboard-layout "us" #:option '("ctrl:escape")))))
  ; ...
<snap>

Then rebuild the system
--
Mario

Reply via email to