Try this:
Open a (ssh) console and execute the following code block
Code:
--------------------
## * Create script to override language based automatic keyboard layout
selection
cat > /root/slim-set-kbmap.sh <<EOF
#!/bin/sh
#
# script to override the language based automatic keyboard layout selection
in SqueezePlay
# - takes an alpha-2 ISO country code as input
# - if the input is invalid, empty or unsupported, then the script will
restore default behaviour.
#
# (c) 2022 gordonb3
inputlang="\$1.."
if [[ "\${inputlang:0:2}" == "\$1" ]]; then
ISOlang=\$(grep -i -m1 -o "'qwerty_\$1'" /usr/share/jive/jive/ui/Keyboard.lua
| grep -i -o \$1)
newkbdlang="'\${ISOlang}'"
else
newkbdlang="locale"
fi
if \$(grep -q "kbType .. '_' .. \${newkbdlang}"
/usr/share/jive/jive/ui/Keyboard.lua); then
echo "keyboard layout is already set to \${newkbdlang/locale/default}"
else
echo "setting keyboard layout to \${newkbdlang/locale/default}"
sed -e "s/\(local localizedKeyboard\).*$/\\1 = kbType .. '_' ..
\${newkbdlang}/" \
-i /usr/share/jive/jive/ui/Keyboard.lua
echo -e "\nNote: you must restart SqueezePlay for the change to take effect"
fi
EOF
## * Mark the script as executable
chmod +x /root/slim-set-kbmap.sh
## * Execute script to set the keyboard map to German (DE)
/root/slim-set-kbmap.sh de
--------------------
------------------------------------------------------------------------
gordonb3's Profile: http://forums.slimdevices.com/member.php?userid=71050
View this thread: http://forums.slimdevices.com/showthread.php?t=115763
_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss