/[baselayout]/trunk/init.d/keymaps
Gentoo

Contents of /trunk/init.d/keymaps

Parent Directory Parent Directory | Revision Log Revision Log


Revision 484 - (show annotations) (download)
Wed Apr 21 17:09:18 2004 UTC (15 years, 1 month ago) by vapier
File size: 1031 byte(s)
update copyright years

1 #!/sbin/runscript
2 # Copyright 1999-2004 Gentoo Technologies, Inc.
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header$
5
6 depend() {
7 need localmount
8 }
9
10 checkconfig() {
11 if [ -z "${KEYMAP}" ]
12 then
13 eerror "You need to setup \$KEYMAP in /etc/rc.conf first"
14 return 1
15 fi
16 }
17
18 start() {
19 local WINDOWKEYS_KEYMAP=
20
21 checkconfig || return 1
22
23 # Force linux keycodes for PPC ...
24 if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]
25 then
26 echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
27 fi
28
29 ebegin "Loading key mappings"
30
31 # Enable unicode ...
32 set -- ${KEYMAP}
33 if [ "$1" = "-u" ]
34 then
35 /usr/bin/kbd_mode -u
36 KEYMAP="${KEYMAP/-u}"
37 fi
38
39 # New kbd support ...
40 if [ -x /bin/loadkeys ]
41 then
42 [ "${SET_WINDOWKEYS}" = "yes" ] && WINDOWKEYS_KEYMAP="windowkeys"
43
44 /bin/loadkeys -q ${WINDOWKEYS_KEYMAP} ${KEYMAP} \
45 ${EXTENDED_KEYMAPS} >/dev/null
46 else
47 eend 1 "loadkeys executable not found"
48 return 1
49 fi
50 eend $? "Error loading key mappings"
51 }
52
53
54 # vim:ts=4

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20