Skip to content

Add tray context menu for manual mouse model selection (MX Master 3S / MX Vertical)#5

Draft
thfaix with Copilot wants to merge 2 commits into
copilot/add-remapping-mx-vertical-mouse-keysfrom
copilot/add-contextual-menu-for-mice
Draft

Add tray context menu for manual mouse model selection (MX Master 3S / MX Vertical)#5
thfaix with Copilot wants to merge 2 commits into
copilot/add-remapping-mx-vertical-mouse-keysfrom
copilot/add-contextual-menu-for-mice

Conversation

Copilot AI commented Mar 16, 2026

Copy link
Copy Markdown

Without a manual override, users whose device isn't auto-detected via HID++ have no way to tell Mouser which mouse they're using, leaving the UI in the wrong state (e.g., gesture/hscroll hotspots shown for MX Vertical users).

Changes

core/config.py

  • Added selected_device: "" to DEFAULT_CONFIG settings — persists manual choice across restarts; empty string means HID++ auto-detect only

ui/backend.py

  • deviceName — auto-detected name takes precedence; falls back to selected_device when no HID++ device is active
  • deviceDisplayName — delegates to deviceName, ultimately falls back to "MX Master 3S"
  • selectedDevice property — exposes the config setting to QML
  • setSelectedDevice(name) slot — saves to config and emits settingsChanged + deviceChanged, updating all dependent bindings (title bar, tray tooltip, isMxVertical in MousePage.qml)

main_qml.py

  • Added "Select Mouse" submenu to the system tray context menu with checkable "MX Master 3S" and "MX Vertical" actions
  • Check state stays in sync via backend.settingsChanged
# Tray menu structure
Open Settings
Select Mouse ▶  ✓ MX Master 3S
                  MX Vertical
─────────────────
Disable Remapping
...
Quit Mouser

The existing isMxVertical binding in MousePage.qml (backend.deviceName === "MX Vertical") requires no changes — it correctly reacts to both auto-detected and manually selected device names.

Original prompt

Pull request: #4
add contextual menu to select mouse between Mx master 3s and Mx vertical


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

…tical

Co-authored-by: thfaix <17575835+thfaix@users.noreply.github.com>
Copilot AI changed the title [WIP] Add contextual menu to select mouse between Mx Master 3S and Mx Vertical Add tray context menu for manual mouse model selection (MX Master 3S / MX Vertical) Mar 16, 2026
Copilot AI requested a review from thfaix March 16, 2026 23:31
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.

2 participants