Skip to content

Commit

Permalink
Use index-ring distance for pinch gesture
Browse files Browse the repository at this point in the history
Fixes #34
  • Loading branch information
aaronkollasch committed Sep 23, 2022
1 parent 1b854cf commit 0ee496a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jitouch/Jitouch/Gesture.m
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ static void gestureTrackpadSwipeThreeFingers(const Finger *data, int nFingers) {
starty[r] - data[r].py
);
if (deltacosine < 0.1 && lenl > 0.005 && lenr > 0.003) { //ring finger is harder to move
if (curlen-startlen > 0.15 && type != 5) {
if (curlen-startlen > charRegIndexRingDistance/2 && type != 5) {
dispatchCommand(@"Three-Finger Pinch-Out", TRACKPAD);
type = 5;

Expand All @@ -1601,7 +1601,7 @@ static void gestureTrackpadSwipeThreeFingers(const Finger *data, int nFingers) {
r = i;
}
}
} else if (curlen-startlen < -0.15 && type != 6) {
} else if (curlen-startlen < -charRegIndexRingDistance/2 && type != 6) {
dispatchCommand(@"Three-Finger Pinch-In", TRACKPAD);
type = 6;

Expand Down

0 comments on commit 0ee496a

Please sign in to comment.