Less cryptic choose console keyboard layout
April 20, 2026 —
BarryK
At very first bootup, a list of console keyboard layouts is
displayed in the initrd, and the user is asked to choose one.
However, they are very cryptic, so I have replaced with more
meaningful country names.
The code is in /inc/00functions in the initrd. I have left in the previous display, commented out:
KEYMAP=us
#now ask for KEYMAP... 20260421 less cryptic...
#echo -e '\e[1;;45m 1 azerty 2 be-latin1 3 br-abnt2 4 br-abnt 5 br-latin1-abnt2 6 br-latin1-us
#7 by 8 cf 9 croat 10 cz 11 de 12 de-latin1
#13 dk 14 dvorak 15 dvorak-l 16 dvorak-r 17 es 18 et
#19 fi 20 fr 21 gb 22 gr 23 hu101 24 hu
#25 il 26 it 27 jp106 28 la-latin1 29 lt 30 mk
#31 nl 32 no 33 pl 34 pt-latin1 35 ro 36 ru
#37 se 38 sg 39 sk-qwerty 40 sk-qwertz 41 slovene 42 srp
#43 sv-latin1 44 tr 45 us 46 wangbe \e[0;;m'
echo -e '\e[1;;45m 1 Azerty 2 Belgian-latin1 3 Brazilian-abnt2
4 Brazilian-abnt 5 Brazilian-latin1-abnt2 6 Brazilian-latin1-us
7 Belarus 8 Central African Republic 9 Croatian
10 Czechia 11 Deutsch 12 Deutsch-latin1
13 Denmark 14 Dvorak 15 Dvorak-l
16 Dvorak-r 17 Español 18 Eesti-keel
19 Suomalainen 20 Français 21 Great Britain
22 Ελλάδα 23 Mađarski-101 24 Mađarski
25 Israel 26 Italiano 27 Japanese-106
28 Latin-American-latin1 29 Lietuvių 30 македонски
31 Nederlands 32 Norsk 33 Polski
34 Português-latin1 35 Română 36 Русский
37 Sverige 38 Singapore 39 Slovenský-qwerty
40 Slovenský-qwertz 41 Slovene 42 srp
43 Svenska-latin1 44 Türkçe 45 USA 46 Wangbe \e[0;;m'
echo -n -e '\033[1;;44m'
while read aLINE
do
echo -n ' '
echo -n -e '\033[1G' #move cursor back to col 1.
echo " ${aLINE}"
done << EOT
$(echo " ${S015:-Please enter the number corresponding to your keyboard layout.}")
$(echo "${S016:-Choose the closest match, there will be an opportunity to fine-tune the layout after the desktop has loaded. Press ENTER only for US.}" | fold -s -w 70)
EOT
This cryptic display was criticised in the last review of EasyOS
in Distrowatch. I could make it into a bit more GUI-like with the
'dialog' utility; maybe in the future.
Tags: easy