Skip to content

feat(core): add the G502 X PLUS gaming layout - #2456

Open
21omen wants to merge 1 commit into
AprilNEA:masterfrom
21omen:g502x-plus-layout
Open

21omen wants to merge 1 commit into
AprilNEA:masterfrom
21omen:g502x-plus-layout

Conversation

@21omen

@21omen 21omen commented Nov 8, 2026 •

Copy link
Copy Markdown

Summary

Adds a GamingLayout for the G502 X PLUS (wpid 0x4099), as suggested in #1350 after #1729 / #2201 landed. Both model keys are covered: 04099 (measured in #1350) and 14099 (the white variant, measured on my unit).

The slot order is the same as the G502 X LIGHTSPEED in #2230, so the two entries could be merged into one layout later if preferred.

Changes

  • openlogi-core: new G502_X_PLUS layout (binding/gaming.rs), added to LAYOUTS and re-exported from binding.rs.
    • Slots 0–5: left, right, middle, back, sniper (G6, stock DpiShift), forward.
    • Slots 6/7: wheel tilt left/right, silent in host mode.
    • Slots 8–10: G9 behind the wheel (stock None; it cycles onboard profiles, which has no host equivalent), G8 front (NextDpiPreset), G7 rear (PreviousDpiPreset).
    • stock_dpi_presets: 800, 1200, 1600, 2400, 3200, the factory levels from Logitech's G502 X PLUS / LIGHTSPEED setup guide.
  • Tests: slot table and stock functions for both model keys; unknown_models_have_no_layout now uses 040b2 instead of 04099.

Testing

  • cargo test -p openlogi-core gaming (16 passed)
  • cargo clippy -p openlogi-core --all-targets -- -D warnings
  • cargo fmt --all -- --check

Hardware-tested on a G502 X PLUS (14099) over its Lightspeed receiver, Linux, dev agent + desktop from this branch:

  • The layout is picked up; G7, G8, G9 and both wheel tilts appear in the Buttons tab.
  • Bound G8 fires its action and the DPI does not change; bound wheel tilt left fires its action.
  • Unbound G7 steps the DPI down one preset; holding the unbound sniper drops to 800 and restores on release.

Not covered: the sniper, back and forward hotspots don't appear in the Buttons tab because the g502x_plus side render never downloads. Its manifest points at images/device/…, which the asset sync rejects ("asset file name must be a single safe path component"). That is unrelated to this layout; See #2457

🤖 Generated with [Claude Code]

@21omen
21omen requested a review from AprilNEA as a code owner November 8, 2026 12:19
@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds the G502_X_PLUS layout for model keys 04099 and 14099.

  • G502 X PLUS mice now use their measured button and DPI layout.

21omen explicitly acknowledged that the side image fails to download, hiding the sniper, Back, and Forward hotspots. The PR description identifies the existing asset-path rejection as separate work; it is not reported here.

Reviews (1) · Last reviewed commit: "feat(core): add the G502 X PLUS gaming l..." · Reviewed by Greptile

@AprilNEA AprilNEA added needs: decision Needs a maintainer/product decision type: feature New feature request area: hidpp HID++ protocol and device feature support platform: all Cross-platform issue labels Nov 8, 2026 — with Manus Connector
@davidbudnick davidbudnick added this to the v1.0.0 milestone Nov 10, 2026
@joseluislucio

Copy link
Copy Markdown

Hardware test on macOS (G502 X PLUS, 04099, Lightspeed receiver)

Built from this PR plus #2461 on macOS (Apple Silicon, Metal toolchain) and ran the dev bundle against a real G502 X PLUS (wpid 0x4099, 87% battery).

  • The layout is picked up: Back, Forward, sniper (G6), G7, G8, G9, middle click and both wheel tilts appear in the Buttons tab, plus the G-Shift tab. Before, only middle click was offered.
  • With fix(assets): fetch and draw depot renders stored under sub-directories #2461 applied, the side render downloads (images/device/…) and the hotspots are drawn.
  • Pressing each button works as expected on the hardware.
  • cargo test -p openlogi-core gaming: 16 passed.

This complements the Linux test already in the description (14099); this is macOS with the black unit.

This branch has not been deployed

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

Labels

area: hidpp HID++ protocol and device feature support needs: decision Needs a maintainer/product decision platform: all Cross-platform issue type: feature New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants