Skip to contentSkip to conversation

i18n: support KEYMAP_TOGGLE from vconsole.conf

PATCH New Andrey Borzenkov 1 participant 1 message Nov 15, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i18n: support KEYMAP_TOGGLE from vconsole.conf

Support KEYMAP_TOGGLE for switching keyboard layout. This is what GRP_TOGGLE most likey maps to.

---
 modules.d/10i18n/README       |    2 +-
 modules.d/10i18n/console_init |    2 +-
 modules.d/10i18n/install      |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
modules.d/10i18n/README +1 -1
index b2204cd..1007763 100644
@@ -47,6 +47,7 @@ The following variables are used by i18n install script and at initramfs
 runtime:
 
     KEYMAP - keyboard translation table loaded by loadkeys
+    KEYMAP_TOGGLE - map that defines characters to switch keyboard layouts
     EXT_KEYMAPS - list of extra keymaps to bo loaded (sep. by space)
     UNICODE - boolean, indicating UTF-8 mode
     FONT - console font
@@ -56,7 +57,6 @@ runtime:
 The following are appended to EXT_KEYMAPS only during build time:
 
     UNIKEYMAP
-    GRP_TOGGLE
 
 They were used in 10redhat-i18n module, but not sure of its purpose.
 I'm leaving it in case...  The following are taken from the environment:
modules.d/10i18n/console_init +1 -1
index bdd39b0..dde550a 100755
@@ -36,7 +36,7 @@ set_keymap() {
 
     [ "${UNICODE}" = 1 ] && utf_switch=-u
 
-    loadkeys -q ${utf_switch} ${KEYMAP} ${EXT_KEYMAPS}
+    loadkeys -q ${utf_switch} ${KEYMAP} ${KEYMAP_TOGGLE} ${EXT_KEYMAPS}
 }
 
 set_font() {
modules.d/10i18n/install +3 -3
index 96d563d..0daf920 100755
@@ -102,9 +102,9 @@ install_local_i18n() {
 
     # Gentoo user may have KEYMAP set to something like "-u pl2",
     KEYMAP=${KEYMAP#-* }
-    # I'm not sure of the purpose of UNIKEYMAP and GRP_TOGGLE.  They were in
+    # I'm not sure of the purpose of UNIKEYMAP.  It was in
     # original redhat-i18n module.  Anyway it won't hurt.
-    EXT_KEYMAPS+=\ ${UNIKEYMAP}\ ${GRP_TOGGLE}
+    EXT_KEYMAPS+=\ ${UNIKEYMAP}
 
     [[ ${KEYMAP} ]] || dwarning 'No KEYMAP.' || return 1
     findkeymap ${KEYMAP}
@@ -157,7 +157,7 @@ install_local_i18n() {
     mksubdirs ${initdir}${I18N_CONF}
     mksubdirs ${initdir}${VCONFIG_CONF}
     print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}
-    print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
+    print_vars KEYMAP KEYMAP_TOGGLE EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
     return 0
 }
 
Signature · 1 line
tg: (325d491..) upstream/01-keymap_toggle (depends on: master)