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

Re: SysRq on titanium powerbook



> ---------------------------------------------------------------------------
> 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

You need to keep track that it's pressed to send appropriate key up as
well I suppose...

Ben.




Reply to: