Skip to content

feat(logi): support HID++ button gestures - #1

Open
LJAYi wants to merge 2 commits into
landn172:feat/mouse-gesturefrom
LJAYi:feat/m720-gesture-bindings
Open

feat(logi): support HID++ button gestures#1
LJAYi wants to merge 2 commits into
landn172:feat/mouse-gesturefrom
LJAYi:feat/m720-gesture-bindings

Conversation

@LJAYi

@LJAYi LJAYi commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • route Logitech HID++ button events through the existing gesture state machine
  • support the M720 MultiPlatform Gesture button with four movement directions and scroll-wheel combos
  • keep the gesture button's ordinary click binding when no gesture threshold is reached
  • register actionable gesture triggers with the Logi usage/diversion system
  • move gesture configuration into expandable rows in the Buttons preferences pane
  • fix rule deletion, duplicate recording feedback, and M720 back/forward button actions

Implementation notes

HID++ button events do not carry a CGEvent, so GestureProcessor now accepts the shared InputEvent representation and keeps replay context optional. Native mouse triggers still replay their original click when appropriate, while HID++ triggers fall back to the configured button action.

Only enabled bindings with a real action reserve and divert a Logitech CID. Trigger modifiers are normalized before persistence and comparison so state flags such as Caps Lock cannot create visually identical duplicate rules.

Testing

  • tested on a Logitech M720 with the MultiPlatform Gesture, Back, and Forward buttons
  • verified gesture-button click plus up/down/left/right movement actions
  • scripts/qa/lint-logi-boundary.sh
  • 181 focused tests across GestureProcessorTests, ButtonBindingTests, LogiUsageBootstrapTests, and InputProcessorTests
  • unsigned Debug build succeeds with CODE_SIGNING_ALLOWED=NO

Screenshot

M720 inline gesture configuration

LJAYi added 2 commits August 12, 2026 02:24
Route Logitech HID++ button events through the gesture state machine, register actionable gesture CIDs for diversion, and preserve ordinary button actions for gesture-button taps. Normalize persisted triggers so state flags do not create duplicate rules.
Replace the separate bindings/gestures modes with disclosure rows, keep the standard add/remove controls usable, and base duplicate feedback on existing button rules. Add a focused storyboard regression test for expansion and deletion.
@LJAYi

LJAYi commented Aug 11, 2026

Copy link
Copy Markdown
Author

I tested this with a Logitech M720 and added HID++ support for its MultiPlatform Gesture button, including directional gestures, inline configuration, and Back/Forward button fixes.

If these changes are incorporated into Caldis#922, I’d appreciate it if my commit authorship could be preserved when merging. Thanks!

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