Skip to content

Tilt (horizontal-scroll) slide gestures [stacked on #228]#230

Open
kevin-nous wants to merge 2 commits into
TomBadash:masterfrom
kevin-nous:explore/tilt-gesture
Open

Tilt (horizontal-scroll) slide gestures [stacked on #228]#230
kevin-nous wants to merge 2 commits into
TomBadash:masterfrom
kevin-nous:explore/tilt-gesture

Conversation

@kevin-nous

Copy link
Copy Markdown

⚠️ Stacked on #228. This branch builds on the per-button event-tap gesture
engine from #228, which isn't on master yet — so this PR's diff currently
shows both #228's button-gesture commit and this tilt commit. The change
owned by this PR is the single commit eeac596 "Add tilt (horizontal-scroll)
slide gestures"
— please review that one. Once #228 merges I'll rebase this so
only the tilt diff remains.

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)

Testing

  • Unit-tested (objc-free, runs in CI): config schema, capability gating, engine
    routing, and the kernel's arm / fire-on-slide / tap-on-release / release-timer
    state machine via a fake-Quartz harness.
  • Hardware-verified on a real MX Anywhere 2S: hold+slide in all 4 directions,
    quick tap fires the hscroll action, no misfire, no regression to button
    gestures or to normal horizontal scroll when disabled.

kevin-nous and others added 2 commits July 5, 2026 13:11
…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>
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