taj_ny
April 10, 2025, 2:02pm
52
I’m currently working on adding mouse gestures to my plugin for customizing touchpad gestures. It’s close to being finished but I can’t say exactly when it’ll be done. You can try it right now by building the mouse-gestures branch. I don’t have the time to attempt upstreaming this, so it will remain a third-party plugin.
The features include (but are not limited to):
Wheel gestures
Press gestures
Stroke gestures (uses code from jpetso’s prototype)
Per-application gestures
Per-gesture activation buttons and modifiers
Start/end positions (not limited to just corners and edges)
Activation buttons can still be used but are blocked when necessary
main
← mouse-gestures
opened 06:50AM - 02 Mar 25 UTC
One million changes in a single PR, as per usual.
# Features
- Stroke gestur… e, supports touchpads as well
- Mouse gestures (Plasma 6.3 required): press, wheel, stroke, swipe
- Gesture begin/end positions - currently only works with mouse gestures
- Touchpad scroll timeout (controls when 2-finger swipes end) can now be configured
- ***One* action group - only executes a single action from the group, replaces *Action.block_other***
# Changes
- Project renamed to Input Actions, will eventually support other environments than just Plasma
# Fixed bugs
- **Update actions intervals belonging to single-directional gestures of certain directions only work if negative.**
## Gesture conflicts
All other gestures are now cancelled when:
- a gesture is updated, and has any action that has been executed, or has an update action that can be executed (satisfies conditions and thresholds) but hasn't been yet (the interval hadn't been reached)
- a gesture ends, and it has an end action that can be executed
This makes it no longer necessary to resolve gesture conflicts manually. For example, if you had two of the same gestures , but one required Meta to be pressed and the other didn't, you had to set ``keyboard_modifiers: none`` on the latter one, otherwise it would always trigger.
# Fixed bugs
- Non-zero interval actions of bi-directional gestures ignore the delta of the event where the direction changes. Due to the high polling rate, this wasn't noticeable at all.
# [Configuration](https://github.com/taj-ny/InputActions/blob/main/docs/configuration.md)
## New properties
*Root.mouse*, *Mouse.motion_timeout*, *Mouse.press_timeout*, *Touchpad.scroll_timeout*, *Gesture.start_positions*, *Gesture.end_positions*, *Gesture.mouse_buttons*, *PressGesture.instant*
## Changed properties
- *Gesture.fingers* - Default value changed to 1
- *Gesture.type* - New values (*wheel*, *stroke*), *hold* renamed to *press* but can still be used
## Removed properties
- ***Action.block_other* - Use the *one* action group instead**
# To do
- [x] Swipe gesture
- [x] Press gesture
- [x] Wheel gesture
- [x] Stroke gesture
- [x] Automatic gesture conflict resolution
- [x] Replace edges with start position percentages (min_x,min_y - max_x,max_y) - way more flexible
- [x] Small threshold for motion gesture activation, it's really easy to accidentally activate those instead of press gestures
- [x] Allow timeouts to be configured
- [x] ~Add support for~ Make it build on Plasma 6.1 and 6.2
- [x] Clean up the mess
9 Likes