feat(thumbwheel-tap): expose thumbwheel tap separately#341
Conversation
Greptile SummaryThis PR exposes thumbwheel tap as its own configurable control. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "fix: gate thumbwheel tap on device capab..." | Re-trigger Greptile |
|
Is this getting worked on ? Honestly this is the first time I come to know my mouse even supports this ! Does the MR keeps adds confguring this capacitive input ? |
5100cac to
17bfdf0
Compare
| .expect("hook maps") | ||
| .bindings | ||
| .insert(ButtonId::Thumbwheel, Action::AppExpose); | ||
| assert!(thumbwheel_armed(&maps, DEFAULT_THUMBWHEEL_SENSITIVITY)); |
There was a problem hiding this comment.
This expectation keeps the upgraded-config failure reachable. Older configs can contain an explicit Thumbwheel = AppExpose tap mapping while rotation bindings and sensitivity are still default. After this PR changes the tap default to None, the arming check treats that preserved tap action as customized behavior and enables HID++ thumbwheel diversion, so native thumbwheel rotation can be captured and re-synthesized even though the user only kept the old tap mapping. The arming decision needs to avoid using the preserved tap binding alone as a reason to capture rotation.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Fixed in The migration is intentionally version-gated: a user who explicitly configures Regression coverage verifies both sides: legacy v3 defaults are removed, while intentional v4 tap bindings are preserved. |
Fixed in Debug builds now provide direct hardware evidence: Unsupported devices report |
What changed
Thumbwheel = AppExposedefault away while preserving tap actions configured with the new schemaWhy
The MX Master 3S reports capacitive tap separately from rotation while the thumbwheel is diverted. OpenLogi hid that tap binding while defaulting it to App Exposé, so rolling and releasing the wheel could trigger App Exposé even when both rotation directions were configured as Do Nothing.
The capture setup also used single-tap support as a prerequisite for all thumbwheel diversion, unintentionally disabling customized rotation on devices without tap support.
How to reproduce the original issue
0x2150and supports capacitive single-tap.Thumbwheelbinding at its historical default, App Exposé.After this MR, the mouse model shows Thumb Wheel Up / Thumb Wheel Tap / Thumb Wheel Down as separate controls. A fresh or migrated config leaves Tap at Do Nothing, so step 4 does not arm capture or dispatch App Exposé. Assigning an action to Tap intentionally enables capacitive-tap capture.
Representative app log
Run the agent with debug tracing enabled (
OPENLOGI_LOG=debug). Timestamps and module prefixes are omitted below; the messages and fields match the application tracing calls.Before the fix, the hidden default could dispatch App Exposé:
After the fix with Tap left at Do Nothing, the thumbwheel stays in native rotation mode when no sensitivity or rotation customization requires capture:
After explicitly assigning App Exposé to Thumb Wheel Tap, capture and dispatch are expected:
The exact
index,gesture, anddpi_buttonsvalues depend on the connected device and its configured controls.User impact
Users can configure rotation and tap independently. Tap is inert by default, while horizontal scrolling remains the default for rotation. The v4 migration removes the historical implicit App Exposé tap from older configs; tap actions intentionally selected after migration remain intact and functional.
Validation
cargo test -p openlogi-core -p openlogi-hid -p openlogi-agent-core --lib— 182 passedcargo +1.94.0 test -p openlogi-gui— 40 passedcargo fmt --all --checkgit diff --checkRust 1.94 was used for the GUI test and bundle because the current locked
smol_str 0.3.6requires Rust 1.89+, while the local default toolchain is Rust 1.88.Fixes #340