unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Two keyboard layouts with toggle in console
@ 2020-01-05 18:46 Kurshakov Dmitriy
  2020-01-10 12:50 ` Alexei Drozdov
  0 siblings, 1 reply; 3+ messages in thread
From: Kurshakov Dmitriy @ 2020-01-05 18:46 UTC (permalink / raw)
  To: help-guix

Hi.

Is it possible to write an operating system configuration having two different keyboard layouts (in my case -- "us" and "ru") with toggle (preferely by Caps Lock) for console?
For now, I have /etc/config.scm with: (keyboard-layout (keyboard-layout "us" "altgr-intl")) under "operating-system" declaration. Every time after logging into shell, I need to run "loadkeys ruwin_cplk-UTF-8" command. After that, I have two different layouts and can swith between tem by Caps Lock. When I changed keyboard-layout to "ru" in config.scm there was no english layout at all.
How can I solve the problen in "right" (or "reproducible") way?

WBR, Dmitry.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Two keyboard layouts with toggle in console
  2020-01-05 18:46 Two keyboard layouts with toggle in console Kurshakov Dmitriy
@ 2020-01-10 12:50 ` Alexei Drozdov
  2020-01-11  9:50   ` Wiktor Żelazny
  0 siblings, 1 reply; 3+ messages in thread
From: Alexei Drozdov @ 2020-01-10 12:50 UTC (permalink / raw)
  To: Kurshakov Dmitriy; +Cc: help-guix

Manual proposes to do it at runtime:

We’ve discussed how to specify the default keyboard layout of your system
when it starts, but you can also adjust it at run time:
 If you’re using GNOME, its settings panel has a “Region & Language” entry
where you can select one or more keyboard layouts.
 Under Xorg, the setxkbmap command (from the same-named package) allows you
to change the current layout. For example, this is how you would change the
layout to US Dvorak:
 setxkbmap us dvorak
 The loadkeys command changes the keyboard layout in effect in the Linux
console. However, note that loadkeys does not use the XKB keyboard layout
categorization described above. The command below loads the French bépo
layout:
 loadkeys fr-bepo

https://guix.gnu.org/manual/en/guix.html#Keyboard-Layout

вс, 5 янв. 2020 г. в 22:02, Kurshakov Dmitriy <kurshakov-d@yandex.ru>:

> Hi.
>
> Is it possible to write an operating system configuration having two
> different keyboard layouts (in my case -- "us" and "ru") with toggle
> (preferely by Caps Lock) for console?
> For now, I have /etc/config.scm with: (keyboard-layout (keyboard-layout
> "us" "altgr-intl")) under "operating-system" declaration. Every time after
> logging into shell, I need to run "loadkeys ruwin_cplk-UTF-8" command.
> After that, I have two different layouts and can swith between tem by Caps
> Lock. When I changed keyboard-layout to "ru" in config.scm there was no
> english layout at all.
> How can I solve the problen in "right" (or "reproducible") way?
>
> WBR, Dmitry.
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Two keyboard layouts with toggle in console
  2020-01-10 12:50 ` Alexei Drozdov
@ 2020-01-11  9:50   ` Wiktor Żelazny
  0 siblings, 0 replies; 3+ messages in thread
From: Wiktor Żelazny @ 2020-01-11  9:50 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

On Fri, Jan 10, 2020 at 03:50:45PM +0300, Alexei Drozdov wrote:

> Manual proposes to do it at runtime:

From my config.scm:

  (services (cons* (service slim-service-type
                     (slim-configuration
                       (xorg-configuration
                         (xorg-configuration
                           (keyboard-layout
                             (keyboard-layout "pl,cz"
                                              "legacy,ucw"
                                              #:options '("compose:menu,grp:caps_switch")))))))
                   ;; other stuff
                   ))

But it works only in xorg. May be of use for you if you don’t mean the
text-mode console.

WŻ

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-11  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05 18:46 Two keyboard layouts with toggle in console Kurshakov Dmitriy
2020-01-10 12:50 ` Alexei Drozdov
2020-01-11  9:50   ` Wiktor Żelazny

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).