Bug 386253 - Impossible to set Alt+Print shortcut
Summary: Impossible to set Alt+Print shortcut
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (show other bugs)
Version: 5.20.3
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords:
: 389787 405198 413264 432848 434861 474844 (view as bug list)
Depends on:
Blocks: 362061
  Show dependency treegraph
 
Reported: 2017-10-27 15:17 UTC by Patrick Silva
Modified: 2024-01-29 17:43 UTC (History)
21 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2017-10-27 15:17:07 UTC
I want set alt+print as shortcut to capture active window but shorcuts kcm does allow.

Spectacle 17.08.2 on Arch
Comment 1 Patrick Silva 2017-10-27 15:17:55 UTC
Sorry, I meant "... does NOT allow".
Comment 2 Yan 2017-10-29 14:45:59 UTC
Me too

By the way "Win" key is not available as modifier too. But Kde menus are still activated by this combination
Comment 3 ariasuni 2018-11-13 18:08:05 UTC
I still have this problem with:
KDE Plasma Version: 5.14.3
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.2
Comment 4 Patrick Silva 2019-03-08 19:28:24 UTC
*** Bug 405198 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2020-04-30 17:26:22 UTC
Still a problem in the new KCM, and not fixed with https://phabricator.kde.org/D29292. Other shortcuts with Alt as the only modifier key seem to work, but Alt+Print does not.

Maybe an issue with KKeySequence's focus?
Comment 6 David Redondo 2020-06-18 13:13:28 UTC
That's probably because alt+print is mapped as sysrq
Comment 7 Nate Graham 2020-06-18 14:47:40 UTC
Perhaps we should disallow setting that shortcut in the KCM, then?
Comment 8 David Redondo 2020-06-18 15:08:59 UTC
Disallow? I mean it is currently not possible
Comment 9 Nate Graham 2020-06-18 15:34:36 UTC
Oh duh.

So I guess we just need some kind of notification so the user knows why it's not allowed, or else they think it's a bug.
Comment 10 David Redondo 2021-02-12 11:29:08 UTC
*** Bug 432848 has been marked as a duplicate of this bug. ***
Comment 11 David Redondo 2021-02-15 08:10:22 UTC
I just had a look again and I get after releasing one of they key a delayed KeyPress and KeyRelease event with Key=SysRq as nativeVirtualKey. 
https://doc.qt.io/qt-5/qkeyevent.html#nativeVirtualKey

So it might be possible to show a warning or info box, just have to think about the best way to do this.
Comment 12 Nate Graham 2021-03-10 00:44:45 UTC
*** Bug 389787 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2021-03-10 22:11:34 UTC
*** Bug 413264 has been marked as a duplicate of this bug. ***
Comment 14 David Redondo 2021-03-24 07:45:52 UTC
*** Bug 434861 has been marked as a duplicate of this bug. ***
Comment 15 kderemie 2021-08-08 23:36:28 UTC
Is there any way this can be made to work? Loving KDE and trying to port over my "Windows shortcut instincts" and really this is the only thing I couldn't replicate near perfectly!

Is the reason that it's mapped to sysrq as one comment mentions? (https://en.wikipedia.org/wiki/Magic_SysRq_key)

PS: WinKey+PrintScreen at least is a close workaround and no longer opens the KDE menu when used for it.
Comment 16 kderemie 2021-08-08 23:37:21 UTC
PPS: If this bug matters to you, please VOTE for it!
Comment 17 SerVB 2021-12-10 18:05:29 UTC
Is there maybe a way to manually edit the shortcut from Alt+SysReq to Alt+Print in Spectacle? For me, it looks like just an issue of the shortcut recorder, and maybe if it's written correct, it will work? Please suggest where this shortcut is saved to try to edit it manually.
Comment 18 Patrick Silva 2023-09-25 08:57:27 UTC
*** Bug 474844 has been marked as a duplicate of this bug. ***
Comment 19 Anton 2023-10-18 22:24:55 UTC
For some reason I cannot vote for this... If I could, I would.

Any news?

In regards to the SysRq references... I believe SysRq commands can successfully co-exist with Alt-PrtSc taking screenshots. I'm observing this on Xubuntu 22.04 with Xfce 4.16: even though PrtSc is indeed working as SysRq, so with "SysRq, h" I can send help messages into dmesg (even from the X session), Xfce still perfectly handles Alt+PrtSc for the screenshots.

Could KDE just do the same if the user wants to use Alt+PrtSc?
Comment 20 Bug Janitor Service 2024-01-27 07:28:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kglobalacceld/-/merge_requests/40
Comment 21 Bug Janitor Service 2024-01-27 07:29:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kglobalaccel/-/merge_requests/104
Comment 22 Bug Janitor Service 2024-01-27 07:31:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5051
Comment 23 Bug Janitor Service 2024-01-28 21:26:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/114
Comment 24 fanzhuyifan 2024-01-29 17:09:54 UTC
Git commit a6bc3a92e0ae0b99d9306dac2fe6b50cda04d2f9 by Yifan Zhu.
Committed on 28/01/2024 at 23:25.
Pushed by fanzhuyifan into branch 'master'.

globalshortcutsregistry: treat SysReq as Alt+Print

For shortcut purposes, treat SysReq as Alt+Print.
This enables setting shortcuts like Alt+Print.

Known limitation: when using Mod(s)+Alt+Print as shortcut,
only works when Alt is released before Mod(s).
Also doesn't work in MultiKey shortcuts.

M  +10   -3    src/globalshortcutsregistry.cpp

https://invent.kde.org/plasma/kglobalacceld/-/commit/a6bc3a92e0ae0b99d9306dac2fe6b50cda04d2f9
Comment 25 fanzhuyifan 2024-01-29 17:11:12 UTC
Git commit e743dbc58da5ce01238f484f26454938b4e88a21 by Yifan Zhu.
Committed on 29/01/2024 at 17:09.
Pushed by fanzhuyifan into branch 'master'.

recorder/KKeySequenceRecorderPrivate: treat SysReq as Alt+Print

For shortcut purposes, treat SysReq as Alt+Print.
This enables setting shortcuts like Alt+Print.

Known limitation: when using Mod(s)+Alt+Print as shortcut,
only works when Alt is released before Mod(s).

M  +11   -0    src/recorder/kkeysequencerecorder.cpp

https://invent.kde.org/frameworks/kguiaddons/-/commit/e743dbc58da5ce01238f484f26454938b4e88a21
Comment 26 fanzhuyifan 2024-01-29 17:19:12 UTC
Git commit da5f52b10d8d5436c6787f20a149450782ddcc56 by Yifan Zhu.
Committed on 29/01/2024 at 17:17.
Pushed by fanzhuyifan into branch 'Plasma/6.0'.

globalshortcutsregistry: treat SysReq as Alt+Print

For shortcut purposes, treat SysReq as Alt+Print.
This enables setting shortcuts like Alt+Print.

Known limitation: when using Mod(s)+Alt+Print as shortcut,
only works when Alt is released before Mod(s).
Also doesn't work in MultiKey shortcuts.


(cherry picked from commit a6bc3a92e0ae0b99d9306dac2fe6b50cda04d2f9)

M  +10   -3    src/globalshortcutsregistry.cpp

https://invent.kde.org/plasma/kglobalacceld/-/commit/da5f52b10d8d5436c6787f20a149450782ddcc56