[proof-of-concept] add swipe mousebinds

Use like
```xml
<mousebind direction="Down" fingers="4" action="swipe">
	<action name="GoToDesktop" to="right" wrap="false" />
</mousebind>
<mousebind direction="Up" fingers="4" action="swipe">
	<action name="GoToDesktop" to="left" wrap="false" />
</mousebind>
```
This commit is contained in:
Consolatis 2025-05-18 04:41:57 +02:00 committed by yuiiio
parent 9f5ff391cc
commit 97f5f93812
4 changed files with 64 additions and 1 deletions

View file

@ -14,6 +14,7 @@ enum mouse_event {
MOUSE_ACTION_RELEASE,
MOUSE_ACTION_DRAG,
MOUSE_ACTION_SCROLL,
MOUSE_ACTION_SWIPE,
};
enum direction {
@ -30,6 +31,9 @@ struct mousebind {
/* ex: BTN_LEFT, BTN_RIGHT from linux/input_event_codes.h */
uint32_t button;
/* used for MOUSE_ACTION_SWIPE */
uint32_t fingers;
/* scroll direction; considered instead of button for scroll events */
enum direction direction;