Lines 15-21
start()
Link Here
|
15 |
{ |
15 |
{ |
16 |
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}} |
16 |
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}} |
17 |
: ${unicode:=$UNICODE} |
17 |
: ${unicode:=$UNICODE} |
18 |
: =${keymap:=$KEYMAP} |
18 |
: ${keymap:=$KEYMAP} |
19 |
: ${extended_keymaps:=$EXTENDED_KEYMAPS} |
19 |
: ${extended_keymaps:=$EXTENDED_KEYMAPS} |
20 |
: ${windowkeys:=$SET_WINDOWSKEYS} |
20 |
: ${windowkeys:=$SET_WINDOWSKEYS} |
21 |
: ${fix_euro:=$FIX_EURO} |
21 |
: ${fix_euro:=$FIX_EURO} |
Lines 34-64
start()
Link Here
|
34 |
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes |
34 |
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes |
35 |
fi |
35 |
fi |
36 |
|
36 |
|
37 |
ebegin "Loading key mappings [$keymap]" |
37 |
local wkeys= kmode="-a" msg="ASCII" |
38 |
local loadkeys_uni= wkeys= kmode="-a" msg="ASCII" |
|
|
39 |
if yesno $unicode; then |
38 |
if yesno $unicode; then |
40 |
loadkeys_uni="--unicode" |
|
|
41 |
kmode="-u" |
39 |
kmode="-u" |
42 |
msg="UTF-8" |
40 |
msg="UTF-8" |
43 |
fi |
41 |
fi |
44 |
yesno $windowkeys && wkeys="windowkeys" |
42 |
yesno $windowkeys && wkeys="windowkeys" |
45 |
loadkeys -q $loadkeys_uni $wkeys $keymap $extended_keymaps |
|
|
46 |
eend $? "Error loading key mappings" || return $? |
47 |
|
48 |
if yesno $fix_euro; then |
49 |
ebegin "Fixing font for euro symbol" |
50 |
# Fix some fonts displaying the Euro, #173528. |
51 |
echo "altgr keycode 18 = U+20AC" | loadkeys -q |
52 |
eend $? |
53 |
fi |
54 |
|
43 |
|
55 |
# Set terminal encoding to either ASCII or UNICODE. |
44 |
# Set terminal encoding to either ASCII or UNICODE. |
56 |
# See utf-8(7) for more information. |
45 |
# See utf-8(7) for more information. |
57 |
ebegin "Setting keyboard mode [$msg]" |
46 |
ebegin "Setting keyboard mode [$msg]" |
58 |
if yesno $unicode; then |
|
|
59 |
dumpkeys ${dumpkeys_charset:+-c} \ |
60 |
$dumpkeys_charset | loadkeys --unicode |
61 |
fi |
62 |
n=1 |
47 |
n=1 |
63 |
while [ $n -le $ttyn ]; do |
48 |
while [ $n -le $ttyn ]; do |
64 |
kbd_mode $kmode -C $ttydev$n |
49 |
kbd_mode $kmode -C $ttydev$n |
Lines 66-71
start()
Link Here
|
66 |
done |
51 |
done |
67 |
eend 0 |
52 |
eend 0 |
68 |
|
53 |
|
|
|
54 |
ebegin "Loading key mappings [$keymap]" |
55 |
loadkeys -q $wkeys $keymap $extended_keymaps |
56 |
eend $? "Error loading key mappings" || return $? |
57 |
|
58 |
if yesno $fix_euro; then |
59 |
ebegin "Fixing font for euro symbol" |
60 |
# Fix some fonts displaying the Euro, #173528. |
61 |
echo "altgr keycode 18 = U+20AC" | loadkeys -q |
62 |
eend $? |
63 |
fi |
64 |
|
69 |
# Save the keymapping for use immediately at boot |
65 |
# Save the keymapping for use immediately at boot |
70 |
if [ -w "$RC_LIBEXECDIR" ]; then |
66 |
if [ -w "$RC_LIBEXECDIR" ]; then |
71 |
mkdir -p "$RC_LIBEXECDIR"/console |
67 |
mkdir -p "$RC_LIBEXECDIR"/console |