tty/sysrq: More intuitive Shift handling
PATCH 1/1 tty/sysrq: More intuitive Shift handling
Make Alt-SysRq-Shift-<key> behave like Alt-Shift-SysRq-<key>.
--- drivers/tty/sysrq.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/sysrq.c +2 -0
@@ -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:
Signature · 1 line
2.32.0
Greg Kroah-Hartman
maintainerQuoted 1 line · Oskari Pirhonen
Make Alt-SysRq-Shift-<key> behave like Alt-Shift-SysRq-<key>.
Does some documentation also need to be updated here?
Quoted 4 lines · Greg Kroah-Hartman
Quoted 1 line · Oskari Pirhonen
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:
Quoted 9 lines
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:
Quoted 2 lines
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
Quoted 3 lines · Oskari Pirhonen
Make Alt-SysRq-Shift-<key> behave like Alt-Shift-SysRq-<key>.
Signed-off-by Oskari Pirhonen <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html