2003-05-04 14:32:39

by

[permalink] [raw]
Subject: [PATCH][2.5] keyboard.c Fix CONFIG_MAGIC_SYSRQ+PrintScreen

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