Skip to content

Commit

Permalink
Merge pull request #36 from aaronkollasch/fix/34/pinch-dist
Browse files Browse the repository at this point in the history
Use index-ring distance for trackpad pinch gesture
  • Loading branch information
aaronkollasch authored Sep 29, 2022
2 parents 1b854cf + e46408c commit 76468ff
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 > 0.455 * charRegIndexRingDistance && 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 < -0.455 * charRegIndexRingDistance && type != 6) {
dispatchCommand(@"Three-Finger Pinch-In", TRACKPAD);
type = 6;

Expand Down

0 comments on commit 76468ff

Please sign in to comment.