aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-30 16:36:18 +0000
committerRoy Marples <roy@marples.name>2008-01-30 16:36:18 +0000
commit05e5865bdccd90c803eaa18a04d07ed6730b5f8e (patch)
tree50f6571b5ca12091ac9a751ad18724f7077efea8
parent67f792ce4ca0179f1b34de2e2ed5235623d0e89b (diff)
Cleanup keymaps a little.
-rwxr-xr-xinit.d.Linux/keymaps20
1 files changed, 5 insertions, 15 deletions
diff --git a/init.d.Linux/keymaps b/init.d.Linux/keymaps
index 5e21765a..fb7d9b2d 100755
--- a/init.d.Linux/keymaps
+++ b/init.d.Linux/keymaps
@@ -31,7 +31,6 @@ start()
return 1
fi
- local loadkeys_uni= wkeys=
local ttydev= n=
[ -d /dev/vc ] \
&& ttydev=/dev/vc/ \
@@ -42,17 +41,9 @@ start()
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
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"
+ local loadkeys_uni= wkeys=
+ yesno ${unicode} && loadkeys_uni="--unicode"
yesno ${windowskeys} && wkeys="windowkeys"
loadkeys -q ${loadkeys_uni} ${wkeys} ${keymap} ${extended_keymaps}
eend $? "Error loading key mappings" || return $?
@@ -64,21 +55,20 @@ start()
# Set terminal encoding to either ASCII or UNICODE.
# See utf-8(7) for more information.
- local termencoding= termmsg=
+ local termencoding="%@" termmsg="ASCII" kmode="-a"
if yesno ${unicode}; then
dumpkeys ${dumpkeys_charset:+-c} \
${dumpkeys_charset} | loadkeys --unicode
termencoding="%G"
termmsg="UTF-8"
- else
- termencoding="%@"
- termmsg="ASCII"
+ kmode="-u"
fi
ebegin "Setting terminal encoding to" ${termmsg}
n=1
while [ ${n} -le "${ttyn}" ]; do
printf "\033%s" "${termencoding}" >"${ttydev}${n}"
+ kbd_mode "${kmode}" -C "${ttydev}${n}"
n=$((${n} + 1))
done
eend 0