Subject: Re: bug#40273: installer: No way to input Latin characters with non-Latin keyboard layouts

From: Mathieu Othacehe <[email-masked]>
Date: Mon, 30 Mar 2020 13:35:29 +0200

> Yes, that is definitely a good place, *but* now that I saw Debian, it
> would be good to additionally have a key combination.  I think
> switching in an F1 help menu is more discoverable and having both
> would be good.

OK, noted.

> From what an Arab friend told me, they are used to a key combination
> (Alt+Shift if I remember correctly, as is Debian’s default; Debian
> makes the combination configurable).  But I cannot figure out how to
> make loadkeys use a key combination; ckbcomp seems not to produce
> right results.
>
> In QEMU on the compatibility console I ran “sendkey ctrl-alt-f3“.  I
> then tried:
>
> guix environment --ad-hoc console-setup #so I can run ckbcomp
> mkdir -p /usr/share/X11/
> cd /usr/share/X11
> ln -s $(guix build -S console-setup)/Keyboard/ckb xkb
> ckbcomp ar, -variant azerty, -option grp:toggle > ~/test
> loadkeys us #so I can switch back, I hoped, but it does not work
> loadkeys ~/test

In the installer, the keyboard layout is handled by KMSCON. It means
that running setxkbmap or loadkeys commands won't help. As KMSCON only
supports static keyboard layout setting at start time, I had to patch it
dirty (see kmscon-runtime-keymap-switch.patch). With this patch, it is
possible to write keyboard model, layout and variant to the file pointed
by KEYMAP_UPDATE environment variable, and have the keyboard layout
updated (see kmscon-update-keymap).

Mathieu