lkml.org 
[lkml]   [2020]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] tty/sysrq: Extend the sysrq_key_table to cover capital letters
From
Date
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

\
 
 \ /
  Last update: 2020-08-12 13:29    [W:0.056 / U:2.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site