[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf903783-af28-98cb-dee1-75ba185d0a61@suse.com>
Date: Wed, 12 Aug 2020 13:28:27 +0200
From: Jiri Slaby <jslaby@...e.com>
To: Andrzej Pietrasiewicz <andrzej.p@...labora.com>,
linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
linux-input@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH 1/2] tty/sysrq: Extend the sysrq_key_table to cover
capital letters
On 04. 08. 20, 18:24, Andrzej Pietrasiewicz wrote:
> All slots in sysrq_key_table[] are either used, reserved or at least
> commented with their intended use. This patch adds capital letter versions
> available, which means adding 26 more entries.
>
> For already existing SysRq operations the user presses Alt-SysRq-<key>, and
> for the newly added ones Alt-Shift-SysRq-<key>.
And on some keyboards Alt-Fn-Shift-SysRq-<key>. Ugh.
...
> @@ -833,8 +873,13 @@ static bool sysrq_handle_keypress(struct sysrq_state *sysrq,
>
> default:
> if (sysrq->active && value && value != 2) {
> + unsigned char c = sysrq_xlate[code];
> +
> sysrq->need_reinject = false;
> - __handle_sysrq(sysrq_xlate[code], true);
> + if (sysrq->shift_use != KEY_RESERVED)
> + if (c >= 'a' && c <= 'z')
> + c &= ~(1 << 5); /* to uppercase */
c = toupper(c);
instead of the whole if.
> + __handle_sysrq(c, true);
> }
> break;
> }
>
thanks,
--
js
suse labs
Powered by blists - more mailing lists