Cleanup keymaps a little.
This commit is contained in:
parent
67f792ce4c
commit
05e5865bdc
@ -31,7 +31,6 @@ start()
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local loadkeys_uni= wkeys=
|
|
||||||
local ttydev= n=
|
local ttydev= n=
|
||||||
[ -d /dev/vc ] \
|
[ -d /dev/vc ] \
|
||||||
&& ttydev=/dev/vc/ \
|
&& ttydev=/dev/vc/ \
|
||||||
@ -42,17 +41,9 @@ start()
|
|||||||
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
|
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Turn on unicode if user wants it
|
|
||||||
if yesno ${unicode}; then
|
|
||||||
n=1
|
|
||||||
while [ ${n} -le "${ttyn}" ]; do
|
|
||||||
kbd_mode -u -C "${ttydev}${n}"
|
|
||||||
n=$((${n} + 1))
|
|
||||||
done
|
|
||||||
loadkeys_uni="--unicode"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ebegin "Loading key mappings"
|
ebegin "Loading key mappings"
|
||||||
|
local loadkeys_uni= wkeys=
|
||||||
|
yesno ${unicode} && loadkeys_uni="--unicode"
|
||||||
yesno ${windowskeys} && wkeys="windowkeys"
|
yesno ${windowskeys} && wkeys="windowkeys"
|
||||||
loadkeys -q ${loadkeys_uni} ${wkeys} ${keymap} ${extended_keymaps}
|
loadkeys -q ${loadkeys_uni} ${wkeys} ${keymap} ${extended_keymaps}
|
||||||
eend $? "Error loading key mappings" || return $?
|
eend $? "Error loading key mappings" || return $?
|
||||||
@ -64,21 +55,20 @@ start()
|
|||||||
|
|
||||||
# Set terminal encoding to either ASCII or UNICODE.
|
# Set terminal encoding to either ASCII or UNICODE.
|
||||||
# See utf-8(7) for more information.
|
# See utf-8(7) for more information.
|
||||||
local termencoding= termmsg=
|
local termencoding="%@" termmsg="ASCII" kmode="-a"
|
||||||
if yesno ${unicode}; then
|
if yesno ${unicode}; then
|
||||||
dumpkeys ${dumpkeys_charset:+-c} \
|
dumpkeys ${dumpkeys_charset:+-c} \
|
||||||
${dumpkeys_charset} | loadkeys --unicode
|
${dumpkeys_charset} | loadkeys --unicode
|
||||||
termencoding="%G"
|
termencoding="%G"
|
||||||
termmsg="UTF-8"
|
termmsg="UTF-8"
|
||||||
else
|
kmode="-u"
|
||||||
termencoding="%@"
|
|
||||||
termmsg="ASCII"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ebegin "Setting terminal encoding to" ${termmsg}
|
ebegin "Setting terminal encoding to" ${termmsg}
|
||||||
n=1
|
n=1
|
||||||
while [ ${n} -le "${ttyn}" ]; do
|
while [ ${n} -le "${ttyn}" ]; do
|
||||||
printf "\033%s" "${termencoding}" >"${ttydev}${n}"
|
printf "\033%s" "${termencoding}" >"${ttydev}${n}"
|
||||||
|
kbd_mode "${kmode}" -C "${ttydev}${n}"
|
||||||
n=$((${n} + 1))
|
n=$((${n} + 1))
|
||||||
done
|
done
|
||||||
eend 0
|
eend 0
|
||||||
|
Loading…
Reference in New Issue
Block a user