feat(hidpp): remap G502 X Plus extra buttons via 0x8110 - #1350
Open
CazzaCoder wants to merge 9 commits into
Open
CazzaCoder wants to merge 9 commits into
CazzaCoder wants to merge 9 commits into
Conversation
SetMouseButtonMapping is what suppresses G6–G9 HID reports, and Host mode is what makes that mapping apply. The CLI dump/watch stays read/spy-only so diagnostics cannot leave a mouse in Host mode. Co-authored-by: Cursor <cursoragent@cursor.com>
One customized G6–G9 button pauses onboard profiles so firmware DPI/profile no longer steal the press. Unbound siblings stay on 0x2201 software DPI, and session teardown restores mapping then onboard mode. Co-authored-by: Cursor <cursoragent@cursor.com>
The G502 has no 0x1b04 depot slots, so the Buttons tab needs synthetic targets. The pause note is the honest Host-mode cost until those extras return to default. Co-authored-by: Cursor <cursoragent@cursor.com>
This mouse has no 0x1b04, so remapped side buttons must be suppressed in the 0x8110 mapping or the OS keeps seeing hardware Back/Forward. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve silhouette overlays from the HID++ model id so schema-5 unit keys do not hide G6–G9, and show the pause note for any Host-mode remap. Co-authored-by: Cursor <cursoragent@cursor.com>
CazzaCoder
marked this pull request as ready for review
September 11, 2026 04:13
|
A failed spy start or partial Host-mode write left mappings suppressed with no 0x8110 stream, and click-less long presses never armed. Restore firmware on those paths, wait for G6 DPI restore on session cancel, and gate extras on any configured action. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
The G6 cancel finding (summary issue 3, no review thread) is also in |
Detached restore was aborted when the gesture runtime dropped, and a late write could overwrite a replacement session's DPI. Cancel now joins in-flight shift ops and restores inline before successor arming. Co-authored-by: Cursor <cursoragent@cursor.com>
A capture session can last the whole device lifetime, so retaining every JoinHandle until cancel made spy_ops grow with normal unbound DPI use. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0x8110spy events. Spy-only overlay is not enough: firmware would still change DPI/profile, and this mouse has no0x1b04to divert side buttons.0x2201; unbound G9 cannot cycle onboard profiles in Host mode. Unbound G4/G5 stay firmware-native.04099(G502 X Plus) via a smallSpyModelregistry. Cousins (G502 X LS0409f) are not invented here — adding one is a livediag mouse-buttons --watchdump plus three table rows.0x8100mode; no flash or profile writes). Does not copy feat(device): G-series gaming button remap via HID++ 0x8110 spy #1259.Changes
SetMouseButtonMappingon0x8110; minimal0x8100get/set mode (Onboard/Host).openlogi diag mouse-buttons [--watch]stays read/spy-only (no mode switch from the CLI).ButtonId::{DpiShift,DpiUp,DpiDown,ProfileCycle}+SPY_BUTTONS(not inALL);SpyModel/SPY_MODELSregistry keyed by HID++ model id, with schema-5 unit-key resolution through persisted identity;0x8110earns the Buttons tab;PROTOCOL_VERSION30 → 31.Drop; remapped G4/G5 are spy-owned (no0x1b04); native DPI fallback for unbound G6–G8.spy_overlay_for; silhouette usesmodel_keynot the unit settings key; Host-mode pause note; keys in all 23 locale catalogs.Adding another
0x8110model lateropenlogi diag mouse-buttons --watch— record bit → official button. Do not copy another row.openlogi_core::binding::SPY_MODELS.openlogi-devicesession/gesture/spy.rs(SPY_BIT_TABLES).hotspots::spy_overlay_for.Testing
cargo fmt --all -- --checkRUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets -- -D warningsRUSTFLAGS="-D warnings" cargo test --workspaceRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agentcargo test -p openlogi-ipc --test wire_format(goldens unchanged; pin bumped to 31)cargo test -p openlogi-ui localecargo xtask cinot run (macOS host; Linux/Windows CI jobs not reproduced locally)Runtime-tested on the author's G502 X Plus Lightspeed (
wpid=4099, model04099). Quit/Applications/OpenLogi.appand its Agent/Overlay so the cargo agent owns the receiver; grant Input Monitoring / Accessibility to OpenLogi Agent Dev.OPENLOGI_PROFILE=dev cargo run -p openlogi -- listshows● G502 X PLUS.0x1b04). MX mice do not grow DPI Up/Down.0x2201.Droprestore is wrong.Not runtime-tested on Windows (the #730 reporter's host) or on G502 X LS.
Honest limitation
While any Host-mode remap is active, onboard profiles are paused. That is required for
SetMouseButtonMappingto apply. Unbound G9 cannot cycle onboard profiles until those bindings are cleared.Fixes #730 (partial)