AprilNEA / AprilNEA/OpenLogi

[Feature]: Software scroll inversion for RatchetWheel (0x2130) devices

Open
#694 2 comments 2 reactions 0 assignees View on GitHub
needs: triage type: feature
Dominant language
Rust
Stars
21k
Forks
675
Avg merge
2d 5h
Merged PRs (30d)
172

Description

### Pre-flight checklist

- [x] I searched existing issues and the [Roadmap](https://github.com/AprilNEA/OpenLogi#roadmap), and this isn't already tracked.

### Problem / motivation

OpenLogi disables per-device scroll inversion unless a device exposes HID++ `0x2121 HiResWheel` with the native inversion capability. A Logitech Signature Plus M750 L connected through a Logi Bolt receiver instead exposes `0x2130 RatchetWheel` and does not expose `0x2121`, so the GUI reports that native HID++ scroll inversion is unavailable.

The same mouse and connection support reversed scrolling in Logi Options+, which indicates that a software/host-side implementation is possible. OpenLogi 0.7.1 on macOS 26.6.2 reproduces the problem.

No existing M750 scroll-inversion or `0x2130` fallback issue was found.

### Proposed solution

Add a per-device software scroll-inversion path for `0x2130 RatchetWheel` devices.

Suggested behavior:

- Continue to prefer native `0x2121` inversion when the device advertises `has_invert`.
- Implement the `0x2130` get/set wheel-mode calls and wheel-movement notification decoding.
- When inversion is enabled on an `0x2130` device, divert wheel reports to HID++, invert the vertical delta, and inject the resulting OS scroll event through OpenLogi's existing input-injection layer.
- Restore ordinary HID reporting when the software inversion setting is disabled or OpenLogi exits.
- Keep the setting scoped to the physical mouse so the macOS trackpad direction is unchanged.
- Clearly label the GUI mode as a software fallback rather than native HID++ inversion.

If divert-and-inject is not reliable on every platform, an OS-hook transformation for the selected physical device could be used as the fallback instead.

### Alternatives considered

- macOS “Natural scrolling”: changes system-level behavior and does not provide OpenLogi's per-device separation.
- Manually setting `invert_scroll = true`: the agent intentionally gates the write on the live `scroll_inversion` capability.
- Forcing the persisted capability flags: cannot add `0x2121` firmware support and would make OpenLogi attempt an unsupported write.
- Treating `0x2130` as native inversion support: the RatchetWheel protocol only exposes HID/HID++ report diversion, not an inversion bit.

### Related area(s)

- [x] GUI
- [ ] CLI
- [ ] Button actions / remapping
- [ ] DPI
- [ ] SmartShift
- [ ] Per-application profiles
- [x] Configuration (TOML)
- [ ] Auto-update
- [x] Other

### Additional context

### Hardware and software

- Device: Logitech Signature Plus M750 L / Logi M750
- Connection: Logi Bolt receiver, VID `046d`, PID `c548`
- OpenLogi: `0.7.1`
- OS: macOS `26.6.2`, Apple Silicon
- Logi Options+: reversed scrolling works with the same device

### Redacted `openlogi list` output

```text
Logi Bolt Receiver (, vid=046d pid=c548)
└─ slot 2 ● Logi M750 (mouse, wpid=?, battery=85% full (discharging))
model_ids=[b02c,0000,0000] ext=03 serial= unit_id= transports=btle
```

### `openlogi diag features` result

The device reports 32 features. Relevant entries:

```text
13 0x2130 v0
14 0x2201 v2
```

There is no `0x2121` entry.

### `openlogi diag wheel` output

```text
device: Logi M750 (slot 2 on receiver )
Error: read HiResWheel mode

Caused by:
device does not expose HID++ feature 0x2121
```

OpenLogi already names `0x2130` as `RatchetWheel` in the feature registry, but it has no implementation registered: https://github.com/AprilNEA/OpenLogi/blob/master/crates/openlogi-hidpp/src/feature/registry.rs

The available `0x2130` protocol description exposes report diversion and wheel-movement events, but no native inversion flag: https://lekensteyn.nl/files/logitech/x2130_ratchetwheel.html

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with crates/openlogi-hidpp/src/feature/registry.rs and the existing `diag wheel` path, then read the linked 0x2130 RatchetWheel protocol description. Trace how GUI settings and the existing input-injection layer handle wheel capabilities. Done means 0x2130 devices support scoped software inversion, restored ordinary reporting when disabled or on exit, and a clearly labeled GUI fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.