Closed
Conversation
Basic implementation enables one shot pinch gesture. That is the command from config file will run only once as soon as fingers move 50% from the initial fingers position. - Added a configurable distance variable to pinch gesture. I felt that pinch gesture is kinda tricky to execute on touchpad, so I changed a way of calculation when to trigger the command and added the distance for fingers travel to configuration. Basically a `0.5` distance feels quite ok to me, but it becomes really snappy at `0.1`.
Pinch Gesture
* Reorganized code a little bit
- Previously swipe gesture was triggered only when fingers leaving
touchpad thus threshold was useless. Moved trigger function outside
of event handling.
- Created reset functions for gestures to reset struct holding event
data to default values.
* Added swipe threshold.
- Added new config keys
* `settings.pinch.distance` - now instead of
`pinch.commands.distance` holds the value required for fingers to
travel before executing pinch gesture.
* `settings.swipe.threshold` - new key to set how long should be
swipe to execute command.
Collaborator
Author
|
Closing in favor of 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up for #29
Reorganized code a little bit
touchpad thus threshold was useless. Moved trigger function outside
of event handling.
data to default values.
Added swipe threshold.
settings.pinch.distance- now instead ofpinch.commands.distanceholds the value required for fingers totravel before executing pinch gesture.
settings.swipe.threshold- new key to set how long should beswipe to execute command.
This also closing #28