commit 930ac06407eafd033f061cd06f6000013524fec1 parent 1b01275abeff1c6c851c5cd09ea17ad635447700 Author: Kévin Le Gouguec <kevin.legouguec@gmail.com> Date: Sat, 7 Aug 2021 16:22:05 +0200 Explain how to configure keyboard for TTYs Diffstat:
| A | guides/setups/operating-systems/console.org | | | 19 | +++++++++++++++++++ |
| M | guides/setups/operating-systems/opensuse.org | | | 2 | +- |
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/guides/setups/operating-systems/console.org b/guides/setups/operating-systems/console.org @@ -0,0 +1,19 @@ +* Keyboard settings +Debian's =console-setup= package provides =setupcon=, a neat utility +that reads XKB settings from =/etc/default/keyboard= and translates +them to whatever format the Linux console understands. + +To get something similar to =ctrl:nocaps= on distros that do not +feature this utility: +#+begin_src sh +$ localectl | grep "VC Keymap" # To spot the current KEYMAP. +$ sudo mkdir -p /usr/local/share/kbd/keymaps +# KEYMAPS_DIR: depending on the distro: +# - /usr/share/kbd/keymaps/xkb +# - /lib/kbd/keymaps/xkb +$ gunzip --stdout ${KEYMAPS_DIR}/${KEYMAP}.map.gz | + sed 's/^keycode 58 = .*$/keycode 58 = Control/' | + sudo tee /usr/local/share/kbd/keymaps/${KEYMAP}-nocaps.map +# In /etc/vconsole.conf, change KEYMAP to ^this^ absolute filename. +# Reboot. +#+end_src diff --git a/guides/setups/operating-systems/opensuse.org b/guides/setups/operating-systems/opensuse.org @@ -71,7 +71,7 @@ Following instructions from [[https://en.opensuse.org/SDB:Administer_with_sudo][ #+begin_src sh $ sudo localectl set-x11-keymap fr pc105 latin9 ctrl:nocaps #+end_src -No idea how to get =ctrl:nocaps= to work for the TTY… +To set this for TTYs: cf. [[./console.org]]. * Packages that took me more than one minute to find ** spell-checking - hunspell