From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#40273: installer: No way to input Latin characters with non-Latin keyboard layouts Date: Thu, 02 Apr 2020 11:45:01 +0200 Message-ID: <87k12yql0i.fsf@gnu.org> References: <20200328134202.rgl6usllluoo2b2y@pelzflorian.localdomain> <87a740nu0u.fsf@gmail.com> <20200330104449.ahyivwdn62g6jluw@pelzflorian.localdomain> <875zemoz26.fsf@gmail.com> <20200330171113.njx7wstlmace45xk@pelzflorian.localdomain> <871rp8v8oi.fsf@gnu.org> <20200331165559.6yfowbvtuoth6vdw@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57573) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJwQG-0004Tk-Fc for bug-guix@gnu.org; Thu, 02 Apr 2020 05:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJwQF-0008CL-8g for bug-guix@gnu.org; Thu, 02 Apr 2020 05:46:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJwQF-0008CG-5S for bug-guix@gnu.org; Thu, 02 Apr 2020 05:46:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jJwQD-0004a8-T0 for bug-guix@gnu.org; Thu, 02 Apr 2020 05:46:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20200331165559.6yfowbvtuoth6vdw@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Tue, 31 Mar 2020 18:55:59 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: "pelzflorian (Florian Pelz)" Cc: 40273@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Florian, "pelzflorian (Florian Pelz)" skribis: > works, but I have no idea how to turn that into a keyboard-layout. > I tried setting in /etc/config.scm > > (keyboard-layout > (keyboard-layout "ar,fr" "azerty" #:options '("grp:alt_shift_toggle"))) > > but it threw an error. The attached patch fixes that. I=E2=80=99ve confirmed that it works as int= ended in Xorg and in the console (I=E2=80=99m not sure it works in GDM, but it definitely works in an xterm in ratpoison, for instance.) I was wondering whether to push the patch as-is or to require people to write: (keyboard-layout '("ar" "fr") =E2=80=A6) instead. Maybe it=E2=80=99s OK to leave the comma here. However, I noticed that this doesn=E2=80=99t work in GRUB. Actually, even (keyboard-layout "fr") doesn=E2=80=99t work in GRUB (at the command line af= ter the boot menu), which seems like a regression. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 28e6cb1f5f..190b717163 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -240,7 +240,11 @@ the 'share/X11/xkb/symbols/' directory of 'xkeyboard-c= onfig'." "-i" #+(keyboard-layout->console-keymap layout) "-o" #$output)))) =20 - (computed-file (string-append "grub-keymap." (keyboard-layout-name layou= t)) + (computed-file (string-append "grub-keymap." + (string-map (match-lambda + (#\, #\-) + (chr chr)) + (keyboard-layout-name layout))) builder)) =20 (define (grub-setup-io config) diff --git a/gnu/system/keyboard.scm b/gnu/system/keyboard.scm index cd3ab37b27..5bd13a44be 100644 --- a/gnu/system/keyboard.scm +++ b/gnu/system/keyboard.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2019 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2019, 2020 Ludovic Court=C3=A8s ;;; ;;; This file is part of GNU Guix. ;;; @@ -94,5 +94,8 @@ Layout information is taken from the XKEYBOARD-CONFIG pac= kage." #$(keyboard-layout-name layout)))))) =20 (computed-file (string-append "console-keymap." - (keyboard-layout-name layout)) + (string-map (match-lambda + (#\, #\-) + (chr chr)) + (keyboard-layout-name layout))) build)) --=-=-=--