Bug 465867 - Allow certain shortcuts that can be triggered regardless of modifiers
Summary: Allow certain shortcuts that can be triggered regardless of modifiers
Status: CONFIRMED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.103.0
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-16 19:28 UTC by Nicolas F.
Modified: 2024-08-01 19:34 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas F. 2023-02-16 19:28:23 UTC
SUMMARY
For something like push-to-talk, one might want a dedicated button that works regardless of which other modifiers are being held. Say, the F13 key. To use the F13 key through the GlobalShortcuts portal in Mumble (using https://github.com/mumble-voip/mumble/pull/5976 ) I need to also bind Shift+F13, Alt+F13, Shift+Alt+F13, Ctrl+F13, ... etc. etc.

This is extremely awkward, and we'd be better off with the implementation allowing for a flag to say "bind this key and any combinations of this key"


STEPS TO REPRODUCE
1. Build Mumble with the GlobalShortcuts PR
2. Add a shortcut for some key
3. Press shift+that key

OBSERVED RESULT
Shortcut doesn't activate

EXPECTED RESULT
Shortcut has a flag to say "this key is the be all and end all of shortcuts and if it's pressed whoever listens to it gets told about it", and I get to push-to-talk

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 6.1.12
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 David Redondo 2023-02-17 08:56:10 UTC
If this is a missing feature in the API please report upstream. https://github.com/flatpak/xdg-desktop-portal
Comment 2 Nicolas F. 2023-02-17 20:43:54 UTC
I don't think it is a problem in the protocol itself, nothing in it specifies that implementations should treat modifier keys in this way.
Comment 3 Aleix Pol 2023-02-18 01:52:03 UTC
Reframing this into kglobalaccel. The behaviour Nicolas wants is indeed not possible and addressing the protocol upstream wouldn't work because it's not responsibility of the protocol to trigger the shortcuts. This could also be in kwin.

As a feature, it's not trivial to implement as we'd need to figure out how to convey this to users. Should this maybe be the behaviour for modifier-less shortcuts in general? How would we treat collisions then?
Comment 4 Carlo 2023-02-18 12:36:08 UTC
 Moreover, I think being able to set a shortcut only on one modifier key would be preferred.
While I understand the reasoning behind why it does not allow to bind a shortcut to modifiers keys only (e.g. <Ctrl>, <Alt>, <Shift>,...), I feel like a framework for global shortcuts should allow it. User experience in push-to-talk applications requires to use only one button. It doesn't matter if, for instance, when I <Ctrl>+C something I blip my mic on Mumble for a microsecond.
Comment 5 Aleix Pol 2023-02-20 12:02:48 UTC
@Carlo, this is already possible to do and is also unrelated to this bug report. Please, let's keep things on topic.