Skip to content

Add configurable trackpad gestures for the window under the pointer - #1905

Open
kiteretsu903 wants to merge 1 commit into
rxhanson:mainfrom
kiteretsu903:fix/review-trackpad-gestures
Open

kiteretsu903 wants to merge 1 commit into
rxhanson:mainfrom
kiteretsu903:fix/review-trackpad-gestures

Conversation

@kiteretsu903

@kiteretsu903 kiteretsu903 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Adds an off-by-default gesture input option with three- or four-finger swipes, adjustable sensitivity, and an action for each direction. Default mappings are left/right half, up to maximize, and down to minimize; individual directions can be disabled.

Behavior and boundaries

  • The gesture targets the window under the pointer. Target preparation is bounded and pending actions are invalidated when their target or gesture session becomes stale.
  • The initial finger-count choice considers macOS gesture conflicts. If the selected count conflicts with macOS, Rectangle pauses capture and explains the conflict; it does not change the user's system gesture settings.
  • Ordinary two-finger scrolling remains available. If exclusive capture fails, scrolling is released and actions are blocked until the current contact session ends.
  • Turning the feature off stops capture. Multi-window and Todo actions are excluded because they do not operate on the single window under the pointer.

Implementation

Capture, recognition, target selection, and settings are grouped by responsibility. Recognized gestures dispatch through existing Rectangle actions rather than implementing another placement path. Layout Helper and divider code are not part of this change.

The multitouch integration uses a dynamically loaded private macOS API, loaded only while the feature is enabled. Unavailable input support must leave the feature inactive without preventing Rectangle from launching. This platform dependency is a review consideration beyond the recognizer logic.

Validation

The rebased branch passed all 597 XCTest tests, including upstream mouse-button shortcut and preview lifecycle tests. This branch has no dependency on the closed learned-size-limits PR #1902. A real three-finger hardware demonstration in the combined build confirmed left-half, maximize, right-half, and minimize actions with window animation and Layout Helper disabled.

This replaces the corresponding part of #1888.

Demo (the gesture pop-up is not part of rectangle but only in video)

08-trackpad-gestures.mp4

Window animation is disabled. Recorded with the combined build and only this feature and its required visual options enabled.

Settings

Add configurable trackpad gestures for the window under the pointer settings

@kiteretsu903
kiteretsu903 force-pushed the fix/review-trackpad-gestures branch 2 times, most recently from 958b019 to a97877a Compare October 10, 2026 02:51
@kiteretsu903
kiteretsu903 force-pushed the fix/review-trackpad-gestures branch from a97877a to b743aac Compare October 14, 2026 01:31
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