All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty/sysrq: More intuitive Shift handling
@ 2021-09-26  4:42 Oskari Pirhonen
  2021-09-27  4:42 ` Greg Kroah-Hartman
  2021-10-01 10:11 ` Pavel Machek
  0 siblings, 2 replies; 4+ messages in thread
From: Oskari Pirhonen @ 2021-09-26  4:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Jiri Slaby

Make Alt-SysRq-Shift-<key> behave like Alt-Shift-SysRq-<key>.

Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
---
 drivers/tty/sysrq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index c911196ac893..4d3dbe62daf8 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -843,6 +843,8 @@ static bool sysrq_handle_keypress(struct sysrq_state *sysrq,
 			sysrq->shift = KEY_RESERVED;
 		else if (value != 2)
 			sysrq->shift = code;
+		if (sysrq->active)
+			sysrq->shift_use = sysrq->shift;
 		break;
 
 	case KEY_SYSRQ:
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tty/sysrq: More intuitive Shift handling
  2021-09-26  4:42 [PATCH] tty/sysrq: More intuitive Shift handling Oskari Pirhonen
@ 2021-09-27  4:42 ` Greg Kroah-Hartman
  2021-09-27 13:32   ` Oskari Pirhonen
  2021-10-01 10:11 ` Pavel Machek
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-09-27  4:42 UTC (permalink / raw)
  To: Oskari Pirhonen, linux-kernel, Jiri Slaby

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tty/sysrq: More intuitive Shift handling
  2021-09-27  4:42 ` Greg Kroah-Hartman
@ 2021-09-27 13:32   ` Oskari Pirhonen
  0 siblings, 0 replies; 4+ messages in thread
From: Oskari Pirhonen @ 2021-09-27 13:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tty/sysrq: More intuitive Shift handling
  2021-09-26  4:42 [PATCH] tty/sysrq: More intuitive Shift handling Oskari Pirhonen
  2021-09-27  4:42 ` Greg Kroah-Hartman
@ 2021-10-01 10:11 ` Pavel Machek
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2021-10-01 10:11 UTC (permalink / raw)
  To: Oskari Pirhonen, linux-kernel, Greg Kroah-Hartman, Jiri Slaby

On Sat 2021-09-25 23:42:48, Oskari Pirhonen wrote:
> Make Alt-SysRq-Shift-<key> behave like Alt-Shift-SysRq-<key>.
> 
> Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-01 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-26  4:42 [PATCH] tty/sysrq: More intuitive Shift handling Oskari Pirhonen
2021-09-27  4:42 ` Greg Kroah-Hartman
2021-09-27 13:32   ` Oskari Pirhonen
2021-10-01 10:11 ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.