Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to implement mouse gestures with this? #1

Closed
natural-harmonia-gropius opened this issue Oct 9, 2022 · 2 comments
Closed

Comments

@natural-harmonia-gropius

As the title.

@christoph-heinrich
Copy link
Owner

christoph-heinrich commented Oct 9, 2022

When it recognizes a dragging event, it locks in horizontal dragging or vertical dragging and then either calls drag_horizontal(dx) or drag_vertical(dy) on each update. That is useful for things like adjusting volume on vertical swipe without triggering seeking from horizontal swiping. I've already tried it on a touch device running kwin on wayland and it works great.

However drag(dx, dy) always gets called when there is a dragging update, and so it would also be possible to recognize more complicated shapes with that.

@christoph-heinrich
Copy link
Owner

I've made it configurable and updated the example. Now you can receive script messages for dragging in your own source file. That should make experimenting with recognizing more complicated shapes more comfortable.

The config might change at some point (e.g. restricting the dragging stuff to script messages only because anything else doesn't make much sense), but it's good enough for now.

If you ever make something that reliably recognizes different shapes, I wouldn't mind merging it 😉.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants