[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SysRq on titanium powerbook



I could not find any way to get keycode 0x69 to come out of the
adb keyboard on my powerbook. The patch below (against 2.6.11)
changes Fn+F12 to provide this.
Now if I press Fn+Option+F12+command I get the SysReq stuff.

If anyone knows how to generate 0x69 let me know. Could not find
any info on the raw keycodes of the keyboard.

-- 
Martin

$ cat /proc/cpuinfo 
processor       : 0
cpu             : 7455, altivec supported
clock           : 800MHz
revision        : 2.1 (pvr 8001 0201)
bogomips        : 798.32
machine         : PowerBook3,4
motherboard     : PowerBook3,4 MacRISC2 MacRISC Power Macintosh
detected as     : 73 (PowerBook Titanium III)
pmac flags      : 0000001b
L2 cache        : 256K unified
memory          : 512MB
pmac-generation : NewWorld

---------------------------------------------------------------------------
Index: 2.6/drivers/macintosh/adbhid.c
===================================================================
--- 2.6.orig/drivers/macintosh/adbhid.c	2005-08-15 13:49:27.000000000 +0100
+++ 2.6/drivers/macintosh/adbhid.c	2005-08-15 15:05:47.000000000 +0100
@@ -70,6 +70,7 @@
 #define ADB_KEY_CMD		0x37
 #define ADB_KEY_CAPSLOCK	0x39
 #define ADB_KEY_FN		0x3f
+#define ADB_KEY_F12		0x6f
 #define ADB_KEY_FWDEL		0x75
 #define ADB_KEY_POWER_OLD	0x7e
 #define ADB_KEY_POWER		0x7f
@@ -343,6 +344,14 @@
 				ahid->flags |= FLAG_EMU_FWDEL_DOWN;
 		}
 		break;
+#ifdef CONFIG_MAGIC_SYSRQ
+	case ADB_KEY_F12:
+		/* Map Fn+F12 to SysRq. Input driver checks that Alt is pressed too. */
+		if (ahid->flags & FLAG_FN_KEY_PRESSED) {
+			keycode = 0x69;
+		}
+		break;
+#endif
 #endif /* CONFIG_PPC_PMAC */
 	}
 



Reply to: