help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Execute startxbmap at login to map Ctrl Caps to Escape


From: Mario Forzanini
Subject: Re: Execute startxbmap at login to map Ctrl Caps to Escape
Date: Fri, 17 Mar 2023 03:46:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2

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

[Prev in Thread] Current Thread [Next in Thread]