Skip to content

feat(hid): support alternate gesture controls and disabled mode - #494

Open
4dux wants to merge 3 commits into
AprilNEA:masterfrom
4dux:feat/gesture-control-disable
Open

feat(hid): support alternate gesture controls and disabled mode#494
4dux wants to merge 3 commits into
AprilNEA:masterfrom
4dux:feat/gesture-control-disable

Conversation

@4dux

@4dux 4dux commented Aug 2, 2026

Copy link
Copy Markdown

Summary

Some Logitech devices expose a raw-XY-capable thumb control under an alternate CID rather than the standard dedicated gesture CID 0x00c3. Recognize CID 0x00d0 as an alternate candidate when it advertises raw-XY support, without gating the behavior on a product ID or model name.

Also add an explicit Disabled mode. Unlike Off, which restores native firmware behavior, Disabled diverts and discards the control without requesting raw-XY motion. This suppresses the native action without freezing normal pointer movement.

Changes

  • openlogi-hid
    • Recognize raw-XY-capable CID 0x00d0 as an alternate gesture control.
    • Prefer the standard gesture CID when both controls are present.
    • Add native, disabled, and gesture capture modes.
    • Divert without raw-XY reporting in disabled mode.
    • Add coverage for alternate-control selection, standard-CID preference, unsupported controls, clicks, and disabled behavior.
  • openlogi-core
    • Add a serialized gesture_owner = "Disabled" state distinct from "Off".
    • Preserve existing gesture maps while disabled.
  • openlogi-agent / openlogi-agent-core
    • Propagate the requested control mode through capture-session planning.
  • openlogi-gui
    • Add a separate Disabled choice beside Off.
  • Documentation
    • Explain the behavioral difference between Off and Disabled.

Testing

  • cargo fmt --all -- --check
  • cargo test -p openlogi-core -p openlogi-hid -p openlogi-agent-core -p openlogi-agent -p openlogi-gui
  • cargo clippy -p openlogi-core -p openlogi-hid -p openlogi-agent-core -p openlogi-agent --all-targets -- -D warnings
  • 300 tests passed.
  • Hardware-tested on an M720 Triathlon over a Unifying receiver on Windows 11.
  • Verified that the thumb-rest control is detected, Disabled suppresses its native action, pointer motion remains active while it is held, and the setting survives an agent restart.
  • GUI tests compile and pass locally. Full GUI Clippy remains for CI because Windows Smart App Control blocks an unsigned third-party build helper locally.

@greptile-apps

greptile-apps Bot commented Aug 2, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds an explicit Disabled gesture-control mode and supports the alternate raw-XY thumb-control CID while preferring the standard gesture CID.

  • Propagates Native, Disabled, and Gestures modes from persisted configuration through capture-session planning.
  • Makes gesture-control selection mode-aware and requires diversion capability for every selected control.
  • Restores the actual selected CID when capture ends and discards reports in Disabled mode.
  • Adds GUI controls, documentation, serialization, and regression coverage for alternate controls and Disabled behavior.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; current control selection requires diversion capability, Disabled mode accepts divertable controls without requiring raw-XY support, and capture teardown restores the selected standard or alternate CID.

Important Files Changed

Filename Overview
crates/openlogi-hid/src/gesture.rs Adds mode-aware control selection, actual-CID event handling and restoration, and correctly resolves both previously reported capability-selection defects.
crates/openlogi-hid/src/reprog_controls.rs Defines the alternate gesture-control CID and explicit preference ordering.
crates/openlogi-agent-core/src/watchers/gesture.rs Derives the desired gesture mode from shared state and restarts capture when that mode changes.
crates/openlogi-agent-core/src/orchestrator.rs Publishes the persisted Disabled state to the capture watcher during each rebuild.
crates/openlogi-core/src/config.rs Adds Disabled-state accessors while preserving existing gesture maps.
crates/openlogi-core/src/config/settings.rs Extends the serialized gesture-owner scalar with the Disabled variant.
crates/openlogi-gui/src/mouse_model/view.rs Presents Off and Disabled as distinct gesture-owner choices.
crates/openlogi-gui/src/state.rs Persists Disabled mode and refreshes the projected binding state.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Config["gesture_owner config"] --> Orchestrator["Orchestrator rebuild"]
  Orchestrator --> Watcher["Gesture watcher"]
  Watcher --> Native["Native: leave firmware ownership"]
  Watcher --> Disabled["Disabled: divert without raw XY"]
  Watcher --> Gestures["Gestures: divert with raw XY"]
  Disabled --> Capture["HID++ capture session"]
  Gestures --> Capture
  Capture --> Selector["Select standard CID, then alternate CID"]
  Selector --> Device["Logitech control"]
Loading

Reviews (5): Last reviewed commit: "fix(hid): select gesture controls by mod..." | Re-trigger Greptile

Comment thread crates/openlogi-hid/src/gesture.rs Outdated
@4dux
4dux force-pushed the feat/gesture-control-disable branch from a7cf8f8 to af9d850 Compare August 2, 2026 12:35
Comment thread crates/openlogi-hid/src/gesture.rs
@4dux
4dux force-pushed the feat/gesture-control-disable branch from a7f8bf5 to 2974543 Compare August 4, 2026 08:32
@davidbudnick davidbudnick added type: feature New feature request platform: all Cross-platform issue labels Aug 4, 2026
@empotts

empotts commented Aug 11, 2026

Copy link
Copy Markdown

Following! Seems like this would fix my issues using the M720

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: feature New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants