Skip to content

fix(hid): capture M720 gesture button - #1385

Open
xuhow wants to merge 1 commit into
AprilNEA:masterfrom
xuhow:fix/m720-gesture-button
Open

xuhow wants to merge 1 commit into
AprilNEA:masterfrom
xuhow:fix/m720-gesture-button

Conversation

@xuhow

@xuhow xuhow commented Sep 14, 2026

Copy link
Copy Markdown

Summary

Capture the M720 Triathlon physical thumb gesture button instead of leaving its factory mapping active.

Changes

  • map the M720 physical thumb control (HID++ CID 0x00d0) to GestureButton
  • arm and dispatch that control only for the M720 runtime model key (0b015)
  • cover capture planning, model-key derivation, and raw-XY gesture dispatch

Testing

  • cargo fmt --all -- --check
  • RUSTFLAGS=-Dwarnings cargo clippy -p openlogi-device -p openlogi-hid -p openlogi-cli -p openlogi -p openlogi-agent-core -p openlogi-agent -p openlogi-desktop --all-targets -- -D warnings
  • RUSTFLAGS=-Dwarnings cargo test -p openlogi-device -p openlogi-hid -p openlogi-cli -p openlogi -p openlogi-agent-core -p openlogi-agent -p openlogi-desktop
  • Hardware: M720 Bluetooth-direct on macOS; verified single-click and hold-and-drag gestures. Not runtime-tested through a receiver, Linux, or Windows.

Fixes #1356

Related to #465, #1034, and #1199.

@xuhow
xuhow requested a review from AprilNEA as a code owner September 14, 2026 12:41
@greptile-apps

greptile-apps Bot commented Sep 14, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the M720-specific control is gated by runtime model identity and unsupported controls are safely ignored during arming.

Summary

  • Defines the M720 control CID and maps it to GestureButton.
  • Separates configuration identity from runtime model identity when constructing capture plans.
  • Restricts M720-specific arming to model key 0b015.
  • Adds coverage for capture planning, model-key derivation, and raw-XY gesture dispatch.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Discovered HID++ device] --> B[Derive config key and model key]
  B --> C[Build device capture plan]
  C --> D{Model key is 0b015?}
  D -- Yes --> E[Include M720 CID 0x00d0]
  D -- No --> F[Exclude M720 CID 0x00d0]
  E --> G{Control is enumerated with raw-XY support?}
  G -- Yes --> H[Arm raw-XY diversion]
  G -- No --> I[Skip unsupported control]
  H --> J[Map diverted input to GestureButton]
  J --> K[Dispatch configured gesture action]
Loading

Reviews (1) · Last reviewed commit: "fix(hid): capture m720 gesture button"

@davidbudnick davidbudnick added type: bug Something is broken or behaves incorrectly platform: all Cross-platform issue labels Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: all Cross-platform issue type: bug Something is broken or behaves incorrectly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Device]: M720 Triathlon, Gestures always open Mission Control. (Mac OS 26.6.2)

2 participants