all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
Cc: 40273@debbugs.gnu.org
Subject: bug#40273: installer: No way to input Latin characters with non-Latin keyboard layouts
Date: Thu, 02 Apr 2020 11:45:01 +0200	[thread overview]
Message-ID: <87k12yql0i.fsf@gnu.org> (raw)
In-Reply-To: <20200331165559.6yfowbvtuoth6vdw@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Tue, 31 Mar 2020 18:55:59 +0200")

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

Hello Florian,

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> 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’ve confirmed that it works as intended
in Xorg and in the console (I’m 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") …)

instead.  Maybe it’s OK to leave the comma here.

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.

Thanks,
Ludo’.


[-- Attachment #2: Type: text/x-patch, Size: 1753 bytes --]

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-config'."
                   "-i" #+(keyboard-layout->console-keymap layout)
                   "-o" #$output))))
 
-  (computed-file (string-append "grub-keymap." (keyboard-layout-name layout))
+  (computed-file (string-append "grub-keymap."
+                                (string-map (match-lambda
+                                              (#\, #\-)
+                                              (chr chr))
+                                            (keyboard-layout-name layout)))
                  builder))
 
 (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 © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -94,5 +94,8 @@ Layout information is taken from the XKEYBOARD-CONFIG package."
                    #$(keyboard-layout-name layout))))))
 
   (computed-file (string-append "console-keymap."
-                                (keyboard-layout-name layout))
+                                (string-map (match-lambda
+                                              (#\, #\-)
+                                              (chr chr))
+                                            (keyboard-layout-name layout)))
                  build))

  parent reply	other threads:[~2020-04-02  9:46 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28 13:42 bug#40273: installer: No way to input Latin characters with non-Latin keyboard layouts pelzflorian (Florian Pelz)
2020-03-28 19:45 ` Mathieu Othacehe
2020-03-30 10:44   ` pelzflorian (Florian Pelz)
2020-03-30 11:35     ` Mathieu Othacehe
2020-03-30 17:11       ` pelzflorian (Florian Pelz)
2020-03-30 17:31         ` pelzflorian (Florian Pelz)
2020-03-31 15:35         ` Ludovic Courtès
2020-03-31 16:55           ` pelzflorian (Florian Pelz)
2020-04-01 20:33             ` Bengt Richter
2020-04-02  6:24               ` pelzflorian (Florian Pelz)
2020-04-02  9:45             ` Ludovic Courtès [this message]
2020-04-03  0:38               ` pelzflorian (Florian Pelz)
2020-04-03  1:11                 ` pelzflorian (Florian Pelz)
2020-04-03 13:31                 ` pelzflorian (Florian Pelz)
2020-04-03 13:59                 ` pelzflorian (Florian Pelz)
2020-04-03 15:20                 ` Ludovic Courtès
2020-04-03 15:56                   ` pelzflorian (Florian Pelz)
2020-04-05 14:03                     ` Ludovic Courtès
2020-04-05 20:02                       ` pelzflorian (Florian Pelz)
2020-04-05 21:26                         ` Ludovic Courtès
2020-03-29 15:04 ` Ludovic Courtès
2020-03-29 17:16   ` pelzflorian (Florian Pelz)
2020-03-29 17:53     ` Mathieu Othacehe
2020-03-30 10:39       ` Mathieu Othacehe
2020-03-30 12:39         ` pelzflorian (Florian Pelz)
2020-03-31 15:29         ` Ludovic Courtès
2020-04-01 12:49           ` Mathieu Othacehe
2020-03-31 15:28       ` Ludovic Courtès
2020-04-01 12:52         ` Mathieu Othacehe
2020-04-02 10:25           ` Ludovic Courtès
2020-04-02 11:40             ` Mathieu Othacehe
2020-04-06  7:52               ` Ludovic Courtès
2020-04-06 13:14                 ` Mathieu Othacehe
2020-04-07  9:49                   ` Ludovic Courtès
2020-04-07 17:14                     ` Mathieu Othacehe
2020-04-02 23:27             ` Bengt Richter
2020-04-03 23:17               ` pelzflorian (Florian Pelz)
2020-04-08  7:20                 ` Bengt Richter
2020-04-08  9:42                   ` Ludovic Courtès
2020-04-08 21:11                     ` Bengt Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k12yql0i.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=40273@debbugs.gnu.org \
    --cc=pelzflorian@pelzflorian.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.