PKGBUILDs/core/klibc-kbd/keymap_hook

27 lines
752 B
Bash

# vim: set ft=sh:
run_hook ()
{
msg -n ":: Loading keymap..."
. /keymap
if [ "${UTF8}" = "yes" ]; then
/bin/kbd_mode -u
printf "\033%%G" >> /dev/console
[ -n "${KEYMAP}" ] && /bin/loadkeys -q -u ${KEYMAP}
else
/bin/kbd_mode -a
printf "\033%%@" >> /dev/console
[ -n "${KEYMAP}" ] && /bin/loadkeys -q ${KEYMAP}
fi
if [ -n "${CONSOLEFONT}" ]; then
if [ "${UTF8}" = "yes" ]; then
CONSOLEMAP=""
fi
if [ -n "${CONSOLEMAP}" ]; then
/bin/setfont -m ${CONSOLEMAP} ${CONSOLEFONT} -C /dev/console
else
/bin/setfont ${CONSOLEFONT} -C /dev/console
fi
printf "\033(K" >> /dev/console
fi
msg "done."
}