Skip to content

feat(macos): support physical scroll wheel tilt and reduce remapping latency#216

Open
Archetipo95 wants to merge 2 commits into
TomBadash:masterfrom
Archetipo95:fix/hscroll-tilt-macos
Open

feat(macos): support physical scroll wheel tilt and reduce remapping latency#216
Archetipo95 wants to merge 2 commits into
TomBadash:masterfrom
Archetipo95:fix/hscroll-tilt-macos

Conversation

@Archetipo95

Copy link
Copy Markdown

This PR enables physical scroll/tilt wheels (like the Logitech MX Anywhere 2 left/right tilt) to function reliably on macOS even when Ignore trackpad is enabled, and adds support for ultra-low horizontal scroll thresholds to eliminate delay when triggering mapped keystrokes.

Key Changes

  1. Phase-Aware Trackpad Filtering: In core/mouse_hook_macos.py, we inspect kCGScrollWheelEventScrollPhase and kCGScrollWheelEventMomentumPhase. Trackpads and Magic Mice always generate gesture events with non-zero phases, while traditional mice/tilt-wheels do not (both phases are 0). We now verify if these phases are non-zero before filtering, letting physical wheel tilt inputs pass through even when ignore_trackpad is enabled.
  2. Lower Horizontal Scroll Threshold Limit: In core/engine.py, we lowered the minimum threshold cap to 0.01 (from 0.1), allowing users to specify a threshold like 0.1 or lower in their configuration. This fires mapped actions instantly on the very first tilt event.
  3. Split joint hscroll UI hotspots: We split the joint hotspot into hscroll_left and hscroll_right using the "mapping" type instead of "hscroll" in core/logi_device_catalog.py, allowing them to be mapped separately in the UI.
  4. Validation and test updates: Updated core/config.py type validation to allow floats for numeric default config templates, and updated the mock setups in tests/test_mouse_hook.py and tests/test_device_layouts.py.

davidnoyes pushed a commit to davidnoyes/Mouser that referenced this pull request Jun 26, 2026
…#181, TomBadash#184, TomBadash#185, TomBadash#191, TomBadash#193, TomBadash#195, TomBadash#196, TomBadash#198, TomBadash#216)

Merge and adapt the following upstream pull requests, resolving conflicts
with MX Master 4 haptic and Actions Ring features:

Clean merges:
- PR TomBadash#193: symlink-safe config save via os.path.realpath()
- PR TomBadash#198: fractional hscroll threshold (0.1 default, int/float compat)
- PR TomBadash#185: pass through OS mouse events when no Logitech device connected
- PR TomBadash#180: persist hardware-reported DPI across restarts
- PR TomBadash#181: memoize Backend list properties for QML UI performance
- PR TomBadash#195: ping-pong desktop cycling action (macOS Spaces)

Conflict-resolution merges:
- PR TomBadash#196: nested macOS app identity matching with tuple identities
- PR TomBadash#191: Shift+wheel horizontal scroll translation (cross-platform)
- PR TomBadash#216 (partial): phase-aware trackpad filter + 0.01 hscroll floor

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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