Skip to content

Add max distance between fingers setting to reject accidental drags#107

Open
CloudyLouis wants to merge 1 commit into
ClementGre:mainfrom
CloudyLouis:feature/max-fingers-distance
Open

Add max distance between fingers setting to reject accidental drags#107
CloudyLouis wants to merge 1 commit into
ClementGre:mainfrom
CloudyLouis:feature/max-fingers-distance

Conversation

@CloudyLouis

Copy link
Copy Markdown

Adds a 'Maximum distance between fingers' setting (Three Finger Drag tab) that uses one threshold to prevent accidental three-finger drags caused by a thumb/palm resting on the touchpad while typing.

Two cases handled:

  • 3 fingers spread too far apart (1 thumb + 2 fingers): drag is not started.
  • 4 fingers with an outlier (1 accidental thumb + 3 real fingers): the far contact is detected and ignored, so the drag still works with the remaining three.

Defaults to 0 (disabled) - existing behaviour unchanged, no settings version bump. A maxPairDist value is logged to help choose a suitable value. Outlier rejection only handles the 4-finger (1+3) case; 5+ fingers keep original behaviour.

Files: SettingsData.cs (new property), ThreeFingerDrag.cs (GetMaxPairwiseDistance + TryRejectOutlier helpers, logging, outlier rejection at top of OnTouchpadContact), ThreeFingerDragSettings.xaml(.cs) (new settings card), README.md (feature docs + CLI MSIX build instructions). Built and verified locally (.NET 10, x64 MSIX).

Adds a new "Maximum distance between fingers" threshold (Three Finger
Drag tab) that uses a single value to prevent accidental drags caused by
a thumb or palm resting on the touchpad while typing:

- With 3 fingers spread too far apart (e.g. 1 thumb + 2 fingers), the
  drag is not started.
- With 4 fingers where three are close together and one is far away
  (e.g. 1 accidental thumb + a real three-finger drag), the outlier is
  detected and ignored so the drag still works with the remaining three.

The threshold defaults to 0 (disabled). A maxPairDist value is logged to
help choose a suitable value.
@CloudyLouis CloudyLouis force-pushed the feature/max-fingers-distance branch from 987f271 to 8d5535b Compare July 2, 2026 06:20
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