Skip to content

Commit

Permalink
Input: sysrq - fix "stuck" SysRq mode
Browse files Browse the repository at this point in the history
This shoud fix the problem with SysRq mode staying half-way enabled
and interfereing with normal PrtScrn operation after user presses ALT
for the first time.

Reported-and-tested-by: Éric Piel <E.A.B.Piel@tudelft.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Jun 9, 2010
1 parent cd9b6fd commit f5dec51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/char/sysrq.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,12 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type,
case KEY_RIGHTALT:
if (value)
sysrq_alt = code;
else if (sysrq_down && code == sysrq_alt_use)
sysrq_down = false;
else {
if (sysrq_down && code == sysrq_alt_use)
sysrq_down = false;

sysrq_alt = 0;
}
break;

case KEY_SYSRQ:
Expand Down

0 comments on commit f5dec51

Please sign in to comment.