mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
system: Allow for comma-separated keyboard layouts.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>. * gnu/bootloader/grub.scm (keyboard-layout-file): Replace commas with hyphens in the first argument to 'computed-file'. * gnu/system/keyboard.scm (keyboard-layout->console-keymap): Likewise. * doc/guix.texi (Keyboard Layout): Add example.
This commit is contained in:
parent
f4783d77ed
commit
2729cb406d
3 changed files with 13 additions and 3 deletions
|
@ -11916,6 +11916,9 @@ about. Here are a few example:
|
||||||
;; The Catalan layout.
|
;; The Catalan layout.
|
||||||
(keyboard-layout "es" "cat")
|
(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
|
;; The Latin American Spanish layout. In addition, the
|
||||||
;; "Caps Lock" key is used as an additional "Ctrl" key,
|
;; "Caps Lock" key is used as an additional "Ctrl" key,
|
||||||
;; and the "Menu" key is used as a "Compose" key to enter
|
;; and the "Menu" key is used as a "Compose" key to enter
|
||||||
|
|
|
@ -240,7 +240,11 @@ (define builder
|
||||||
"-i" #+(keyboard-layout->console-keymap layout)
|
"-i" #+(keyboard-layout->console-keymap layout)
|
||||||
"-o" #$output))))
|
"-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))
|
builder))
|
||||||
|
|
||||||
(define (grub-setup-io config)
|
(define (grub-setup-io config)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; 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.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -94,5 +94,8 @@ (define pipe
|
||||||
#$(keyboard-layout-name layout))))))
|
#$(keyboard-layout-name layout))))))
|
||||||
|
|
||||||
(computed-file (string-append "console-keymap."
|
(computed-file (string-append "console-keymap."
|
||||||
(keyboard-layout-name layout))
|
(string-map (match-lambda
|
||||||
|
(#\, #\-)
|
||||||
|
(chr chr))
|
||||||
|
(keyboard-layout-name layout)))
|
||||||
build))
|
build))
|
||||||
|
|
Loading…
Reference in a new issue