From unknown Sat Aug 16 16:01:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40493 <40493@debbugs.gnu.org> To: bug#40493 <40493@debbugs.gnu.org> Subject: Status: installer: Provide a way to select multiple keyboard layouts Reply-To: bug#40493 <40493@debbugs.gnu.org> Date: Sat, 16 Aug 2025 23:01:40 +0000 retitle 40493 installer: Provide a way to select multiple keyboard layouts reassign 40493 guix submitter 40493 Mathieu Othacehe severity 40493 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 13:12:58 2020 Received: (at submit) by debbugs.gnu.org; 7 Apr 2020 17:13:01 +0000 Received: from localhost ([127.0.0.1]:50797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLrmN-00054r-6v for submit@debbugs.gnu.org; Tue, 07 Apr 2020 13:12:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:60274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLrmB-000527-Q0 for submit@debbugs.gnu.org; Tue, 07 Apr 2020 13:12:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58050) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLrmA-0005tZ-KR for bug-guix@gnu.org; Tue, 07 Apr 2020 13:12:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLrm9-0001he-Jz for bug-guix@gnu.org; Tue, 07 Apr 2020 13:12:38 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:36976) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLrm9-0001gy-EI for bug-guix@gnu.org; Tue, 07 Apr 2020 13:12:37 -0400 Received: by mail-wm1-x32e.google.com with SMTP id j19so2657496wmi.2 for ; Tue, 07 Apr 2020 10:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=DL42nTU12OFG+NYnY4wzDU9R53L19OFrYDaRWajV6yM=; b=GdD/xq+jg7GMeK+YH4Q8/GOuKz6lXWUgJ8fBELX20eoiLlcTre7wsTvXj9xMPzBNql PZLhgQqjKJeL2RQ48dqtp66PJ1xvaxFi6OGmCIa6LyXNQ6mzberb2M8Z2U3bn3dKX77h 68j7l/Tc6fzSc97BKZcLVIi15jQeiome1ia+pOjSLIKDpQRqklYvGSKhEzFa23Vdklij hPusPju4rhMjQoP9AhCSdhrPcxKedX3pUwW1KKx1qPx4NgyHz8b2evCl5nkGGqHBzPkO qSDNfOv/2/EMfRlKENYZUMFZguLCrEK3ktLn1/I1g7f6TrHBCndW4aCJ9eBfCzGEwN3K lO4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=DL42nTU12OFG+NYnY4wzDU9R53L19OFrYDaRWajV6yM=; b=h0OG6x9r4n0gVzqqwLAASgufE44SWPwh38qKYAMAwzoODQ610MO6Uic6h0sJRq+gBg RMdcFI7IuDeY7EDXioa6sJEJiyW4PNU75xho/Gg5JRUOcxgudNVDSDUrPmsN63O1dEe0 QX4zyopfG/cYQh2pamShgEbQgvUjwLc/rPMR2GVA7bEtn2coWUMzvn8IOh0yUH1gagzQ X56cyt97gdcluHvQUFfIHarm8k3TqI2XR7ZHke77gjWHUgs1ZP4HQgvGHLJzD4x9QlQW 1HDSo2a4QQAzLf/gnVp8fyVOK85M6EA2OZrJ73P7q2QOVkqZ8DNxyBBsMWIQrClIY5xZ e52w== X-Gm-Message-State: AGi0PuZ5340q7X5tb3vi6fFlLkFlaF30LBGmH679tPU97hCj5hRla/Qr VoGekOyLqcWeWZZjEd1QU2I= X-Google-Smtp-Source: APiQypI6ckvAkyURwLP6GZ2K6EBfqaAx2xqJfad4uS/3NxcNMcq7DCqvZFl7Cr0wA28pCSrB4fx5CA== X-Received: by 2002:a05:600c:2297:: with SMTP id 23mr275663wmf.166.1586279556238; Tue, 07 Apr 2020 10:12:36 -0700 (PDT) Received: from meru ([2a01:cb18:832e:5f00:6c54:9e52:aeb8:d04b]) by smtp.gmail.com with ESMTPSA id b191sm3014584wmd.39.2020.04.07.10.12.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 10:12:35 -0700 (PDT) From: Mathieu Othacehe To: bug-guix@gnu.org Subject: installer: Provide a way to select multiple keyboard layouts Date: Tue, 07 Apr 2020 19:12:34 +0200 Message-ID: <87369fmd8d.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, The installer gained support for keyboard layout switching from every step recently[1]. It is also possible with commit 2729cb406d9f3e9eb22cc660f887138134edb3a8 to specify comma-separated keyboard layouts, this way: Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (m.othacehe[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit Cc: pelzflorian@pelzflorian.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hello, The installer gained support for keyboard layout switching from every step recently[1]. It is also possible with commit 2729cb406d9f3e9eb22cc660f887138134edb3a8 to specify comma-separated keyboard layouts, this way: --8<---------------cut here---------------start------------->8--- (keyboard-layout "ar,us" #:options '("grp:alt_shift_toggle")) --8<---------------cut here---------------end--------------->8--- Now it would be nice to support multiple keyboard layout selection from the installer, so that a configuration like to one above is generated. Thanks, Mathieu [1]: https://lists.gnu.org/archive/html/bug-guix/2020-03/msg00381.html From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 13:51:07 2020 Received: (at submit) by debbugs.gnu.org; 7 Apr 2020 17:51:10 +0000 Received: from localhost ([127.0.0.1]:50826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLsN1-0004DU-Mg for submit@debbugs.gnu.org; Tue, 07 Apr 2020 13:51:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:55094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLsMV-00046J-WC for submit@debbugs.gnu.org; Tue, 07 Apr 2020 13:50:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34981) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLsMT-0005UD-3L for bug-guix@gnu.org; Tue, 07 Apr 2020 13:50:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLsMQ-0004h5-W6 for bug-guix@gnu.org; Tue, 07 Apr 2020 13:50:08 -0400 Received: from pelzflorian.de ([5.45.111.108]:41564 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLsMQ-0004gC-BL for bug-guix@gnu.org; Tue, 07 Apr 2020 13:50:06 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 8BB3E36055C; Tue, 7 Apr 2020 19:50:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1586281804; bh=tPgw2g0lxCivFoVWtkcGCgxUExHuoylzXwXdnd5NRcA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=tydkvCB9hXx92B2mw3w8YSyJiEecph2YCH08koYMWmRM/6Vda1UUluoUGOyFlgD0i 4bJSQD7ppjCmam/TegFkVuxCbO6BXIAyr1qmR1sNzjH/UsASyE77yQnEdinDl1CR6Y Z6AXn2JfSPeuizQiqL5Lp+Jkn/Vsyu1y3xOqMsZ0= Date: Tue, 7 Apr 2020 19:50:02 +0200 From: "pelzflorian (Florian Pelz)" To: Mathieu Othacehe Subject: Re: installer: Provide a way to select multiple keyboard layouts Message-ID: <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> References: <87369fmd8d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="hveq455vskwi7jvf" Content-Disposition: inline In-Reply-To: <87369fmd8d.fsf@gmail.com> Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 5.45.111.108 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit Cc: bug-guix@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --hveq455vskwi7jvf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 07, 2020 at 07:12:34PM +0200, Mathieu Othacehe wrote: > Now it would be nice to support multiple keyboard layout selection from > the installer, so that a configuration like to one above is generated. >=20 > Thanks, >=20 > Mathieu Ludo responded to the other bug: On Tue, Apr 07, 2020 at 11:49:09AM +0200, Ludovic Court=C3=A8s wrote: > Ideally we=E2=80=99d also offer a way to choose multiple layouts in the > installer, so that one can end up with: > > (keyboard-layout "ar,us" #:options '("grp:alt_shift_toggle")) > I believe the user should not have to manually select the other layout (if the user wants they can select via F1 key). Instead there should be a sane default (typically U.S. layout). But since I am used to Latin script, I may not have good judgment. IMHO two things should be done: * Within the installer, a toggleable second keyboard layout should be available by default. Mathieu enabled changing the layout via the F1 help menu. This is good and more flexible and discoverable, but a key combination is more convenient and people appear to be used to Alt+Shift toggling. * In the config.scm created by the installer, the default keyboard-layout should include the second layout. Both the config.scm default and the installer layout should be the same, I think. I attach a proposed solution for the first thing, though it does not yet update the toggle option correctly. If you think the approach is OK, then I will add more default alternative layouts to the maybe-add-second-layout procedure. > Although that=E2=80=99s mostly useful for the console as GDM and GNOME = should be > able to do the right thing. >=20 > Anyway, we can discuss it in a separate issue. >=20 > Ludo=E2=80=99. The GNOME session after login will ask the user what keyboard layout they want, but the (I believe changeable) default for GDM comes from config.scm. Regards, Florian --hveq455vskwi7jvf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-installer-Allow-Alt-Shift-toggle-from-non-Latin-keyb.patch" Content-Transfer-Encoding: quoted-printable >From 0d3a1ecc214fe55d77f45f4b2e690a93978da9ec Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Tue, 7 Apr 2020 19:06:31 +0200 Subject: [PATCH] installer: Allow Alt+Shift toggle from non-Latin keyboar= d layouts. See . * gnu/installer/newt/keymap.scm (run-keymap-page): Maybe add second layou= t. * gnu/installer/keymap.scm (kmscon-update-keymap): Pass on XKB options. * gnu/installer/records.scm (): Adjust code comments. * gnu/installer.scm (apply-keymap): Pass on XKB options. (installer-steps): Adjust code comments. * gnu/packages/patches/kmscon-runtime-keymap-switch.patch: Apply XKB opti= ons. --- gnu/installer.scm | 14 +++++----- gnu/installer/keymap.scm | 8 ++++-- gnu/installer/newt/keymap.scm | 19 ++++++++++--- gnu/installer/record.scm | 3 ++- .../kmscon-runtime-keymap-switch.patch | 27 ++++++------------- 5 files changed, 40 insertions(+), 31 deletions(-) diff --git a/gnu/installer.scm b/gnu/installer.scm index 75c5a01570..72b7d195fd 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -2,6 +2,7 @@ ;;; Copyright =A9 2018, 2020 Mathieu Othacehe ;;; Copyright =A9 2019, 2020 Ludovic Court=E8s ;;; Copyright =A9 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright =A9 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -170,9 +171,9 @@ been performed at build time." (define apply-keymap ;; Apply the specified keymap. Use the default keyboard model. #~(match-lambda - ((layout variant) + ((layout variant options) (kmscon-update-keymap (default-keyboard-model) - layout variant)))) + layout variant options)))) =20 (define* (compute-keymap-step context) "Return a gexp that runs the keymap-page of INSTALLER and install the @@ -235,12 +236,13 @@ selected keymap." =20 ;; The installer runs in a kmscon virtual terminal where loadke= ys ;; won't work. kmscon uses libxkbcommon as a backend for keyboa= rd - ;; input. It is possible to update kmscon current keymap by sen= ding it - ;; a keyboard model, layout and variant, in a somehow similar w= ay as - ;; what is done with setxkbmap utility. + ;; input. It is possible to update kmscon current keymap by sen= ding + ;; it a keyboard model, layout, variant and options, in a someh= ow + ;; similar way as what is done with setxkbmap utility. ;; ;; So ask for a keyboard model, layout and variant to update th= e - ;; current kmscon keymap. + ;; current kmscon keymap. For non-Latin layouts, we add an + ;; appropriate second layout and toggle via Alt+Shift. (installer-step (id 'keymap) (description (G_ "Keyboard mapping selection")) diff --git a/gnu/installer/keymap.scm b/gnu/installer/keymap.scm index df9fc5e441..d520b782fd 100644 --- a/gnu/installer/keymap.scm +++ b/gnu/installer/keymap.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =A9 2018 Mathieu Othacehe +;;; Copyright =A9 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -154,8 +155,8 @@ Configuration Database, describing possible XKB confi= gurations." ((models layouts) (values models layouts))))) =20 -(define (kmscon-update-keymap model layout variant) - "Update kmscon keymap with the provided MODEL, LAYOUT and VARIANT." +(define (kmscon-update-keymap model layout variant options) + "Update kmscon keymap with the provided MODEL, LAYOUT, VARIANT and OPT= IONS." (and=3D> (getenv "KEYMAP_UPDATE") (lambda (keymap-file) @@ -175,4 +176,7 @@ Configuration Database, describing possible XKB confi= gurations." (put-u8 port 0) =20 (format port variant) + (put-u8 port 0) + + (format port options) (put-u8 port 0)))))) diff --git a/gnu/installer/newt/keymap.scm b/gnu/installer/newt/keymap.sc= m index 0147a0b9d5..ba02085a44 100644 --- a/gnu/installer/newt/keymap.scm +++ b/gnu/installer/newt/keymap.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =A9 2018, 2020 Mathieu Othacehe ;;; Copyright =A9 2019 Ludovic Court=E8s +;;; Copyright =A9 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -114,8 +115,10 @@ You can switch to different layout at any time from = the help menu."))) =20 (define* (run-keymap-page layouts #:key (context #f)) "Run a page asking the user to select a keyboard layout and variant. L= AYOUTS -is a list of supported X11-KEYMAP-LAYOUT. Return a list of two elements,= the -names of the selected keyboard layout and variant." +is a list of supported X11-KEYMAP-LAYOUT. For non-Latin keyboard layout= s, a +second layout and toggle options will be added automatically. Return a = list +of three elements, the names of the selected keyboard layout, variant an= d +optionsxs." (define keymap-steps (list (installer-step @@ -144,6 +147,15 @@ names of the selected keyboard layout and variant." (gettext (x11-keymap-variant-description variant) "xkeyboard-config")))))))))) =20 + (define (maybe-add-second-layout first-layout) + "Return for a chosen keyboard layout either the same layout or possi= bly +the layout plus a suitable second layout, and also variant and options." + (match first-layout + (("ar" "azerty") (list "ar,fr" "azerty," "grp:alt_shift_toggle")) + (("ar" variant) (list "ar,us" variant "grp:alt_shift_toggle")) + (("ja" variant) (list "ja,us" variant "grp:alt_shift_toggle")) + ((layout variant) (list layout variant "")))) + (define (format-result result) (let ((layout (x11-keymap-layout-name (result-step result 'layout))) @@ -151,7 +163,8 @@ names of the selected keyboard layout and variant." (lambda (variant) (gettext (x11-keymap-variant-name variant) "xkeyboard-config"))))) - (list layout (or variant "")))) + (maybe-add-second-layout + (list layout (or variant ""))))) (format-result (run-installer-steps #:steps keymap-steps))) =20 diff --git a/gnu/installer/record.scm b/gnu/installer/record.scm index 78acf50c63..13acd33fc6 100644 --- a/gnu/installer/record.scm +++ b/gnu/installer/record.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =A9 2018, 2020 Mathieu Othacehe +;;; Copyright =A9 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,7 +64,7 @@ (exit-error installer-exit-error) ;; procedure void -> void (final-page installer-final-page) - ;; procedure (layouts context) -> (list layout variant) + ;; procedure (layouts context) -> (list layout variant options) (keymap-page installer-keymap-page) ;; procedure: (#:key supported-locales iso639-languages iso3166-territ= ories) ;; -> glibc-locale diff --git a/gnu/packages/patches/kmscon-runtime-keymap-switch.patch b/gn= u/packages/patches/kmscon-runtime-keymap-switch.patch index 656c76fa40..deb5688daf 100644 --- a/gnu/packages/patches/kmscon-runtime-keymap-switch.patch +++ b/gnu/packages/patches/kmscon-runtime-keymap-switch.patch @@ -1,14 +1,5 @@ -From 360d44d67e7be46108bec982ff2e79b89f04a9a3 Mon Sep 17 00:00:00 2001 -From: Mathieu Othacehe -Date: Thu, 15 Nov 2018 14:34:40 +0900 -Subject: [PATCH] add runtime keymap switch support. - ---- - src/pty.c | 23 ++++++++++- - src/uterm_input.c | 2 + - src/uterm_input_internal.h | 5 +++ - src/uterm_input_uxkb.c | 83 ++++++++++++++++++++++++++++++++++++++ - 4 files changed, 111 insertions(+), 2 deletions(-) +By Mathieu Othacehe . +Modified by Florian Pelz . =20 diff --git a/src/pty.c b/src/pty.c index 1443f4a..f64cb5b 100644 @@ -124,7 +115,7 @@ index 04e6cc9..ec44459 100644 uint16_t key_state, uint16_t code); diff --git a/src/uterm_input_uxkb.c b/src/uterm_input_uxkb.c -index 925c755..4760972 100644 +index 925c755..5d5c22e 100644 --- a/src/uterm_input_uxkb.c +++ b/src/uterm_input_uxkb.c @@ -31,6 +31,9 @@ @@ -137,7 +128,7 @@ index 925c755..4760972 100644 #include #include "shl_hook.h" #include "shl_llog.h" -@@ -178,6 +181,86 @@ static void timer_event(struct ev_timer *timer, uin= t64_t num, void *data) +@@ -178,6 +181,87 @@ static void timer_event(struct ev_timer *timer, uin= t64_t num, void *data) shl_hook_call(dev->input->hook, dev->input, &dev->repeat_event); } =20 @@ -145,11 +136,11 @@ index 925c755..4760972 100644 +{ + struct uterm_input_dev *dev =3D data; + char in; -+ char keymap[3][255]; ++ char keymap[4][255]; + int pos =3D 0; + int curr_keymap =3D 0; + int ret; -+ char *model, *layout, *variant; ++ char *model, *layout, *variant, *options; + + if (!(mask & EV_READABLE)) + return; @@ -159,6 +150,7 @@ index 925c755..4760972 100644 + model =3D keymap[0]; + layout =3D keymap[1]; + variant =3D keymap[2]; ++ options =3D keymap[3]; + + do { + ret =3D read(dev->rupdate_fd, &in, sizeof(in)); @@ -175,7 +167,7 @@ index 925c755..4760972 100644 + + llog_info(dev->input, "HANDLER CALLED %s|%s|%s\n", + model, layout, variant); -+ uxkb_desc_init(dev->input, model, layout, variant, NULL, NULL); ++ uxkb_desc_init(dev->input, model, layout, variant, options, NULL); + + dev->state =3D xkb_state_new(dev->input->keymap); + if (!dev->state) { @@ -224,6 +216,3 @@ index 925c755..4760972 100644 int uxkb_dev_init(struct uterm_input_dev *dev) { int ret; ---=20 -2.17.1 - --=20 2.26.0 --hveq455vskwi7jvf-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 16:38:25 2020 Received: (at 40493) by debbugs.gnu.org; 7 Apr 2020 20:38:25 +0000 Received: from localhost ([127.0.0.1]:51073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLuzJ-00046H-0t for submit@debbugs.gnu.org; Tue, 07 Apr 2020 16:38:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLuzH-000464-QY for 40493@debbugs.gnu.org; Tue, 07 Apr 2020 16:38:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jLuzC-0005cm-74; Tue, 07 Apr 2020 16:38:18 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=47420 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jLuzB-00017y-Nb; Tue, 07 Apr 2020 16:38:18 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 Germinal an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 07 Apr 2020 22:38:16 +0200 In-Reply-To: <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Tue, 7 Apr 2020 19:50:02 +0200") Message-ID: <87wo6r6ngn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40493 Cc: Mathieu Othacehe , 40493@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Good evening comrades! "pelzflorian (Florian Pelz)" skribis: > IMHO two things should be done: > > * Within the installer, a toggleable second keyboard layout should be > available by default. > > Mathieu enabled changing the layout via the F1 help menu. This is > good and more flexible and discoverable, but a key combination is > more convenient and people appear to be used to Alt+Shift toggling. Agreed! > * In the config.scm created by the installer, the default > keyboard-layout should include the second layout. Yes. > I attach a proposed solution for the first thing, though it does not > yet update the toggle option correctly. If you think the > approach is OK, then I will add more default alternative layouts to > the maybe-add-second-layout procedure. I think the approach is OK, even as-is. We can then improve it by (hopefully) replacing the hard-coded list of non-Latin layouts (ar, jp, etc.) with code that determines whether the main layout is Latin or not. > From 0d3a1ecc214fe55d77f45f4b2e690a93978da9ec Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Tue, 7 Apr 2020 19:06:31 +0200 > Subject: [PATCH] installer: Allow Alt+Shift toggle from non-Latin keyboard > layouts. > > See . > > * gnu/installer/newt/keymap.scm (run-keymap-page): Maybe add second layou= t. > * gnu/installer/keymap.scm (kmscon-update-keymap): Pass on XKB options. > * gnu/installer/records.scm (): Adjust code comments. > * gnu/installer.scm (apply-keymap): Pass on XKB options. > (installer-steps): Adjust code comments. > * gnu/packages/patches/kmscon-runtime-keymap-switch.patch: Apply XKB opti= ons. Overall LGTM! Minor suggestion below: > (define* (run-keymap-page layouts #:key (context #f)) > "Run a page asking the user to select a keyboard layout and variant. L= AYOUTS > -is a list of supported X11-KEYMAP-LAYOUT. Return a list of two elements,= the > -names of the selected keyboard layout and variant." > +is a list of supported X11-KEYMAP-LAYOUT. For non-Latin keyboard layout= s, a > +second layout and toggle options will be added automatically. Return a = list > +of three elements, the names of the selected keyboard layout, variant and > +optionsxs." ^ You forgot to hold the =E2=80=9CControl=E2=80=9D key. :-) > + (define (maybe-add-second-layout first-layout) > + "Return for a chosen keyboard layout either the same layout or possi= bly > +the layout plus a suitable second layout, and also variant and options." To leave room for improvement, how about making it a top-level procedure along these lines: (define (switchable-latin-layout layout variant) "If LAYOUT is a non-Latin layout, return a new combined layout, a variant, and options that allow the user to switch between the non-Latin and the Latin layout. Otherwise, return LAYOUT, VARIANT, and #f." (if (member layout '("ar" =E2=80=A6)) =E2=80=A6)) ? Eventually we can replace =E2=80=98member=E2=80=99 or =E2=80=98match=E2=80= =99 with something more fancy, assuming the xkeyboard-config databases contain the relevant info (=E2=80=98base.xml=E2=80=99 doesn=E2=80=99t say what=E2=80=99s Latin and wh= at=E2=80=99s not apparently.) > + (match first-layout > + (("ar" "azerty") (list "ar,fr" "azerty," "grp:alt_shift_toggle")) ^ Remove comma? Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 17:56:58 2020 Received: (at 40493) by debbugs.gnu.org; 7 Apr 2020 21:56:58 +0000 Received: from localhost ([127.0.0.1]:51134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLwDK-000666-5W for submit@debbugs.gnu.org; Tue, 07 Apr 2020 17:56:58 -0400 Received: from pelzflorian.de ([5.45.111.108]:55596 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLwDI-00065y-Rm for 40493@debbugs.gnu.org; Tue, 07 Apr 2020 17:56:57 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 564E036055C; Tue, 7 Apr 2020 23:56:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1586296615; bh=39GFtOdSYR/kOQQ76oCYyOKtVih24L0WowkT2p26214=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=LZUS6vvjgRU4tuBNKFZSAZaAveTiU5hcO48xVcvRBEZdp50AgvB7YJSRIkjzMI1/q K3hD2cKqS7i2/g5bDTDQyNlNkWQDssc10kgs+XGObTSERMSo0Su/N9OiuFA5/AiV4N 9keT4p9dEBhfkj1FHMhfEQM2luowEpcbi4JK72qM= Date: Tue, 7 Apr 2020 23:56:53 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts Message-ID: <20200407215653.soqccnapoy32bqwt@pelzflorian.localdomain> References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87wo6r6ngn.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40493 Cc: Mathieu Othacehe , 40493@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Tue, Apr 07, 2020 at 10:38:16PM +0200, Ludovic Courtès wrote: > Overall LGTM! Minor suggestion below: I will make a new patch tonight and follow your suggestions. Thank you! The layout toggling worked fine btw, except Arabic layout is called "ara" and not "ar" in base.xml … Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 05:58:17 2020 Received: (at 40493) by debbugs.gnu.org; 8 Apr 2020 09:58:17 +0000 Received: from localhost ([127.0.0.1]:51401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jM7TM-0000ri-Vp for submit@debbugs.gnu.org; Wed, 08 Apr 2020 05:58:17 -0400 Received: from pelzflorian.de ([5.45.111.108]:56442 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jM7TL-0000rZ-8u for 40493@debbugs.gnu.org; Wed, 08 Apr 2020 05:58:16 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 0DC9136055C; Wed, 8 Apr 2020 11:58:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1586339894; bh=jp6Z+WDj+8wsf3fJYyw7fQIUeiXPPl+DYFd25m9IU/4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=PYe73HkvGYd9aQbM8vbXpvCyoAiq8x6vX7ngP9p9Wr/uXYxXA1HGjyzJw0itTNgYC +HUtsLNXbke/toitxYQhhMafjQwk5cdmWKTVMgpaZgL4WthpTjOg1f1ipBiDr6HHJd yX2R1t2zHgMjWgFdUQlT2CAPWDB+VkLW6150pzSI= Date: Wed, 8 Apr 2020 11:58:12 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts Message-ID: <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bt4trg5t4moe6tfg" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87wo6r6ngn.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40493 Cc: Mathieu Othacehe , 40493@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --bt4trg5t4moe6tfg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, Apr 07, 2020 at 10:38:16PM +0200, Ludovic Courtès wrote: > I think the approach is OK, even as-is. We can then improve it by > (hopefully) replacing the hard-coded list of non-Latin layouts (ar, jp, > etc.) with code that determines whether the main layout is Latin or not. > I am still doing final testing, but I believe I can push the attached patch. > > + (match first-layout > > + (("ar" "azerty") (list "ar,fr" "azerty," "grp:alt_shift_toggle")) > ^ > Remove comma? The comma is needed, for example the Japanese Kana ("jp" "kana") layout breaks otherwise. I believe the reason is that the "kana" variant gets applied to "us" layout. Regards, Florian --bt4trg5t4moe6tfg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-installer-Allow-Alt-Shift-toggle-from-non-Latin-keyb.patch" Content-Transfer-Encoding: 8bit >From 68fc18d2816e3997f38d0a3c69566d85b26c8719 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 8 Apr 2020 11:46:16 +0200 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [PATCH] installer: Allow Alt+Shift toggle from non-Latin keyboard layouts. Fixes . * gnu/installer/newt/keymap.scm (%non-latin-layouts): New variable. (toggleable-latin-layout): New procedure to compute combined layouts. (run-keymap-page): Use it. (keyboard-layout->configuration): Apply it in config.scm. * gnu/installer/newt/help.scm (run-help-page): Mention Alt+Shift. * gnu/installer/keymap.scm (kmscon-update-keymap): Pass on XKB options. * gnu/installer/record.scm (): Adjust code comments. * gnu/installer.scm (apply-keymap): Pass on XKB options. (installer-steps): Adjust code comments. * gnu/packages/patches/kmscon-runtime-keymap-switch.patch: Apply XKB options. --- gnu/installer.scm | 14 ++++--- gnu/installer/keymap.scm | 8 +++- gnu/installer/newt/help.scm | 5 ++- gnu/installer/newt/keymap.scm | 40 ++++++++++++++++--- gnu/installer/record.scm | 3 +- .../kmscon-runtime-keymap-switch.patch | 27 ++++--------- 6 files changed, 63 insertions(+), 34 deletions(-) diff --git a/gnu/installer.scm b/gnu/installer.scm index 75c5a01570..72b7d195fd 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2018, 2020 Mathieu Othacehe ;;; Copyright © 2019, 2020 Ludovic Courtès ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -170,9 +171,9 @@ been performed at build time." (define apply-keymap ;; Apply the specified keymap. Use the default keyboard model. #~(match-lambda - ((layout variant) + ((layout variant options) (kmscon-update-keymap (default-keyboard-model) - layout variant)))) + layout variant options)))) (define* (compute-keymap-step context) "Return a gexp that runs the keymap-page of INSTALLER and install the @@ -235,12 +236,13 @@ selected keymap." ;; The installer runs in a kmscon virtual terminal where loadkeys ;; won't work. kmscon uses libxkbcommon as a backend for keyboard - ;; input. It is possible to update kmscon current keymap by sending it - ;; a keyboard model, layout and variant, in a somehow similar way as - ;; what is done with setxkbmap utility. + ;; input. It is possible to update kmscon current keymap by sending + ;; it a keyboard model, layout, variant and options, in a somehow + ;; similar way as what is done with setxkbmap utility. ;; ;; So ask for a keyboard model, layout and variant to update the - ;; current kmscon keymap. + ;; current kmscon keymap. For non-Latin layouts, we add an + ;; appropriate second layout and toggle via Alt+Shift. (installer-step (id 'keymap) (description (G_ "Keyboard mapping selection")) diff --git a/gnu/installer/keymap.scm b/gnu/installer/keymap.scm index df9fc5e441..d520b782fd 100644 --- a/gnu/installer/keymap.scm +++ b/gnu/installer/keymap.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Mathieu Othacehe +;;; Copyright © 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -154,8 +155,8 @@ Configuration Database, describing possible XKB configurations." ((models layouts) (values models layouts))))) -(define (kmscon-update-keymap model layout variant) - "Update kmscon keymap with the provided MODEL, LAYOUT and VARIANT." +(define (kmscon-update-keymap model layout variant options) + "Update kmscon keymap with the provided MODEL, LAYOUT, VARIANT and OPTIONS." (and=> (getenv "KEYMAP_UPDATE") (lambda (keymap-file) @@ -175,4 +176,7 @@ Configuration Database, describing possible XKB configurations." (put-u8 port 0) (format port variant) + (put-u8 port 0) + + (format port options) (put-u8 port 0)))))) diff --git a/gnu/installer/newt/help.scm b/gnu/installer/newt/help.scm index a488f5fa2a..3ccfaf2e54 100644 --- a/gnu/installer/newt/help.scm +++ b/gnu/installer/newt/help.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,7 +32,9 @@ (cons (G_ "Change keyboard layout") keyboard-layout-selection))) (result (run-listbox-selection-page - #:info-text (G_ "This is the help menu, please choose an action.") + #:info-text (G_ "This is the help menu. Here you can change your +keyboard layout. Non-Latin layouts can also be toggled with Alt+Shift. +Please choose an action.") #:title (G_ "Installation help") #:listbox-items items #:listbox-item->text car diff --git a/gnu/installer/newt/keymap.scm b/gnu/installer/newt/keymap.scm index 0147a0b9d5..475ffc2261 100644 --- a/gnu/installer/newt/keymap.scm +++ b/gnu/installer/newt/keymap.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2020 Mathieu Othacehe ;;; Copyright © 2019 Ludovic Courtès +;;; Copyright © 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -112,10 +113,35 @@ You can switch to different layout at any time from the help menu."))) variants)) (cut append <> <>))) +(define %non-latin-layouts + ;; List of keyboard layouts marked as $nonlatin in xkeyboard-config. + '("am" "ara" "ben" "bd" "bg" "bt" "by" "cs" "deva" "ge" "gh" + "gr" "guj" "guru" "il" "in" "ir" "iku" "jp" "kan" "kh" "kr" + "la" "lao" "lk" "mk" "mm" "mn" "mv" "mal" "olck" "ori" "pk" + "ru" "scc" "sy" "syr" "tel" "th" "tj" "tam" "ua" "uz" + ;; The list from xkeyboard-config is incomplete. Add more layouts when + ;; noticed: + "et")) + +(define (toggleable-latin-layout layout variant) + "If LAYOUT is a non-Latin layout, return a new combined layout, +a variant, and options that allow the user to switch between the +non-Latin and the Latin layout. Otherwise, return LAYOUT, VARIANT, +and the empty string." + (if (member layout %non-latin-layouts) + (let ((latin-layout (if (string=? variant "azerty") "fr" "us"))) + (list + (string-append layout "," latin-layout) + (string-append variant ",") ;comma to use variant only for non-Latin + "grp:alt_shift_toggle")) + (list layout variant ""))) + (define* (run-keymap-page layouts #:key (context #f)) "Run a page asking the user to select a keyboard layout and variant. LAYOUTS -is a list of supported X11-KEYMAP-LAYOUT. Return a list of two elements, the -names of the selected keyboard layout and variant." +is a list of supported X11-KEYMAP-LAYOUT. For non-Latin keyboard layouts, a +second layout and toggle options will be added automatically. Return a list +of three elements, the names of the selected keyboard layout, variant and +options." (define keymap-steps (list (installer-step @@ -151,14 +177,18 @@ names of the selected keyboard layout and variant." (lambda (variant) (gettext (x11-keymap-variant-name variant) "xkeyboard-config"))))) - (list layout (or variant "")))) + (apply toggleable-latin-layout + (list layout (or variant ""))))) (format-result (run-installer-steps #:steps keymap-steps))) (define (keyboard-layout->configuration keymap) "Return the operating system configuration snippet to install KEYMAP." (match keymap - ((name "") + ((name "" "") `((keyboard-layout (keyboard-layout ,name)))) - ((name variant) + ((name variant "grp:alt_shift_toggle") + `((keyboard-layout (keyboard-layout ,name ,variant + #:options '("grp:alt_shift_toggle"))))) + ((name variant _) `((keyboard-layout (keyboard-layout ,name ,variant)))))) diff --git a/gnu/installer/record.scm b/gnu/installer/record.scm index 78acf50c63..13acd33fc6 100644 --- a/gnu/installer/record.scm +++ b/gnu/installer/record.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2020 Mathieu Othacehe +;;; Copyright © 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,7 +64,7 @@ (exit-error installer-exit-error) ;; procedure void -> void (final-page installer-final-page) - ;; procedure (layouts context) -> (list layout variant) + ;; procedure (layouts context) -> (list layout variant options) (keymap-page installer-keymap-page) ;; procedure: (#:key supported-locales iso639-languages iso3166-territories) ;; -> glibc-locale diff --git a/gnu/packages/patches/kmscon-runtime-keymap-switch.patch b/gnu/packages/patches/kmscon-runtime-keymap-switch.patch index 656c76fa40..deb5688daf 100644 --- a/gnu/packages/patches/kmscon-runtime-keymap-switch.patch +++ b/gnu/packages/patches/kmscon-runtime-keymap-switch.patch @@ -1,14 +1,5 @@ -From 360d44d67e7be46108bec982ff2e79b89f04a9a3 Mon Sep 17 00:00:00 2001 -From: Mathieu Othacehe -Date: Thu, 15 Nov 2018 14:34:40 +0900 -Subject: [PATCH] add runtime keymap switch support. - ---- - src/pty.c | 23 ++++++++++- - src/uterm_input.c | 2 + - src/uterm_input_internal.h | 5 +++ - src/uterm_input_uxkb.c | 83 ++++++++++++++++++++++++++++++++++++++ - 4 files changed, 111 insertions(+), 2 deletions(-) +By Mathieu Othacehe . +Modified by Florian Pelz . diff --git a/src/pty.c b/src/pty.c index 1443f4a..f64cb5b 100644 @@ -124,7 +115,7 @@ index 04e6cc9..ec44459 100644 uint16_t key_state, uint16_t code); diff --git a/src/uterm_input_uxkb.c b/src/uterm_input_uxkb.c -index 925c755..4760972 100644 +index 925c755..5d5c22e 100644 --- a/src/uterm_input_uxkb.c +++ b/src/uterm_input_uxkb.c @@ -31,6 +31,9 @@ @@ -137,7 +128,7 @@ index 925c755..4760972 100644 #include #include "shl_hook.h" #include "shl_llog.h" -@@ -178,6 +181,86 @@ static void timer_event(struct ev_timer *timer, uint64_t num, void *data) +@@ -178,6 +181,87 @@ static void timer_event(struct ev_timer *timer, uint64_t num, void *data) shl_hook_call(dev->input->hook, dev->input, &dev->repeat_event); } @@ -145,11 +136,11 @@ index 925c755..4760972 100644 +{ + struct uterm_input_dev *dev = data; + char in; -+ char keymap[3][255]; ++ char keymap[4][255]; + int pos = 0; + int curr_keymap = 0; + int ret; -+ char *model, *layout, *variant; ++ char *model, *layout, *variant, *options; + + if (!(mask & EV_READABLE)) + return; @@ -159,6 +150,7 @@ index 925c755..4760972 100644 + model = keymap[0]; + layout = keymap[1]; + variant = keymap[2]; ++ options = keymap[3]; + + do { + ret = read(dev->rupdate_fd, &in, sizeof(in)); @@ -175,7 +167,7 @@ index 925c755..4760972 100644 + + llog_info(dev->input, "HANDLER CALLED %s|%s|%s\n", + model, layout, variant); -+ uxkb_desc_init(dev->input, model, layout, variant, NULL, NULL); ++ uxkb_desc_init(dev->input, model, layout, variant, options, NULL); + + dev->state = xkb_state_new(dev->input->keymap); + if (!dev->state) { @@ -224,6 +216,3 @@ index 925c755..4760972 100644 int uxkb_dev_init(struct uterm_input_dev *dev) { int ret; --- -2.17.1 - -- 2.26.0 --bt4trg5t4moe6tfg-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 09:22:45 2020 Received: (at 40493) by debbugs.gnu.org; 8 Apr 2020 13:22:45 +0000 Received: from localhost ([127.0.0.1]:51515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMAfF-0001kW-Ar for submit@debbugs.gnu.org; Wed, 08 Apr 2020 09:22:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMAfC-0001kJ-Ci for 40493@debbugs.gnu.org; Wed, 08 Apr 2020 09:22:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMAf6-0006NQ-T5; Wed, 08 Apr 2020 09:22:36 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50640 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMAf6-0002aX-2Q; Wed, 08 Apr 2020 09:22:36 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 Germinal an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 08 Apr 2020 15:22:34 +0200 In-Reply-To: <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 8 Apr 2020 11:58:12 +0200") Message-ID: <87k12q5cyt.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40493 Cc: Mathieu Othacehe , 40493@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, "pelzflorian (Florian Pelz)" skribis: > The comma is needed, for example the Japanese Kana ("jp" "kana") > layout breaks otherwise. I believe the reason is that the "kana" > variant gets applied to "us" layout. I see. > From 68fc18d2816e3997f38d0a3c69566d85b26c8719 Mon Sep 17 00:00:00 2001 > From: Florian Pelz > Date: Wed, 8 Apr 2020 11:46:16 +0200 > Content-Type: text/plain; charset=3DUTF-8 > Content-Transfer-Encoding: 8bit > Subject: [PATCH] installer: Allow Alt+Shift toggle from non-Latin keyboard > layouts. > > Fixes . > > * gnu/installer/newt/keymap.scm (%non-latin-layouts): New variable. > (toggleable-latin-layout): New procedure to compute combined layouts. > (run-keymap-page): Use it. > (keyboard-layout->configuration): Apply it in config.scm. > * gnu/installer/newt/help.scm (run-help-page): Mention Alt+Shift. > * gnu/installer/keymap.scm (kmscon-update-keymap): Pass on XKB options. > * gnu/installer/record.scm (): Adjust code comments. > * gnu/installer.scm (apply-keymap): Pass on XKB options. > (installer-steps): Adjust code comments. > * gnu/packages/patches/kmscon-runtime-keymap-switch.patch: Apply XKB opti= ons. [...] > +(define %non-latin-layouts > + ;; List of keyboard layouts marked as $nonlatin in xkeyboard-config. Out of curiosity, where did you find that info? Perhaps add the name of the relevant file or XML tag here. > + (apply toggleable-latin-layout > + (list layout (or variant ""))))) Simply: (toggleable-latin-layout layout (or variant "")) This allows the compiler to detect a wrong number of arguments. Go for it, thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 09 00:14:17 2020 Received: (at 40493-done) by debbugs.gnu.org; 9 Apr 2020 04:14:17 +0000 Received: from localhost ([127.0.0.1]:53083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMOa1-0005Z4-B9 for submit@debbugs.gnu.org; Thu, 09 Apr 2020 00:14:17 -0400 Received: from pelzflorian.de ([5.45.111.108]:57864 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMOZy-0005Yv-Is for 40493-done@debbugs.gnu.org; Thu, 09 Apr 2020 00:14:16 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 36E52360566; Thu, 9 Apr 2020 06:14:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1586405653; bh=4JP81DeoGvZaw8npNrn5CyMKdh+EDqo4oygGZ8ekmGM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=JLXtjTyi1htLC8LQkidbzpC5RWJwGPwluOn6uqq1uKqpk0p68MD6ATSMCxjhsrl4R 6W+b9YyycUjRXtU3ierXgYDbPKfHClR9xjfi2QAKda4KVoav7BlsM1FYWYLdhnEux0 IaqoMYtfHgycvszb5I8dWpyGHliYU8DstKBNMEvA= Date: Thu, 9 Apr 2020 06:14:11 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts Message-ID: <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> <87k12q5cyt.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87k12q5cyt.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40493-done Cc: 40493-done@debbugs.gnu.org, Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Apr 08, 2020 at 03:22:34PM +0200, Ludovic Courtès wrote: > Go for it, thank you! I added some more heuristics on whether a layout is Latin or not and after much testing pushed as 91c231a2223440081426929828a23c7baa0214fd. There are still few false positives like non-Kana Japanese layouts that are Latin but toggle to U.S. They can be fixed later. More importantly with 7bc71025ccd0fabd739803889825e10341fbabdf I also fixed a layout’s empty variant "" not being a choice in the installer. The "" variant is the only variant of the Azerbaijani layout providing the Latin script Azerbaijan uses since a few decades, so it is important. I hope the code is alright; maybe I should not have just pushed, but I believe it is alright. Marking as done. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 09 00:21:50 2020 Received: (at 40493-done) by debbugs.gnu.org; 9 Apr 2020 04:21:50 +0000 Received: from localhost ([127.0.0.1]:53090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMOhK-0005mt-2Y for submit@debbugs.gnu.org; Thu, 09 Apr 2020 00:21:50 -0400 Received: from pelzflorian.de ([5.45.111.108]:57922 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMOh9-0005mW-Om for 40493-done@debbugs.gnu.org; Thu, 09 Apr 2020 00:21:48 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 7CF9F360566; Thu, 9 Apr 2020 06:21:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1586406098; bh=Xv4Npoxw326irphjZzKyM6I3ubV9nTS9Exg8ILfwsDU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=1aBBeaB2gpHQrMDcaV85L4dtz2+KakzXyhZ/egmJ+qlZKeyDEABNNv7Fm4TOfOZyA KvBpir9xTPoIA5bZ6J4FVGLEnXjZrGDMVcBLqcyBe3eREdcfG3xga49uFmZQzL3Mlt gevGoTp2G7cXOqXtNH9/SgKcJF0TOpZ5jxk0L/Og= Date: Thu, 9 Apr 2020 06:21:37 +0200 From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts Message-ID: <20200409042137.duu324fhdvn2vuzy@pelzflorian.localdomain> References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> <87k12q5cyt.fsf@gnu.org> <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40493-done Cc: 40493-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, Apr 09, 2020 at 06:14:11AM +0200, pelzflorian (Florian Pelz) wrote: > Marking as done. P.S. Don’t brag with Arabic support in Guix’ installer just yet because Arabs still have to confusedly read from left to right. https://bugs.gnu.org/35319 But that is something to solve later. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 09 03:26:08 2020 Received: (at 40493-done) by debbugs.gnu.org; 9 Apr 2020 07:26:08 +0000 Received: from localhost ([127.0.0.1]:53174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMRZg-0002Rt-2K for submit@debbugs.gnu.org; Thu, 09 Apr 2020 03:26:08 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:45409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMRZe-0002RS-F7 for 40493-done@debbugs.gnu.org; Thu, 09 Apr 2020 03:26:06 -0400 Received: by mail-wr1-f44.google.com with SMTP id v5so10662079wrp.12 for <40493-done@debbugs.gnu.org>; Thu, 09 Apr 2020 00:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=3ymuubl8u82DuODrGCoUGVhu8DnDRD0fD8jllydvB6Y=; b=QZllgic5FOBiOPUgrKKZOg+L5msHtLD1nocO9GDYfL5CO31wmBM3AHWT2IRNE3Lo/c srB1DY/CEbCkpFBrE/Rd8OWJjw8rsMEjMQGxH2kJGdAvYiplPZJhwqqDiuKhwIsAERIF V3B/J0LzzkpsjzpH/Rkx3gbxA9yGgX5S60ztaQ3dC3MwaGbzHTL3tBspfGefnoEWGfIr s/ErdNILhtWp3kU/FGvjQkVN6jSp1pEI5PyTTtGtqKFPCag0KVP9J0/3/5B8oM7Fvj+d jsVyQHrCQmZf+nau9yktMVlnuIE4qJNuS8oQCgo/I7yZYkE8tO+BvgBsnx4v7CcbrPL7 W00w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=3ymuubl8u82DuODrGCoUGVhu8DnDRD0fD8jllydvB6Y=; b=gj0kxhF/jTHsZxRl+PLvAoRj+1lYOVv/1fH01Pk8qIXK8D3XO5JvQx7sOMcHzWUStW nUun+8WSAJ+YDvS9Pc1yj9FHoXRCLgsPHU0nqmN6IlZ0IvSlP07Ixg+zsse3Wb3zKOam is44vOZZpVGuC8gRAL9D4BK5tCDNWsQHp+aWqFGyo+7nwcA+6lo3Jy/3jioKVV/gAogv 9hN5qXGPZksO6XVCWzteNpARrYHY4dWzTF53/KaL5ULbjQuijOHhUFZj3lLPZJC9C1fU T0pZOPPO7XFqk7dAR7Hli49j9pKrBgO/qFucF3Ri5JhMMDo7/75naIAm2jxQYscRj0qj 7YJA== X-Gm-Message-State: AGi0PubqblmbFgJsaGZqaHRmVKQLYVY4kRSGBM8iAsRz1RZ9wYBrzkIs Yn6E0d1DyY3+UehoSP28vNExFQ2Cnjc= X-Google-Smtp-Source: APiQypJhmNEj/iATPpSfD3u6uZRAXrycFRgwG8lI6pdCHMS5lh60j44i5tRF0WvB1V1wVhi6cgsqGg== X-Received: by 2002:a5d:4290:: with SMTP id k16mr12230160wrq.406.1586417160411; Thu, 09 Apr 2020 00:26:00 -0700 (PDT) Received: from meru ([2a01:cb18:832e:5f00:3d57:9f29:9a24:f400]) by smtp.gmail.com with ESMTPSA id a8sm2574329wmb.39.2020.04.09.00.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 00:25:59 -0700 (PDT) From: Mathieu Othacehe To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> <87k12q5cyt.fsf@gnu.org> <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> Date: Thu, 09 Apr 2020 09:25:58 +0200 In-Reply-To: <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Thu, 9 Apr 2020 06:14:11 +0200") Message-ID: <87tv1t15o9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40493-done Cc: 40493-done@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Florian, > I added some more heuristics on whether a layout is Latin or not and > after much testing pushed as 91c231a2223440081426929828a23c7baa0214fd. > There are still few false positives like non-Kana Japanese layouts > that are Latin but toggle to U.S. They can be fixed later. Nice! Thanks for taking care of this :) In the future it would be nice to be able to extract %non-latin-layout by parsing the base file in xkeyboard-config, rather than by maintaining this list, but that's a minor point, and I guess new keyboard layouts are not coming out every day :p Mathieu From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 09 03:36:27 2020 Received: (at 40493-done) by debbugs.gnu.org; 9 Apr 2020 07:36:27 +0000 Received: from localhost ([127.0.0.1]:53180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMRjf-0002id-0o for submit@debbugs.gnu.org; Thu, 09 Apr 2020 03:36:27 -0400 Received: from pelzflorian.de ([5.45.111.108]:58110 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMRjc-0002iU-PX for 40493-done@debbugs.gnu.org; Thu, 09 Apr 2020 03:36:25 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 5F8C1360566; Thu, 9 Apr 2020 09:36:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1586417783; bh=B5LxbxhTXqmtiNbxsYyAXHMHo5kXOOJINztaONAKWYU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=C7U1PtDcfA2ysmGujJKhck7NvHbf0RuF1secv/yDEqM/qk1zmUq6GjaUJYey2ZPJK GkdhcjEHTJrmXIewUegD8HFnv+QZH8PRniKR4gDAVh2f51Db2JLAudAdxNoD/E5PLC zZz/jkArT1oAj5gWeghZvW+6NlBOSuZT1b/DqIhM= Date: Thu, 9 Apr 2020 09:36:21 +0200 From: "pelzflorian (Florian Pelz)" To: Mathieu Othacehe Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts Message-ID: <20200409073621.75oga3qftw5sijeb@pelzflorian.localdomain> References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> <87k12q5cyt.fsf@gnu.org> <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> <87tv1t15o9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tv1t15o9.fsf@gmail.com> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40493-done Cc: 40493-done@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, Apr 09, 2020 at 09:25:58AM +0200, Mathieu Othacehe wrote: > Nice! Thanks for taking care of this :) > :) > In the future it would be nice to be able to extract %non-latin-layout > by parsing the base file in xkeyboard-config, rather than by maintaining > this list, but that's a minor point, and I guess new keyboard layouts > are not coming out every day :p Yes, but the source in /gnu/store/wsykijz9a1p7gx3z8hlmn58v5f5bswp7-xkeyboard-config-2.29/share/X11/xkb/rules/base looks like this: // If you want non-latin layouts implicitly include the en_US layout // uncomment lines below //! $nonlatin = am ara ben bd bg bt by cs deva ge gh gr guj guru il \ // in ir iku jp kan kh kr la lao lk mk mm mn mv mal olck \ // ori pk ru scc sy syr tel th tj tam ua uz I am not sure if parsing that (and filtering out "kr") is worth it. Regards, Florian From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 09 03:55:05 2020 Received: (at 40493-done) by debbugs.gnu.org; 9 Apr 2020 07:55:05 +0000 Received: from localhost ([127.0.0.1]:53193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMS1h-0005E8-2q for submit@debbugs.gnu.org; Thu, 09 Apr 2020 03:55:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMS1e-0005DY-At for 40493-done@debbugs.gnu.org; Thu, 09 Apr 2020 03:55:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMS1Y-0000YP-On; Thu, 09 Apr 2020 03:54:56 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55058 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMS1Y-0003CS-7e; Thu, 09 Apr 2020 03:54:56 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> <87k12q5cyt.fsf@gnu.org> <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 Germinal an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 09 Apr 2020 09:54:54 +0200 In-Reply-To: <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Thu, 9 Apr 2020 06:14:11 +0200") Message-ID: <87v9m93xgx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40493-done Cc: 40493-done@debbugs.gnu.org, Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Florian, "pelzflorian (Florian Pelz)" skribis: > On Wed, Apr 08, 2020 at 03:22:34PM +0200, Ludovic Court=C3=A8s wrote: >> Go for it, thank you! > > I added some more heuristics on whether a layout is Latin or not and > after much testing pushed as 91c231a2223440081426929828a23c7baa0214fd. > There are still few false positives like non-Kana Japanese layouts > that are Latin but toggle to U.S. They can be fixed later. Awesome! > More importantly with 7bc71025ccd0fabd739803889825e10341fbabdf I also > fixed a layout=E2=80=99s empty variant "" not being a choice in the insta= ller. > The "" variant is the only variant of the Azerbaijani layout providing > the Latin script Azerbaijan uses since a few decades, so it is > important. I hope the code is alright; maybe I should not have just > pushed, but I believe it is alright. Good, it=E2=80=99s great you=E2=80=99re paying close attention to this. Th= e patch seems reasonable to me. > P.S. Don=E2=80=99t brag with Arabic support in Guix=E2=80=99 installer ju= st yet > because Arabs still have to confusedly read from left to right. > > https://bugs.gnu.org/35319 > > But that is something to solve later. Yeah. I=E2=80=99ll run the =E2=80=9Cgui-installed=E2=80=9D tests to make sure eve= rything=E2=80=99s is still fine, then run =E2=80=9Cmake release=E2=80=9D and upload files for testing = later today. Thanks a lot, Florian! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 09 11:24:58 2020 Received: (at 40493-done) by debbugs.gnu.org; 9 Apr 2020 15:24:58 +0000 Received: from localhost ([127.0.0.1]:54335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMZ33-0003sM-RT for submit@debbugs.gnu.org; Thu, 09 Apr 2020 11:24:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMZ32-0003s8-DC for 40493-done@debbugs.gnu.org; Thu, 09 Apr 2020 11:24:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jMZ2w-0005XN-IL; Thu, 09 Apr 2020 11:24:50 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42558 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jMZ2w-0007D7-2S; Thu, 09 Apr 2020 11:24:50 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "pelzflorian \(Florian Pelz\)" Subject: Re: bug#40493: installer: Provide a way to select multiple keyboard layouts References: <87369fmd8d.fsf@gmail.com> <20200407175002.uzjqzm7fdgxftrrn@pelzflorian.localdomain> <87wo6r6ngn.fsf@gnu.org> <20200408095812.v3kuwakueh44g6mp@pelzflorian.localdomain> <87k12q5cyt.fsf@gnu.org> <20200409041411.yhi2qpkybn5grsaj@pelzflorian.localdomain> <87tv1t15o9.fsf@gmail.com> <20200409073621.75oga3qftw5sijeb@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 Germinal an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 09 Apr 2020 17:24:48 +0200 In-Reply-To: <20200409073621.75oga3qftw5sijeb@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Thu, 9 Apr 2020 09:36:21 +0200") Message-ID: <87ftdc3cn3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40493-done Cc: 40493-done@debbugs.gnu.org, Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "pelzflorian (Florian Pelz)" skribis: > On Thu, Apr 09, 2020 at 09:25:58AM +0200, Mathieu Othacehe wrote: [...] >> In the future it would be nice to be able to extract %non-latin-layout >> by parsing the base file in xkeyboard-config, rather than by maintaining >> this list, but that's a minor point, and I guess new keyboard layouts >> are not coming out every day :p > > Yes, but the source in > /gnu/store/wsykijz9a1p7gx3z8hlmn58v5f5bswp7-xkeyboard-config-2.29/share/X= 11/xkb/rules/base > looks like this: > > // If you want non-latin layouts implicitly include the en_US layout > // uncomment lines below > //! $nonlatin =3D am ara ben bd bg bt by cs deva ge gh gr guj guru il \ > // in ir iku jp kan kh kr la lao lk mk mm mn mv mal olck \ > // ori pk ru scc sy syr tel th tj tam ua uz > > I am not sure if parsing that (and filtering out "kr") is worth it. Uh, agreed, it doesn=E2=80=99t look like something parseable. Also, presum= ably that list won=E2=80=99t change much over time :-), so it=E2=80=99s OK to ha= ve it hard-coded in Guix IMO. Ludo=E2=80=99. From unknown Sat Aug 16 16:01:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 08 May 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator