Bug 483789 - While holding down shortcut to open or close an effect such as Overview, Grid, etc. the effect constantly open and closes manically
Summary: While holding down shortcut to open or close an effect such as Overview, Grid...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 6.0.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-16 20:16 UTC by postix
Modified: 2024-04-23 11:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2024-03-16 20:16:45 UTC
STEPS TO REPRODUCE
Press Meta + G to open the grid and keep holding down both keys

OBSERVED RESULT
The effect opens and closes manically. 

EXPECTED RESULT
The effect only opens once.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240314
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 guimarcalsilva 2024-03-16 20:40:39 UTC
I can reproduce it.
Comment 2 fanzhuyifan 2024-03-16 23:51:54 UTC
Currently shortcuts trigger on press, and will re-trigger upon key autorepeat. If we don't plan on changing that, this should be closed as resolved-intentional.

Note that for other shortcuts (like ctrl-V), users would probably expect this behavior. So IMO this is intentional.
Comment 3 postix 2024-03-17 11:06:01 UTC
(In reply to fanzhuyifan from comment #2)
> Note that for other shortcuts (like ctrl-V), users would probably expect
> this behavior. So IMO this is intentional.

IMO there should be two types of hot-keys, those that re-trigger (Ctrl+V, Ctrl+R/Z, ...) and those that don't (Meta+G, Meta+O,Meta+C, Meta+Tab*).

Having the mentioned effects for instance auto-re-trigger seems just wrong. Kickoff for instance doesn't open/close repeatedly when holding down Meta.  For Meta+Tab it could make sense, but the speed with it switches between windows is way too fast to be usable.
Comment 4 fanzhuyifan 2024-03-17 14:36:19 UTC
Modifier only shortcuts are handled differently and are triggered on release since it doesn't make sense to trigger them on press.

The repeat speed is controlled by key repeat settings.

If we support two types of shortcuts, we have to think about whether we expose that to the users. Not exposing that might make things confusing, where some shortcuts trigger on repeat and some don't, while exposing the setting might make things too complicated.
Comment 5 Vlad Zahorodnii 2024-03-18 10:20:35 UTC
(In reply to fanzhuyifan from comment #2)
> Currently shortcuts trigger on press, and will re-trigger upon key
> autorepeat. If we don't plan on changing that, this should be closed as
> resolved-intentional.
> 
> Note that for other shortcuts (like ctrl-V), users would probably expect
> this behavior. So IMO this is intentional.

Yes, that's intentional.
Comment 6 postix 2024-03-18 10:27:19 UTC
> Yes, that's intentional.

But what about

> IMO there should be two types of hot-keys, those that re-trigger (Ctrl+V, Ctrl+R/Z, ...) and those that don't (Meta+G, Meta+O,Meta+C, Meta+Tab*).

May I open another more general issue for it? I mean it doesn't need to be resolved immediately but it could be on the radar and implemented later ...
Comment 7 fanzhuyifan 2024-03-20 00:45:14 UTC
(In reply to postix from comment #6)
> May I open another more general issue for it? I mean it doesn't need to be
> resolved immediately but it could be on the radar and implemented later ...

This introduces inconsistencies in how shortcuts are handled, complicates the UX, and adds more code complexity for little benefit.
Comment 8 postix 2024-04-23 11:42:37 UTC
> complicates the UX, and adds more code complexity for little benefit.

Maybe not too little benefit: One legit reason which came into my mind is that it could be an issue for people with epilepsy [1]:
> Content that flickers, flashes, or blinks can trigger photosensitive epilepsy. 

The rapid opening/closing is definitely kind of a flickering/flashing effect, though I don't have any experience with it myself nor do I know people who may be affected to absolutely proof it. But if it is, it should maybe be avoided at any cost?

[1] https://developer.mozilla.org/en-US/docs/Web/Accessibility/Seizure_disorders