aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi3
-rw-r--r--gnu/bootloader/grub.scm6
-rw-r--r--gnu/system/keyboard.scm7
3 files changed, 13 insertions, 3 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index bc5602474e..67cedaec1b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11916,6 +11916,9 @@ about. Here are a few example:
;; The Catalan layout.
(keyboard-layout "es" "cat")
+;; Arabic layout with "Alt-Shift" to switch to US layout.
+(keyboard-layout "ar,us" #:options '("grp:alt_shift_toggle"))
+
;; The Latin American Spanish layout. In addition, the
;; "Caps Lock" key is used as an additional "Ctrl" key,
;; and the "Menu" key is used as a "Compose" key to enter
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))