提交 f5dec511 编写于 作者: D Dmitry Torokhov

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: NÉric Piel <E.A.B.Piel@tudelft.nl>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 cd9b6fdf
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册