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

Allow to execute actions on gesture begin and end #670

Merged
merged 5 commits into from
Dec 1, 2024

Conversation

JoseExposito
Copy link
Owner

Until now, it was only possible to execute the MOUSE_CLICK, SEND_KEYS and RUN_COMMAND actions when the gesture started or when the gesture ended.

Include a third option, <on>begin-and-end</on> allowing to run the actions both when the gesture starts and ends.

When this new setting is used, MOUSE_CLICK starts presses the mouse button when the gesture starts and releases it when the gesture ends.

In the case of RUN_COMMAND, a environment variable is set (TOUCHEGG_GESTURE_ON) allowing the executed script to take different actions at the beginning and the end of the gesture.

Closes: #665

Instead of using a boolean, use an enum to allow to add more values in
the future.

Refactor, no functional changes.
Allow to run SEND_KEYS, RUN_COMMAND and MOUSE_CLICK actions on gesture
begin and on gesture end.
Instead of sending mouse clicks as an atomic action, split them for
better control.

Refactor, no functional changes.
When the `begin-and-end` option is used, the mouse button is down when
the gesture begins and up when the gesture ends.
To allow custom scripts to know if the command is ran when the gesture
begins, updates or ends, set a environment variable.
@JoseExposito JoseExposito merged commit 8d41d09 into master Dec 1, 2024
2 checks passed
@Secret-chest
Copy link

Secret-chest commented Dec 2, 2024

It doesn't work; I'd like a new "drag" gesture type. Even if the button is held down, the click position is in the same place, not where the cursor is.

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

Successfully merging this pull request may close these issues.

Rotating Compiz desktop cube using drag
2 participants