aboutsummaryrefslogtreecommitdiff
path: root/gnu/installer.scm
diff options
context:
space:
mode:
authorFlorian Pelz <pelzflorian@pelzflorian.de>2020-04-09 02:17:22 +0200
committerFlorian Pelz <pelzflorian@pelzflorian.de>2020-04-09 02:42:54 +0000
commit91c231a2223440081426929828a23c7baa0214fd (patch)
treedb6adbba3f79d4cdaa1db0ee33938ced07763a0f /gnu/installer.scm
parent543516ed0040df28eb15ea9b15ce905c038671c5 (diff)
downloadpatches-91c231a2223440081426929828a23c7baa0214fd.tar
patches-91c231a2223440081426929828a23c7baa0214fd.tar.gz
installer: Allow Alt+Shift toggle from non-Latin keyboard layouts.
Fixes <https://bugs.gnu.org/40493>. * gnu/installer/newt/keymap.scm (%non-latin-layouts): New variable. (%non-latin-variants): New variable. (%latin-layout+variants): New variable. (toggleable-latin-layout): New procedure to compute combined layouts. (run-keymap-page): Use it. (keyboard-layout->configuration): Apply it in config.scm. (run-layout-page): Mention Alt+Shift. * gnu/installer/keymap.scm (kmscon-update-keymap): Pass on XKB options. * gnu/installer/record.scm (<installer>): 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.
Diffstat (limited to 'gnu/installer.scm')
-rw-r--r--gnu/installer.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 6cd3995e51..d2b7fc327d 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; 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"))