Repository navigation
Add configurable trackpad gestures for the window under the pointer - #1905
kiteretsu903 wants to merge 2 commits into
Conversation
958b019 to
a97877a
Compare
a97877a to
b743aac
Compare
|
Sorry it took me so long to provide feedback on this one. It's mainly because I've been kind of unsure if I'm on board with rolling this in. Trackpad gestures come with some amount of baggage and maintenance, and for this reason I purposely avoided adding them into Rectangle at the start. The Multitouch framework comes in contact with some parts of macOS that can trip and stop working unexpectedly. It's difficult to make a robust implementation that doesn't get affected by other apps and survives macOS updates. This is at odds with my philosophy for Rectangle of being a stable utility that just works out of the box, regardless of macOS settings and other apps that are running. In my other apps, Multitouch and Rectangle Pro, I've loosened this philosophy because there's more of a notion of doing more things but accepting the complexity that can come with it (and me accepting the maintenance burden for those apps). With that said, I like the simplicity of what you've added. If it makes sense to go down the path of rolling this in, there are a few things to iron out with the current implementation, but I'll hold off on making you make changes until I'm certain it should go in. |
thanks for the thoughtful feedback, and no worries about the timing! Also I really appreciate your positive comments on the simplicity of the UX. |
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
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
All 618 XCTest tests pass, including regressions for resting contacts, contact-ID changes, recent velocity, scroll ownership, normal lift, and queued-action cancellation.
Native E2E verified scrolling and window actions through the real event tap and Accessibility paths. Physical three-finger swipes completed left-half, right-half, maximize, and minimize actions; two-finger scrolling with a resting palm continued without moving the window. Automated native replay also covered both finger counts.
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