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

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Fri, 3 Apr 2020 02:38:16 +0200

On Thu, Apr 02, 2020 at 11:45:01AM +0200, Ludovic Courtès wrote:
> The attached patch fixes that.  I’ve confirmed that it works as intended
> in Xorg and in the console

Thank you, it works fine, even for entering the LUKS passphrase after
GRUB in the Linux kernel.  Only GRUB uses U.S. QWERTY layout.

> (I’m not sure it works in GDM, but it
> definitely works in an xterm in ratpoison, for instance.)

GDM retains my U.S. English layout even after herd stop xorg-server
and deleting all files in /var/lib/gdm.  Deleting all files also made
my fonts different in gnome-terminal, Icecat, Emacs, also
gnome-initial-setup got run again, but these issues are unrelated to
this bug and do not happen if one does not “sudo rm -rf
/var/lib/gdm/.*”.

> I was wondering whether to push the patch as-is or to require people to
> write:
> 
>   (keyboard-layout '("ar" "fr") …)
> 
> instead.  Maybe it’s OK to leave the comma here.

Lists seem more consistent with the Scheme syntax.

> 
> However, I noticed that this doesn’t work in GRUB.  Actually, even
> (keyboard-layout "fr") doesn’t work in GRUB (at the command line after
> the boot menu), which seems like a regression.

I suppose on GRUB using at_keyboard it worked in the past?

For me there’s no regression because keyboard layouts never worked
(using usb keyboard rather than at keyboard), see
<https://issues.guix.info/issue/35585#9>.

Back then I was told to open a bug at GRUB, which I have not done.
There are other old bugs on keyboard layouts and bugs on USB keyboards
among the GRUB bugs at Savannah though.  I find an e-mail to bug-grub
concerning the same issue
<https://lists.gnu.org/archive/html/bug-grub/2017-10/msg00003.html>,
but no bug at Savannah.  I will not open a bug I suppose, also the
GRUB manual says many keymaps don’t work well.

https://www.gnu.org/software/grub/manual/grub/html_node/Internationalisation.html#Input-terminal

It says “Own keyboard implementations (at_keyboard and usb_keyboard)
supports any key but work on one-char-per-keystroke. So no dead keys
or advanced input method. Also there is no keymap change hotkey. In
practice it makes difficult to enter any text using non-Latin
alphabet. Moreover all current input consumers are limited to ASCII.”

f5961dd5854cec1ed9a41365836d63aa15256642 for usb keyboard was a bad
commit (passphrase input was QWERTY, back then usb keyboard did not
work at all in GRUB menu).

Regards,
Florian