help-guix
[Top][All Lists]
Advanced

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

Re: Keyboard layout options not working


From: Hilton Chain
Subject: Re: Keyboard layout options not working
Date: Thu, 07 Dec 2023 21:46:37 +0800

On Thu, 07 Dec 2023 20:28:02 +0800,
Lars Rustand wrote:
>
>
> Hilton Chain <hako@ultrarare.space> writes:
> > In (gnu system keyboard), keyboard-layout is defined as:
> >
> > (keyboard-layout name (variant) (#:model) (#:options))
> >
> >
> > So the following should be used instead:
> >
> > (keyboard-layout "us" "no" #:options '("grp:switch"))
>
> I tried the above, but I get this following errror:
>
> -8<---------------cut here---------------start------------->8---
> error: (keyboard-layout "us" "no" #:options (quote ("grp:switch"))): invalid 
> field specifier
> -8<---------------cut here---------------end--------------->8---
>
> > And for X, xorg-configuration accepts a <keyboard-layout> record
> > and sets option XkbLayout to the name field of that record and
> > XkbVariant to variant (only when it's present).  Since XkbLayout
> > recognizes the comma syntax and variant is not set, the result is
> > valid.
>
> Well, this comma syntax is precisely what I am trying to use. Note
> that the "us,no" in my config refers to the list of US layout and NO
> layout, not a NO variant of the US layout (I don't think there is
> such a variant). The expected result of my keyboard-layout config is
> that I have US layout by default, and when I hold down the right alt
> key I get the NO layout.
>
> A similar configuration is shown in the examples under the Keyboard
> Layout section in the Guix manual.
>
> -8<---------------cut here---------------start------------->8---
> ;; Arabic layout with "Alt-Shift" to switch to US layout.
> (keyboard-layout "ar,us" #:options '("grp:alt_shift_toggle"))
> -8<---------------cut here---------------end--------------->8---


I didn't check setxkbmap when sending the mail, actually its syntax is
the same of ckbcomp.  So you don't have to change the procedure call,
sorry for my misinterpretation.

The keyboard-layout field of operating-system is solely for console
use (used by GRUB, and later loaded via loadkeys when booting).  So
you'll have to pass a <keyboard-layout> record to the keyboard-layout
field of your xorg-configuration.



reply via email to

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