path: root/
diff options
author Eric Hameleers <>2016-01-05 09:36:14 +0100
committer Eric Hameleers <>2016-01-05 09:36:14 +0100
commitcea6043290fb411ad7c693007e4f62fc8687a02d (patch)
treeb29192a67506b32ace2cdbf5fe91b46be65390c1 /
parent65901f0dd71776c98e228e9df05e900e431224d2 (diff)
Added support for separate configuration of X keyboard layout/variant.
New parameter for the boot commandline: xkb=[language],variant Examples: # Only specify a Xkbvariant, and inherit the console keyboard layout in X: kbd=nl xkb=,sundeadkeys # Define a 'french swiss' layout in X, independent of the console: xkb=ch,fr Two new keyboard/language choices have been added which use this functionality: - german swiss - french swiss (requested by Niki Kovacs). New: if a non-US keyboard layout is selected, the US layout will be added as a secondary layout. Toggling between the two layouts is possible using the Shift-LeftAlt key combo. Also new: the RightAlt key is now defined as the Compose Key in X. Meaning, the combo <RightAlt><"><e> will generate a 'ë character'.
Diffstat (limited to '')
1 files changed, 12 insertions, 11 deletions
diff --git a/ b/
index ed60869..0200ceb 100755
--- a/
+++ b/
@@ -330,10 +330,10 @@ function gen_bootmenu() {
> ${MENUROOTDIR}/vesamenu.cfg
- for KBD in $(cat ${LIVE_TOOLDIR}/languages |grep -Ev "(^ *#|^$)" |cut -d, -f3)
+ for LANCOD in $(cat ${LIVE_TOOLDIR}/languages |grep -Ev "(^ *#|^$)" |cut -d: -f1)
- LANCOD=$(cat ${LIVE_TOOLDIR}/languages |grep ",$KBD," |cut -d, -f1)
- LANDSC=$(cat ${LIVE_TOOLDIR}/languages |grep ",$KBD," |cut -d, -f2)
+ LANDSC=$(cat ${LIVE_TOOLDIR}/languages |grep "^$LANCOD:" |cut -d: -f2)
+ KBD=$(cat ${LIVE_TOOLDIR}/languages |grep "^$LANCOD:" |cut -d: -f3)
# First, create keytab files if they are missing:
if [ ! -f ${MENUROOTDIR}/${KBD}.ktl ]; then
keytab-lilo $(find /usr/share/kbd/keymaps/i386 -name "") $(find /usr/share/kbd/keymaps/i386 -name "${KBD}.map.gz") > ${MENUROOTDIR}/${KBD}.ktl
@@ -362,17 +362,18 @@ EOL
> ${MENUROOTDIR}/menu_${LANCOD}.cfg
# Generate custom language selection submenu for selected keyboard:
- for SUBKBD in $(cat ${LIVE_TOOLDIR}/languages |grep -Ev "(^ *#|^$)" |cut -d, -f3) ; do
+ for SUBCOD in $(cat ${LIVE_TOOLDIR}/languages |grep -Ev "(^ *#|^$)" |cut -d: -f1) ; do
+ SUBKBD=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f3)
cat <<EOL >> ${MENUROOTDIR}/lang_${LANCOD}.cfg
-label $(cat ${LIVE_TOOLDIR}/languages |grep ",$SUBKBD," |cut -d, -f1)
- menu label $(cat ${LIVE_TOOLDIR}/languages |grep ",$SUBKBD," |cut -d, -f2)
+label $(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f1)
+ menu label $(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f2)
if [ "$SUBKBD" = "$KBD" ]; then
echo " menu default" >> ${MENUROOTDIR}/lang_${LANCOD}.cfg
cat <<EOL >> ${MENUROOTDIR}/lang_${LANCOD}.cfg
kernel /boot/generic
- append initrd=/boot/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=$KBD tz=$(cat ${LIVE_TOOLDIR}/languages |grep ",$SUBKBD," |cut -d, -f4) locale=$(cat ${LIVE_TOOLDIR}/languages |grep ",$SUBKBD," |cut -d, -f5)
+ append initrd=/boot/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=$KBD tz=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f4) locale=$(cat ${LIVE_TOOLDIR}/languages |grep "^$SUBCOD:" |cut -d: -f5)
@@ -424,10 +425,10 @@ set default = $sl_lang
# Create the remainder of the selection menus:
- for KBD in $(cat languages |grep -Ev "(^ *#|^$)" |cut -d, -f3) ; do
- LANCOD=$(cat languages |grep ",$KBD," |cut -d, -f1)
- LANDSC=$(cat languages |grep ",$KBD," |cut -d, -f2)
- LANLOC=$(cat languages |grep ",$KBD," |cut -d, -f5)
+ for LANCOD in $(cat languages |grep -Ev "(^ *#|^$)" |cut -d: -f1) ; do
+ LANDSC=$(cat languages |grep "^$LANCOD:" |cut -d: -f2)
+ KBD=$(cat languages |grep "^$LANCOD:" |cut -d: -f3)
+ LANLOC=$(cat languages |grep "^$LANCOD:" |cut -d: -f5)
# Add this entry to the keyboard selection menu:
cat <<EOL >> ${GRUBDIR}/kbd.cfg
menuentry "${LANDSC}" {