summaryrefslogtreecommitdiffstats
path: root/hooks/keymap
blob: a5ae9d06e79db731f85cae63fbf31b66feaf668a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/ash

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
}

# vim: set ft=sh ts=4 sw=4 et: