Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > edf1ccfec929231c262f21f260341298 > files > 15

kbd-1.12-8.1mdv2008.0.src.rpm

--- keytable	2003-03-04 17:07:09.000000000 -0500
+++ keytable	2003-03-04 17:07:22.000000000 -0500
@@ -19,6 +19,13 @@
 # Source function library.
 . /etc/rc.d/init.d/functions
 
+# check for using Linux keycodes - if so prefix the loadkeys with i386/include
+PREFIX=
+KEYCODE=`grep "dev.mac_hid.keyboard_sends_linux_keycodes" /etc/sysctl.conf | awk '{print $3}'`
+if [ "$KEYCODE" = "1" ];then
+    PREFIX=i386/include/
+fi
+
 case "$1" in
 	start)
 		# Read the keyboard config
@@ -80,11 +87,11 @@
 
 		if [ "$BACKSPACE" = "BackSpace" ]; then
 			echo -n "The BackSpace key sends: ^H" 
-			loadkeys backspace.inc 2> /dev/null \
+			loadkeys ${PREFIX}backspace.inc 2> /dev/null \
 			&& success || failure
 		else
 			echo -n "The BackSpace key sends: ^?"
-			loadkeys delete.inc 2> /dev/null \
+			loadkeys ${PREFIX}delete.inc 2> /dev/null \
 			&& success || failure
 		fi
 		echo