Repository navigation
Conversation
Add Capabilities::thumbwheel_inversion (0x2150) and per-device DeviceConfig::invert_thumbwheel. Apply native hardware inversion via HID++ 0x2150 when the wheel is native, preserve the configured native direction when tearing down a diverted session, and invert only horizontal scroll actions in software dispatch when the thumb wheel is diverted.
Extract ScrollingPanel on the Pointer tab, clarify the existing scroll-inversion label as vertical scroll, move per-device thumbwheel sensitivity out of SmartShiftPanel into ScrollingPanel alongside the new horizontal scroll inversion toggle (gated on capabilities.thumbwheel), add override status/reset controls, and show the override count in Settings -> General.
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no new actionable issue remains.
|
…bwheel capture specs
…and test controls
Author
|
Addressed all Greptile review comments in the latest commits:
Ready for another pass whenever CI runs are approved. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add per-device horizontal scroll inversion for Logitech thumb wheels and consolidate thumb-wheel scrolling controls into the Scrolling card on the Pointer tab, gated on
capabilities.thumbwheel.pointer.invert_scroll_directioni18n key intact).invert_thumbwheeltoggle (defaultfalse, omitted fromconfig.tomlwhen off):0x2150 Thumbwheeldevices with native reporting (default sensitivity and default bindings), writes the inversion bit directly to hardware via0x2150(setThumbwheelReporting), and preserves that configured native direction when tearing down a diverted session.0x6501Gestures2 gesture-46 devices), inverts only horizontal scroll actions (HorizontalScrollLeft<->HorizontalScrollRight) in software dispatch without affecting non-scroll bindings (e.g. Volume, Tabs).SmartShiftPanelinto the newScrollingPanelalongside Invert horizontal scroll, gated oncapabilities.thumbwheelso mice without a thumb wheel do not see it and offline / non-SmartShift thumb-wheel mice still can configure it.Relates to #1592, #1570.
Changes
openlogi-core: AddedCapabilities::thumbwheel_inversion(0x2150),DeviceConfig::invert_thumbwheel, per-device helpers (invert_thumbwheel,set_invert_thumbwheel,has_device_thumbwheel_sensitivity,thumbwheel_sensitivity_override_count), legacy identity merge support, and round-trip / TOML-omission tests.openlogi-ipc: Documentedthumbwheel_inversionunder unreleased protocolv46and updated thewire_formatgolden test.openlogi-device/openlogi-hid: Addedset_thumbwheel_inversion/set_thumbwheel_inversion_on(0x2150write helpers with scripted-channel unit tests), addedCaptureSpec::thumbwheel_native_directionso teardown restores the configured native polarity, and bumped probe cacheSCHEMA_VERSIONto21.openlogi-agent-core: Wired native0x2150writes (on connect/reconnect and config reload), diverted-session native direction restoration, gesture-46 diversion when inverted, and horizontal-scroll-only inversion inWheelConfiguration::for_planwith unit tests.openlogi-ui: Updatedpointer.invert_scroll_directionwording (en,uk,ru) to specify vertical scroll and added the 7 new thumb-wheel keys in lockstep across all 24 locale files.openlogi-desktop: ExtractedScrollingPanel(features/pointer/scrolling.rs), moved per-device thumb-wheel sensitivity out ofSmartShiftPanel, gated the thumb-wheel section oncapabilities.thumbwheel, added state/commit helpers (state/scroll.rs,state/settings.rs), and displayed the per-device override count in Settings → General.Screenshots
Testing
Ran locally on Fedora 44 Linux (
x86_64,rustc 1.100.1):cargo fmt --all -- --check— passedcargo clippy -p openlogi-core -p openlogi-device -p openlogi-hid -p openlogi-ipc -p openlogi-agent-core -p openlogi-ui -p openlogi-desktop --all-targets -- -D warnings— passedcargo check -p openlogi-agent -p openlogi-cli— passedcargo test -p openlogi-core— 524 passedcargo test -p openlogi-ipc --test wire_format— 38 passedcargo test -p openlogi-device— 847 passedcargo test -p openlogi-agent-core— 935 passedcargo test -p openlogi-ui locale— 1 passedcargo test -p openlogi-desktop state::scroll— 3 passedcargo test -p openlogi-desktop features::pointer::scrolling— 6 passedNot run locally:
cargo xtask ci ast-grep(skipped:ast-grepis not installed outside devenv)Hardware verification:
0x2150Thumbwheel) underOPENLOGI_PROFILE=dev.