0x6501 · gestures2
Discover legacy horizontal thumb-wheel gesture 46 and read or change its diversion bit.
0x6501 is the legacy Gestures2 descriptor feature. Older MX mice, including MX Master 2S, expose the horizontal thumb wheel as gesture ID 46 here. Newer devices can instead expose the dedicated 0x2150 thumbwheel feature.
Spec: Logitech HID++ 2.0 — x6501 gestures2 (partial). Used by: Scrolling capability discovery for legacy thumb wheels.
Function reference
Gestures2Feature implements feature version 0. It implements only descriptor discovery and diversion for gesture ID 46.
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
thumbwheel | 0, paged | () | Option<ThumbwheelGesture> |
has_thumbwheel | 0, paged | () | bool |
thumbwheel_diverted | 0, 3 | () | Option<bool> |
set_thumbwheel_diverted | 0, 4 | (diverted: bool) | bool |
All methods are async and return Result<…, Hidpp20Error>. The last two methods return None or false when gesture 46 is absent or not divertable.
Types
ThumbwheelGesture
| Field | Type | Description |
|---|---|---|
diversion_index | Option<u16> | Sequential index among divertable descriptors. None means gesture 46 exists but is not divertable. |
Constants
| Field | Value | Description |
|---|---|---|
THUMBWHEEL_GESTURE_ID | 46 | Legacy Gestures2 ID for the horizontal thumb wheel. |
Events
Gestures2Feature does not implement EmittingFeature. It exposes no events.
Wire format
OpenLogi scans descriptor pages until it finds gesture 46, sees the end marker, or reaches 1,024 descriptor fields. It rejects a table that passes that bound with Hidpp20Error::UnsupportedResponse.
Descriptor page (fn 0)
The request is [index_hi, index_lo, 0x00]. index is a u16, BE, for the first descriptor in the page. A response has eight two-byte descriptor fields at offsets 0–1 through 14–15.
| Descriptor byte | Meaning | OpenLogi treatment |
|---|---|---|
high = 0x01 | End marker | Stops scanning. The low byte is ignored. |
high bit[7] | Gesture descriptor | The wrapper considers the field only when this bit is set. |
high bit[1] | Divertable | The wrapper assigns the current diversion index when gesture ID is 46. |
high bit[0] | Enabled descriptor flag | The wrapper does not expose or test this bit. |
high bits[6:2] | Other descriptor flags | The wrapper ignores these bits. |
| low | Gesture ID | The wrapper compares it with 46. |
The scan advances eight descriptors per response. It increments the diversion index only for a previous descriptor with bit[1] set. It ignores a non-gesture descriptor and its low byte.
Diversion state (fn 3)
For diversion index i, offset = i >> 3 and mask = 1 << (i & 7).
| Bytes | Field | Notes |
|---|---|---|
| 0 | offset | Byte in the feature's diversion bitmap. |
| 1 | — | OpenLogi writes 0x01. |
| 2 | mask | Bit mask in that byte. |
| response byte 0 | state | response[0] & mask != 0 means diverted. |
| response bytes 1–15 | — | OpenLogi ignores these bytes. |
Set diversion (fn 4)
| Bytes | Field | Notes |
|---|---|---|
| 0 | offset | i >> 3. |
| 1 | — | OpenLogi writes 0x01. |
| 2 | mask | 1 << (i & 7). |
| 3 | value | mask diverts; 0 restores. |
| 4–15 | — | OpenLogi writes 0x00 in the long payload. |
OpenLogi ignores the write response. It makes no fn 4 request when the gesture is absent or not divertable.
How OpenLogi uses it
The device inventory probes Gestures2Feature::has_thumbwheel only when the device has no dedicated 0x2150 thumbwheel. A true result enables the legacy thumbwheel capability. A probe error becomes false, so the inventory does not expose that capability from an unanswered descriptor scan.
The device layer does not call thumbwheel_diverted or set_thumbwheel_diverted in v0.8.15. It therefore performs no Gestures2 diversion write, read-back, or session restore.
Open questions
The wrapper relies on the end marker, bit[7], bit[1], and gesture ID 46. It does not expose the enabled flag or other descriptor flags. No hardware capture verifies their full semantics or the function 4 response.
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(feature) = device.get_feature::<Gestures2Feature>() {
if let Some(gesture) = feature.thumbwheel().await? {
println!("diversion index: {:?}", gesture.diversion_index);
let changed = feature.set_thumbwheel_diverted(true).await?;
println!("diverted: {changed}");
}
}