Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5dec511 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

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: default avatarÉric Piel <E.A.B.Piel@tudelft.nl>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent cd9b6fdf
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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)
		else {
			if (sysrq_down && code == sysrq_alt_use)
				sysrq_down = false;

			sysrq_alt = 0;
		}
		break;

	case KEY_SYSRQ: