skhd icon indicating copy to clipboard operation
skhd copied to clipboard

Trackpad Gesture Support

Open rien333 opened this issue 6 years ago • 6 comments

Somewhat of a weird suggestion maybe, but would you be open to expand this tool's functionality to monitor specific trackpad gestures? (e.g. four finger taps, various swipes, "tip-taps") This tool has largely replaced the paid app bettertouchtool for me, except that it lacks binding trackpad gestures to commands. And because running both seems wasteful, I prefer skhd's way of configuration and skdh seems less recourse intensive, I would really like to use it for trackpad monitoring as well. Trackpad gesutres can be monitored through some sort of private API. I would be interested in implementing this functionality myself.

As not really everyone will need this probably, it seems more resource friendly to have a switch to enable trackpad gestures.

rien333 avatar Feb 06 '18 12:02 rien333

I've never looked into how touch-data is presented, although I can see how this would be useful. Can you only track things such as four finger taps etc, or could we detect completely custom gestures?

koekeishiya avatar Feb 06 '18 18:02 koekeishiya

You could detect completely custom gestures using the private API method I linked above (this would require a shape recognization algorithm however, such as the easily implementable $1 algorithm), but I wouldn't really know how one would configure these with the current configuration setup. I was thinking of simpler gestures like tapping and swiping, which can easily be referred to with names. For example, I would love to add something like this to my skhd.conf:

tip-tap-left            [decrease volume]
tip-tap-right           [increase volume]
three-finger-tap        [simulate middle click]
# Making them usable with modifiers would be cool as well
cmd - right-corner-tap  [window to top-right corner]

rien333 avatar Feb 06 '18 19:02 rien333

I've briefly started looking at this: https://github.com/koekeishiya/skhd/tree/mt

koekeishiya avatar May 13 '18 15:05 koekeishiya

Neat! If I find time the coming weeks I would gladly assist with testing and coding.

rien333 avatar May 13 '18 15:05 rien333

also volunteer to assist with any early stage testing, would enhance my personal workflow that much more!

connorbrathwaite avatar Aug 19 '18 14:08 connorbrathwaite

Is there still any chance that this might be revisited? I'd love to be able to ditch BetterTouchTool and use skhd to implement my usus of custom Trackpad Gestures. Most convenient thing would be to be able to configure all of that in a text-based config.

Vermoot avatar Aug 06 '21 11:08 Vermoot