OpenLogi
功能(Features)

0x6501 · gestures2

旧版手势描述符表——OpenLogi 借此找到并接管 MX Master 2S 的拇指滚轮,它早于专用的 0x2150 功能。

0x6501 gestures2 是罗技的旧版手势配置功能:设备会公布一张手势 id 描述符表,每一项标注是否存在、是否启用,以及——有时——能否接管给主机。

OpenLogi 只实现了它需要的那一小块:MX Master 2S 把横向拇指滚轮暴露为 0x6501 下的手势 id 46,而不是通过更新的专用 0x2150 thumbwheel 功能。封装会遍历描述符表找到该手势,算出它的接管索引,并可以接管或还原它。

规格: Logitech HID++ 2.0 —— x6501 gestures2(部分实现)。用于: 旧款 MX 鼠标的拇指滚轮捕获。

Function reference

The Gestures2Feature wrapper (0x6501) exposes:

Methods

FunctionHID++ fnSignatureReturns
thumbwheel0 (paged)()Option<ThumbwheelGesture>
has_thumbwheel0 (paged)()bool
thumbwheel_diverted0, 3()Option<bool>
set_thumbwheel_diverted0, 4(diverted: bool)bool

All are async and return Result<…, Hidpp20Error>. Merely exposing 0x6501 is not enough to assume a thumb wheel: touchpads and other gesture devices expose the feature without one, which is why every call starts from the descriptor table.

Types

ThumbwheelGesture

FieldTypeDescription
diversion_indexOption<u16>Sequential index among gestures that advertise the divertable bit. None means gesture 46 exists but cannot be diverted.

Constants

NameValueDescription
THUMBWHEEL_GESTURE_ID46The gestures2 id of the horizontal thumb wheel.

Wire format

Descriptor scan (fn 0)

Request: [hi, lo, 0x00] — the big-endian index of the first descriptor field on this page. The response carries up to eight two-byte fields:

ByteMeaning
high0x01 marks the end of the table. Bit 7 set marks a gesture entry; bit 1 marks it divertable.
lowThe gesture id.

The walk advances eight fields at a time, counting divertable gestures as it goes: that running count is the diversion index of the next divertable gesture. It stops at the end marker, at gesture 46, or after 1024 fields — the bound stops a malformed table from causing an unbounded probe loop.

Diversion state (fn 3) and write (fn 4)

The diversion bit for index i lives at byte i >> 3, mask 1 << (i & 7):

FunctionPayloadNotes
3 (read)[offset, 0x01, mask]Response byte 0 AND mask → currently diverted.
4 (write)[offset, 0x01, mask, value]value is mask to divert, 0 to restore. Needs a long HID++ report.

Usage (Rust)

use hidpp::{device::Device, feature::gestures2::Gestures2Feature};

// device: &mut Device, already created via Device::new(channel, index)
device.enumerate_features().await?;

if let Some(feat) = device.get_feature::<Gestures2Feature>() {
    if feat.has_thumbwheel().await? {
        // Divert the wheel to the host; false when it isn't divertable.
        let diverted = feat.set_thumbwheel_diverted(true).await?;
        println!("thumb wheel diverted: {diverted}");
    }
}

另见: 0x2150 thumbwheel0x6500 gestures1

本页目录