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

Feature/gesture threshold #31

Closed
wants to merge 4 commits into from

Conversation

osleg
Copy link
Collaborator

@osleg osleg commented Oct 31, 2019

This is a follow up for #29

  • 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.

This also closing #28

osleg and others added 4 commits October 30, 2019 19:22
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.
@osleg
Copy link
Collaborator Author

osleg commented Nov 5, 2019

Closing in favor of 32

@osleg osleg closed this Nov 5, 2019
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.

1 participant