[Feature]: wire the precision button to 0x2205 pointer scaling on devices without adjustable DPI
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 675
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 172
Description
### Problem / motivation
On the original MX Ergo the precision button (CID `0xed`) is mapped to `ButtonId::DpiToggle`, whose default action is `CycleDpiPresets`. The device has no `0x2201`/`0x2202`, so no DPI presets can ever be configured for it and every press is dropped with `no DPI presets configured for active device — press ignored`. Options+ drives precision mode on this device through `0x2205` PointerMotionScaling instead.
#1347 adds the `0x2205` protocol layer (read/write plus `openlogi diag pointer-speed`), verified on hardware. What is still missing is the product layer: nothing in the config, agent or GUI can use it.
### Proposed solution
Treat pointer scaling as its own capability rather than as a DPI preset:
- A `pointer_scaling` capability flag driven by the presence of `0x2205`, like the existing `0x2121`-driven wheel flags.
- Config: a per-device precision scaling value (the multiplier applied while precision mode is engaged) plus the device's normal scaling.
- Actions: a momentary "precision mode" (scaling applied while held) and/or a toggle, so `0xed` finally does something on devices without adjustable DPI.
- GUI: a slider on the pointer panel for devices that expose `0x2205` but not `0x2201`/`0x2202`.
### Important constraint
The spec says firmware validates and clips out-of-range scaling values. An MX Ergo (`MPM06.03_B0022`) does not: it stored both `0x0001` (pointer nearly frozen) and `0xffff` (256x) unchanged. So whatever exposes this to users must bound the value itself — Solaar uses `0x002e`–`0x01ff`. A UI that writes an unbounded value can leave a user unable to move the pointer to fix it.
### Alternatives considered
Synthesizing fake DPI presets from `0x2205` would reuse the existing DPI plumbing, but the two features are not the same thing: DPI is an absolute sensor resolution, `0x2205` a host-side multiplier. Conflating them would put wrong numbers in the GUI and in `config.toml`.
### Related
- #1347 (protocol layer, open)
- #367 (MX Ergo device support)
Happy to implement this once there is a decision on the config/action shape; I have the hardware to verify it.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the #1347 protocol layer and the existing 0x2121-driven wheel capability paths across config, agent, and GUI. Decide the config and action shape for 0x2205 pointer scaling, including bounded values and precision-mode behavior. Done means devices with 0x2205 can expose and control precision scaling without being represented as DPI presets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100