Archived
14
0
Fork 0

Input: sysrq - fix "stuck" SysRq mode

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>
This commit is contained in:
Dmitry Torokhov 2010-06-09 08:13:06 -07:00
parent cd9b6fdf79
commit f5dec51172

View file

@ -580,8 +580,12 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type,
case KEY_RIGHTALT: case KEY_RIGHTALT:
if (value) if (value)
sysrq_alt = code; sysrq_alt = code;
else if (sysrq_down && code == sysrq_alt_use) else {
if (sysrq_down && code == sysrq_alt_use)
sysrq_down = false; sysrq_down = false;
sysrq_alt = 0;
}
break; break;
case KEY_SYSRQ: case KEY_SYSRQ: