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.

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