[PATCH][2.5] keyboard.c Fix CONFIG_MAGIC_SYSRQ+PrintScreen

From: Chris Heath (chris@heathens.co.nz)
Date: Sun May 04 2003 - 09:47:01 EST


This patch fixes the PrintScreen key when CONFIG_MAGIC_SYSRQ is enabled.
It allows you to use that key normally when Alt is not being pressed.
Patch is against kernel 2.5.68.

Chris

--- a/drivers/char/keyboard.c 2003-04-19 12:52:01.000000000 -0400
+++ b/drivers/char/keyboard.c 2003-04-19 12:57:10.000000000 -0400
@@ -1047,8 +1047,8 @@
                                 printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
 
 #ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */
- if (keycode == KEY_SYSRQ && !rep) {
- sysrq_down = sysrq_alt && down;
+ if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {
+ sysrq_down = down;
                 return;
         }
         if (sysrq_down && down && !rep) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 07 2003 - 22:00:19 EST