Skip to content

Map SLOT_NAME_DPI_BUTTON to DpiToggle and add verification tests - #703

Open
ediaz2 wants to merge 1 commit into
AprilNEA:masterfrom
ediaz2:master
Open

Map SLOT_NAME_DPI_BUTTON to DpiToggle and add verification tests#703
ediaz2 wants to merge 1 commit into
AprilNEA:masterfrom
ediaz2:master

Conversation

@ediaz2

@ediaz2 ediaz2 commented Aug 20, 2026

Copy link
Copy Markdown

Summary

The MX Vertical's top button is missing from the UI because Logitech names the slot SLOT_NAME_DPI_BUTTON instead of the usual SLOT_NAME_MODESHIFT_BUTTON. Both refer to the same control, so we add pattern matching to recognize both.

Changes

  • geometry.rs: map SLOT_NAME_DPI_BUTTON to ButtonId::DpiToggle alongside SLOT_NAME_MODESHIFT_BUTTON
  • Add unit test verifying both slot names map correctly

Testing

  • cargo fmt --all -- --check — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo test --workspace — clean, including new test for DPI button slot names

Fixes #103
Screenshot 2026-08-20 at 00-35-57

@ediaz2
ediaz2 requested a review from AprilNEA as a code owner August 20, 2026 05:36
@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR recognizes Logitech’s SLOT_NAME_DPI_BUTTON metadata as the existing DPI-toggle control and adds unit coverage for both supported slot names.

  • Maps SLOT_NAME_DPI_BUTTON and SLOT_NAME_MODESHIFT_BUTTON to ButtonId::DpiToggle.
  • Verifies both aliases through focused unit assertions.

Confidence Score: 5/5

The PR appears safe to merge because the new alias follows the established DPI-toggle identity and is directly covered by a regression test.

The change narrowly extends an existing fixed-name mapping without altering surrounding geometry behavior, and the added test verifies both the original and new metadata names.

Important Files Changed

Filename Overview
crates/openlogi-desktop/src/features/mouse/geometry.rs Adds the MX Vertical DPI-button slot alias to the existing visual control mapping with direct regression coverage; no actionable defect was identified.

Reviews (1): Last reviewed commit: "feat: map SLOT_NAME_DPI_BUTTON to DpiTog..." | Re-trigger Greptile

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.

Missing top button on MX Vertical

1 participant