Bug 402857 - Touchpad gestures should be configurable
Summary: Touchpad gestures should be configurable
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: Gestures (show other bugs)
Version: git master
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
: 431356 443022 458237 482030 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-01-04 14:49 UTC by Vlad Zahorodnii
Modified: 2024-04-10 01:13 UTC (History)
23 users (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 Vlad Zahorodnii 2019-01-04 14:49:51 UTC
SUMMARY
Users should be able to configure existing gestures, for example change the number of fingers, or just disable some gestures.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.14.80
KDE Frameworks Version: 55.53
Qt Version: 5.12
Comment 1 Martin Flöser 2019-01-05 10:14:00 UTC
My personal preference would be to integrate into KGlobalAccel. Also mouse shortcuts, etc.
Comment 2 Nicolas Fella 2021-01-09 16:22:34 UTC
*** Bug 431356 has been marked as a duplicate of this bug. ***
Comment 3 Nicolas Fella 2022-08-24 13:27:10 UTC
*** Bug 458237 has been marked as a duplicate of this bug. ***
Comment 4 Petrov Egor 2023-03-13 13:25:47 UTC
Sadly that in the most configurable DE touchpad gestures couldn'be customized;(
Comment 5 David 2023-03-13 21:41:41 UTC
(In reply to Petrov Egor from comment #4)
> Sadly that in the most configurable DE touchpad gestures couldn'be
> customized;(

I cannot help it but agree on this one.
Comment 6 Zamundaaa 2023-06-12 15:53:40 UTC
*** Bug 443022 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-03-01 06:29:51 UTC
*** Bug 482030 has been marked as a duplicate of this bug. ***
Comment 8 breakingspell 2024-03-07 02:51:34 UTC
With the Plasma 6 dust settling, this is a part I feel needs priority for laptop-heavy use. My use case is using three-finger navigation to move between virtual desktops+grid, and four fingers for brightness+volume control (all through touchegg formerly). 

My touchegg config ported right over to libinput-gestures for Wayland, but the native gestures continue to move between desktops when libinput-gestures are activated. Is it feasible to implement a toggle for the hardcoded 3-4 finger desktop switching, so users can substitute their own gesture handlers in the interim? 

It may warrant an extra bug report as well, but the native gestures are VERY sensitive. Compared with a Macbook's three-finger gestures that smoothly transition between virtual desktops (with intertia), the current Wayland gestures are too fast unless you only move your fingers a few millimeters, and then there's still no smooth inertia as you let go.
Comment 9 Hugues Morisset 2024-03-09 12:03:32 UTC
I want 3 fingers gestures for grid aswell, until there is a configuration switch, as a workaround I successfully patched the kwin_wayland binary to change 4 fingers to 3 fingers. I describes the steps here https://blog.izissise.net/posts/kwin-gesture-patch/
Comment 10 Seth 2024-04-03 04:37:11 UTC
sorry to pile on, really like KDE Plasma. the trackpad gestures just aren't configurable. i don't mind the 4 finger swiping, but 4 finger swiping down to pull up an overview isn't intuitive. the way Apply implements it is intuitive, in my opinion, anyway. 3 fingers swiping up gets you the overview, then 3 finger swipe back down returns to normal view. 3 fingers left or right moves desktops. the number of fingers isn't the issue, really (although 3 would be nice), it's the direction of the swipes. but just to have them freely configurable would be the best outcome. thanks for all the work y'all do!
Comment 11 Ima S 2024-04-09 19:39:10 UTC
I'd like to echo @breakingspell's comment for the plasma 6 upgrade. This is a serious issue for my laptop usage, I use my own custom gestures for almost all navigation (via libinput-gestures), and the current system breaks my entire config.

Please add an off button in settings. I don't care about extensibility in the short term, power users can manage their own gestures with other tools for now, but only once we can turn off the current system.

Even if other work is pending, at least add an on/off toggle in 'Settings -> Mouse & Touchpad -> Touchpad' for the next release.
Comment 12 Ima S 2024-04-09 22:39:10 UTC
I looked at the source, and the gesture seems to be registered by these lines:

https://invent.kde.org/plasma/kwin/-/blob/master/src/virtualdesktops.cpp#L772

If someone could wrap them with an if-statement that checks a toggle, that might be enough? I don't know how to contribute this myself or I would.
Comment 13 breakingspell 2024-04-10 01:13:54 UTC
(In reply to Ima S from comment #12)
> I looked at the source, and the gesture seems to be registered by these
> lines:
> 
> https://invent.kde.org/plasma/kwin/-/blob/master/src/virtualdesktops.cpp#L772
> 
> If someone could wrap them with an if-statement that checks a toggle, that
> might be enough? I don't know how to contribute this myself or I would.

Thanks for scoping out where these are! I was looking in the entirely wrong place (src/gestures.cpp) before giving up last month and falling back to X11 for a few other reasons. 

Did a quick test by just commenting out the hardcoded instances of registerTouchpadSwipeShortcut() in virtualdesktops.cpp, it does prevent the gestures from triggering. To note, the 4-finger up-down gestures are defined in overvieweffect.cpp as addTouchpadSwipeGesture(): 
https://invent.kde.org/plasma/kwin/-/blob/master/src/plugins/overview/overvieweffect.cpp#L36

Putting the registers behind a config toggle or dummying out doesn't seem like the right solution even for short-term though. The code is spread out among multiple components so it will need to be unified at some point, it'd be worse later on if they're just patched out here. Would it be possible to bring all these Touchpad registers into gestures.cpp, and then configure from there?