Tilt (horizontal-scroll) slide gestures [stacked on #228]#230
Open
kevin-nous wants to merge 2 commits into
Open
Tilt (horizontal-scroll) slide gestures [stacked on #228]#230kevin-nous wants to merge 2 commits into
kevin-nous wants to merge 2 commits into
Conversation
…control Hold an ordinary button (back / forward / middle) and slide up/down/left/right to fire a per-direction action; a quick tap still runs the button's normal mapping. This brings Logitech-style gesture actions to mice that lack a dedicated hardware gesture button (e.g. the MX Anywhere family). Reuses the existing software direction-detection engine and the gesture UI panel; the only new mechanism is arming a gesture from a normal button-down on the macOS event tap (with tap-vs-hold disambiguation), so it never touches the HID++ button-remap path. - Off by default; enabled per-device via a `supports_event_tap_gestures` catalog flag, currently set only on the MX Anywhere 2S (the tested device). - The MX Master HID++ gesture path is unchanged. - macOS only for now; Windows/Linux share the same gap and are a clean follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extends the per-button event-tap gesture feature to the wheel tilt: hold a tilt direction (left/right) and slide up/down/left/right to fire a bound action; a quick tilt-tap still fires its normal horizontal-scroll action once (debounced). The tilt has no button down/up, so it arms off the hscroll pulse stream and releases ~100ms after the last pulse. Gestures fire the instant the slide crosses the threshold (mid-hold), not on release, so a fragmenting pulse stream (gentle holds pulse slowly) can't drop them. - Opt-in per tilt direction, gated by a supports_tilt_gestures catalog flag set only on the MX Anywhere 2S (the tested device). - Reuses the button-gesture direction engine, routing, config keys, and UI panel. - Off by default; the button-gesture and MX Master HID++ paths are unchanged. - macOS only (mirrors the button-gesture scope). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tilt (horizontal-scroll) slide gestures
Extends the per-button gesture feature (#228) to the wheel tilt: hold a tilt
direction (left/right) and slide up/down/left/right to fire a bound action; a
quick tilt-tap still fires its normal horizontal-scroll action once (debounced).
How it works
The tilt has no button down/up, so it arms off the horizontal-scroll pulse
stream and releases ~150ms after the last pulse (above the ~110ms inter-pulse
gap, so a held stream keeps the gesture armed instead of fragmenting). Gestures
fire the instant the slide crosses the threshold (mid-hold), not on release, so
a fragmenting pulse stream can't drop them; the release timer only resolves the
tap case.
Scope & caveats (being upfront)
supports_tilt_gesturescatalog flagset only on the MX Anywhere 2S (the tested device). No mouse is opted in
implicitly.
toggle on + a tilt-eligible device.
Testing
routing, and the kernel's arm / fire-on-slide / tap-on-release / release-timer
state machine via a fake-Quartz harness.
quick tap fires the hscroll action, no misfire, no regression to button
gestures or to normal horizontal scroll when disabled.