linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.com>
To: Andrzej Pietrasiewicz <andrzej.p@collabora.com>,
	linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH 1/2] tty/sysrq: Extend the sysrq_key_table to cover capital letters
Date: Wed, 12 Aug 2020 13:28:27 +0200	[thread overview]
Message-ID: <bf903783-af28-98cb-dee1-75ba185d0a61@suse.com> (raw)
In-Reply-To: <20200804162402.2087-2-andrzej.p@collabora.com>

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

  reply	other threads:[~2020-08-12 11:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 16:24 [PATCH 0/2] Add configurable handler to execute a compound action Andrzej Pietrasiewicz
2020-08-04 16:24 ` [PATCH 1/2] tty/sysrq: Extend the sysrq_key_table to cover capital letters Andrzej Pietrasiewicz
2020-08-12 11:28   ` Jiri Slaby [this message]
2020-08-12 11:32   ` Jiri Slaby
2020-08-04 16:24 ` [PATCH 2/2] tty/sysrq: Add configurable handler to execute a compound action Andrzej Pietrasiewicz
2020-08-12 11:45   ` Jiri Slaby
2020-08-17 13:32     ` Andrzej Pietrasiewicz
2021-09-29 22:31   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf903783-af28-98cb-dee1-75ba185d0a61@suse.com \
    --to=jslaby@suse.com \
    --cc=andrzej.p@collabora.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@collabora.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).