OpenLogi

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

FunctionHID++ fnSignatureReturns
thumbwheel0, paged()Option<ThumbwheelGesture>
has_thumbwheel0, paged()bool
thumbwheel_diverted0, 3()Option<bool>
set_thumbwheel_diverted0, 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

FieldTypeDescription
diversion_indexOption<u16>Sequential index among divertable descriptors. None means gesture 46 exists but is not divertable.

Constants

FieldValueDescription
THUMBWHEEL_GESTURE_ID46Legacy 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 byteMeaningOpenLogi treatment
high = 0x01End markerStops scanning. The low byte is ignored.
high bit[7]Gesture descriptorThe wrapper considers the field only when this bit is set.
high bit[1]DivertableThe wrapper assigns the current diversion index when gesture ID is 46.
high bit[0]Enabled descriptor flagThe wrapper does not expose or test this bit.
high bits[6:2]Other descriptor flagsThe wrapper ignores these bits.
lowGesture IDThe 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).

BytesFieldNotes
0offsetByte in the feature's diversion bitmap.
1—OpenLogi writes 0x01.
2maskBit mask in that byte.
response byte 0stateresponse[0] & mask != 0 means diverted.
response bytes 1–15—OpenLogi ignores these bytes.

Set diversion (fn 4)

BytesFieldNotes
0offseti >> 3.
1—OpenLogi writes 0x01.
2mask1 << (i & 7).
3valuemask 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}");
    }
}

On this page