Skip to content

Commit cb86eb2

Browse files
28 thumb bug (#29)
* feat: add ModifierKeyType enum and palm rejection preferences - Add ModifierKeyType enum with shift/control/option/command - Add exclusion zone preferences (enabled, size) - Add modifier key preferences (requireKey, keyType) - Add contact size filter preferences (enabled, maxSize) - Update GestureConfiguration with palm rejection fields - Update UserPreferences.gestureConfig to include new options * feat: add persistence for palm rejection preferences - Add UserDefaults keys for exclusion zone settings - Add UserDefaults keys for modifier key settings - Add UserDefaults keys for contact size filter settings - Register defaults for all new preferences - Update loadPreferences() to load new settings - Update savePreferences() to persist new settings * feat: implement palm rejection touch filtering - Add modifier key check at start of processTouches() - Filter touches in exclusion zone (bottom of trackpad) - Filter touches exceeding max contact size threshold - Add getModifierFlags() helper using CGEventSource - Cancel active gesture if modifier key released * feat: add Palm Rejection submenu to Advanced menu - Add createPalmRejectionMenu() with three sections - Add exclusion zone toggle and size options (10-25%) - Add modifier key toggle and key type selector - Add contact size filter toggle and threshold options - Add action methods for all new preferences - Dynamically show/hide options based on toggle state * refactor: Pass modifier flags to gesture recognizer from main thread for reliable state. * test: add palm rejection configuration and ModifierKeyType tests - Add tests for GestureConfiguration palm rejection defaults - Add tests for UserPreferences palm rejection defaults - Add test for UserPreferences -> GestureConfiguration mapping - Add tests for ModifierKeyType display names and raw values - Add test for ModifierKeyType CaseIterable conformance * test: add GestureRecognizerTests for palm rejection filters - Add new test file GestureRecognizerTests.swift with 12 tests - Add tests for modifier key requirement (all 4 types) - Add tests for exclusion zone filtering - Add tests for contact size filtering - Add combined filter test - Add GestureRecognizer.swift to test target Includes MockGestureRecognizerDelegate for testing callbacks. * docs: fix misleading comment about thread context The comment claimed modifier flags were captured on the main thread, but deviceMonitor callback actually runs on a framework-managed background thread. CGEventSource.flagsState is thread-safe per Apple docs, so this is fine, but the comment was inaccurate. * test: add partial filter tests for palm rejection Add 4 new tests for scenarios where some touches are filtered while others pass palm rejection filters: - testExclusionZone_PartialFiltering_FiveTouchesThreePass - testContactSizeFilter_PartialFiltering_FiveTouchesThreePass - testCombinedFilters_PartialFiltering_SixTouchesThreePass - testPartialFiltering_InsufficientRemainingTouches These verify gestures activate when exactly 3 valid touches remain after filtering, regardless of total touch count.
1 parent 7c8e289 commit cb86eb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

MiddleDrag.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
"$(inherited)",
487487
"@executable_path/../Frameworks",
488488
);
489-
MARKETING_VERSION = 1.3.2;
489+
MARKETING_VERSION = 1.3.3;
490490
OTHER_LDFLAGS = (
491491
"-framework",
492492
MultitouchSupport,
@@ -526,7 +526,7 @@
526526
"$(inherited)",
527527
"@executable_path/../Frameworks",
528528
);
529-
MARKETING_VERSION = 1.3.2;
529+
MARKETING_VERSION = 1.3.3;
530530
OTHER_LDFLAGS = (
531531
"-framework",
532532
MultitouchSupport,

0 commit comments

Comments
 (0)