Re: [PATCH] tty/sysrq: More intuitive Shift handling

From: Oskari Pirhonen
Date: Mon Sep 27 2021 - 09:30:32 EST

On Mon, Sep 27, 2021 at 06:42:11AM +0200, Greg Kroah-Hartman wrote:
> On Sat, Sep 25, 2021 at 11:42:48PM -0500, Oskari Pirhonen wrote:
> > Make Alt-SysRq-Shift-<key> behave like Alt-Shift-SysRq-<key>.
> Does some documentation also need to be updated here?

There wasn't any documentation about it to begin with which lead to the
patch in the first place. Documentation/admin-guide/sysrq.rst only says
this about it:

> How do I use the magic SysRq key?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> On x86
> You press the key combo :kbd:`ALT-SysRq-<command key>`.
> ... snip ...
> The :kbd:`<command key>` is case sensitive.

I couldn't figure out why an event I had registered onto a capital key
wasn't being triggered until a friend told me that I needed to press
Alt-Shift-SysRq-<key>. AFAICT, the only place that the proper keystroke
is even mentioned is in the commit message for a27eb0cb4b21:

> For already existing SysRq operations the user presses Alt-SysRq-<key>, and
> for the newly added ones Alt-Shift-SysRq-<key>.

If you think adding to the documentation is useful then I can submit a
v2. Although I believe that this patch makes it redundant since "case
sensitive" implies Shift, and for many people, the natural place to hit
the Shift key is likely to be right before the relevant <key>.

- Oskari