summaryrefslogtreecommitdiffstats
path: root/hooks/keymap
blob: afdb628ad07f90affdd50efb2a0d6a8d580066ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# vim: set ft=sh:
run_hook ()
{
    if [ -e /keymap.bin ]; then
        msg -n ":: Loading keymap..."
        if [ -f /keymap.utf8 ]; then
          mode=-u
          ctrl=G
        else
          mode=-a
          ctrl=@
        fi
        kbd_mode $mode -C /dev/console
        printf "\033%%$ctrl" >> /dev/console
        loadkmap < /keymap.bin
        msg "done."
    fi
}