使用 hidpp 所输入的 ThumbwheelFeature 来驱动拇指轮,而不是手写的 0x2150 模块
作者: AprilNEA创建于 2026年9月19日更新于 2026年9月19日
标签type: enhancementarea: hidarea: hidppplatform: all
`crates/openlogi-device/src/thumbwheel.rs` 重新实现了 HID++ `0x2150` (getThumbwheelInfo, setThumbwheelReporting, 手轮事件解码器), 附注是 "hidpp 0.2 不提供带类型的封装"。分支现在执行: `openlogi_hidpp::feature::thumbwheel::ThumbwheelFeature` 覆盖了相同的三个函数以及 getThumbwheelStatus, 没有调用者。 使用带类型的特性替换模块会删除 ~390 行, 还会在一个地方更改了线缆格式的拼写。 捕获会话 (`session/gesture/arm.rs`, `capture_restore.rs`) 和核心绑定将调用特性的方法; `RotationStatus`/`WheelResolution`/`WheelDirection` 映射到特性的类型。 合并前的验证: 字节对字节的测试, 两个编码器生成相同的 `setThumbwheelReporting` 数据包, 两个解码器都同意记录的 `thumbwheelEvent` 报告; 然后是一个真实的 MX 主机 - 手轮重新绑定仍然会执行手臂动作, 转动仍然会滚动, 按下仍然会触发, 当代理退出时, `undivert` 返回原生滚动。 由于最后一步需要硬件, 因此推迟到 9 月的重构调查中。
内容来源: AprilNEA/OpenLogi