Skip to content

fix(hid): recognise the non-MX-line dedicated gesture button (CID 0x00d7) - #1473

Open
4ni1ak wants to merge 1 commit into
AprilNEA:masterfrom
4ni1ak:fix/gesture-button-alt-cid
Open

4ni1ak wants to merge 1 commit into
AprilNEA:masterfrom
4ni1ak:fix/gesture-button-alt-cid

Conversation

@4ni1ak

@4ni1ak 4ni1ak commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Changes

  • openlogi-device: add GESTURE_BUTTON_ALT_CID (0x00d7) and list it alongside the MX-line CID in GESTURE_SOURCE_BUTTONS — the two are mutually exclusive per device (confirmed by both devices' control tables), so listing both is safe with no per-model gating needed.
  • New unit test proving the alternate CID resolves to ButtonId::GestureButton the same way the MX-line CID does.

Testing

  • cargo fmt --all -- --check
  • RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • Not independently hardware-verified here — based on the openlogi diag controls output both reporters attached to their issues. Confirmed the same divertable | raw-xy | force-raw-xy signature between the two unrelated devices, which is what gives confidence this is a real shared CID rather than device-specific.

Fixes #1199
Fixes #859

…0d7)

The dedicated gesture-button CID (0x00c3) is MX-line only. Several other
Logitech mice — confirmed on real hardware from two independently reported
devices, the Lift (B031, issue AprilNEA#1199) and the Logi POP Mouse (b030, issue
AprilNEA#859) — expose the same physical role (a single round button with
hold-and-swipe support) under CID 0x00d7 instead, and neither exposes
0x00c3 at all. `openlogi diag controls` on both devices shows 0x00d7 with
the exact `divertable | raw-xy | force-raw-xy` flag combination that marks
the gesture button on MX-line devices, and no other CID either device
reports shares it.

Add GESTURE_BUTTON_ALT_CID and list it alongside the MX-line CID in
GESTURE_SOURCE_BUTTONS — the two are mutually exclusive per device, so
listing both is safe. This is what surfaces the Lift's and POP's dedicated
button as GestureButton in the GUI and in capture at all: previously
gesture_sources=0 on the Lift, and the special button on the POP had no
ButtonId anywhere in the table.

Fixes AprilNEA#1199
Fixes AprilNEA#859
@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR appears safe to merge, with one non-blocking maintainability improvement to derive the new CID from the existing typed protocol constant.

Fix All in CodexFindings

  1. P2 Duplicated protocol identifier

Summary

This PR recognizes the non-MX virtual gesture-button CID and routes it through the existing gesture-session behavior.

  • Adds CID 0x00d7 as an alternate source for ButtonId::GestureButton.
  • Extends gesture-source resolution without changing the shared arming, event, dispatch, or restoration logic.
  • Adds a unit test covering both dedicated gesture-button CIDs.

Reviews (1) · Last reviewed commit: "fix(hid): recognise the non-MX-line dedi..."

/// either device's control table shares. Neither device exposes `0x00c3` at
/// all, so the two CIDs are mutually exclusive per device rather than
/// competing for the same physical control.
pub const GESTURE_BUTTON_ALT_CID: u16 = 0x00d7;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Duplicated protocol identifier

The protocol layer already defines CID 0x00d7 as control_ids::VIRTUAL_GESTURE_BUTTON, but this constant duplicates its numeric value as a literal. Derive it from the typed protocol constant, as HAPTIC_PANEL_CID does, so these definitions cannot silently drift apart.

Suggested change
pub const GESTURE_BUTTON_ALT_CID: u16 = 0x00d7;
pub const GESTURE_BUTTON_ALT_CID: u16 = control_ids::VIRTUAL_GESTURE_BUTTON.0;

Fix in Codex Fix in Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant