unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Mario Forzanini <mf@marioforzanini.com>
To: Rodrigo Morales <moralesrodrigo1100@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: Execute startxbmap at login to map Ctrl Caps to Escape
Date: Fri, 17 Mar 2023 03:46:50 +0100	[thread overview]
Message-ID: <9132a50b-4cd3-4690-d783-d311f481fafa@marioforzanini.com> (raw)
In-Reply-To: <CAGxMbPYtbc6V9JWUUrVNnP2pO7xtr8RNNd=+wMx_YsNBeXK7EQ@mail.gmail.com>

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	other threads:[~2023-03-18 15:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17  2:31 Execute startxbmap at login to map Ctrl Caps to Escape Rodrigo Morales
2023-03-17  2:46 ` Mario Forzanini [this message]
     [not found]   ` <CAGxMbPZOwaw8WzOqEXkcjy8sH-94DTSLy1XVK0kZQM0Vb9H01g@mail.gmail.com>
2023-03-17 12:40     ` Mario Forzanini
2023-03-17 15:05 ` Gary Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9132a50b-4cd3-4690-d783-d311f481fafa@marioforzanini.com \
    --to=mf@marioforzanini.com \
    --cc=help-guix@gnu.org \
    --cc=moralesrodrigo1100@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).