OpenLogi

0x6100 · touchpadRawXY

Query an integrated touchpad and receive raw multi-touch frames after enabling raw reporting.

0x6100 exposes raw multi-touch frames from an integrated touchpad. It reports touchpad geometry, sensor properties, and the active raw-report flags. A frame contains two touch points, so a frame with more contacts spans multiple reports with one timestamp.

Spec: Logitech HID++ 2.0 — touchpadRawXY (v0). Used by: Not used by OpenLogi outside the typed openlogi-hidpp wrapper.

Function reference

TouchpadRawXyFeature implements feature version 0.

Methods

FunctionHID++ fnSignatureReturns
get_touchpad_info0()TouchpadInfo
get_raw_report_state1()RawReportFlags
set_raw_report_state2(flags: RawReportFlags)()
listenevent()async_channel::Receiver<TouchpadRawEvent>

The first three methods are async and return Result<…, Hidpp20Error>. listen is synchronous.

Types

TouchpadInfo

FieldTypeDescription
x_sizeu16Pad width in native coordinate units.
y_sizeu16Pad height in native coordinate units.
z_data_rangeu8Z-data range. 0x00 means none and 0x0f means 16-bit.
area_data_rangeu8Area-data range. 0x0f means 16-bit.
timestamp_unitsu8Timestamp increment in 0.1 ms units.
max_finger_countu8Maximum tracked contacts.
originOriginCoordinate origin.
pen_supportboolPen input support.
raw_report_mapping_versionu8Raw-report mapping version.
dpiu16Native sensor DPI.

RawReportFlags

FieldValueDescription
RAW1 << 0Enable raw reporting.
FORCE_ADD1 << 1Add force data to 16-bit reporting. Deprecated.
ENHANCED1 << 2Enable enhanced reporting.
WIDTH_HEIGHT1 << 3Report width and height instead of area.
NATIVE_GESTURE1 << 4Report native gestures.
MAJOR_MINOR1 << 5Report major, minor, and orientation data.
WIDTH_HEIGHT_8BIT1 << 6Report 8-bit width and height bytes instead of area.

Some combinations are mutually exclusive. Common valid bitmaps are 0x00, 0x05, 0x09, 0x21, and 0x41. The wrapper retains an unknown bit in a read value. It writes every bit in a caller-supplied RawReportFlags value unchanged.

Origin

VariantValueDescription
LowerLeft1Lower-left corner.
LowerRight2Lower-right corner.
UpperLeft3Upper-left corner.
UpperRight4Upper-right corner.

DualXyData and TouchPoint

FieldTypeDescription
timestampu16Running frame timestamp.
touch1TouchPointFirst point in the report.
touch2TouchPointSecond point in the report.
buttonboolPhysical surface switch state.
end_of_frameboolThis report completes the frame.
finger_countu8Total contacts in the frame.
contact_typeu8Two-bit type. 0 is a finger; other values are reserved.
contact_statusu8Two-bit status. 0 is hover; 1 is touch; other values are reserved.
xu1614-bit X coordinate.
yu1614-bit Y coordinate.
finger_idu8Four-bit contact ID.
zu8Z distance or force MSB, depending on flags.
areau8Area, force LSB, or other flag-selected data.

Events

TouchpadRawXyFeature implements EmittingFeature<TouchpadRawEvent>. It accepts only event sub-ID 0.

VariantDescription
DualXy(DualXyData)A raw report with two touch-point slots.

Wire format

All three functions send three-byte requests. OpenLogi reads extended response payloads and ignores response bytes not listed below.

get_touchpad_info (fn 0)

BytesFieldNotes
0–1x_sizeu16, BE.
2–3y_sizeu16, BE.
4z_data_rangeRaw u8.
5area_data_rangeRaw u8.
6timestamp_unitsRaw u8, in 0.1 ms units.
7max_finger_countRaw u8.
8originValues 1–4 map to Origin. Other values return Hidpp20Error::UnsupportedResponse.
9pen_supportNonzero is true.
10–11—OpenLogi ignores these bytes.
12raw_report_mapping_versionRaw u8.
13–14dpiu16, BE.
15—OpenLogi ignores this byte.

get_raw_report_state (fn 1)

BytesFieldNotes
0RawReportFlagsAll bits, including unknown bits, are retained.
1–15—OpenLogi ignores these bytes.

set_raw_report_state (fn 2)

ByteFieldNotes
0flagsExact RawReportFlags::bits() value.
1–2—OpenLogi writes 0x00.

OpenLogi accepts a successful transport reply and does not decode its payload.

DualXy event (fn 0)

The event payload is 16 bytes. coord14(high, low) is (high & 0x3f) << 8 | low.

BytesFieldNotes
0–1timestampu16, BE.
2 bits[7:6], 3touch1.contact_type, touch1.xType and 14-bit X coordinate.
4 bits[7:6], 5touch1.contact_status, touch1.yStatus and 14-bit Y coordinate.
6, 7touch1.z, touch1.areaRaw, flag-dependent bytes.
8 bits[7:4]touch1.finger_idFour-bit ID.
8 bit[2]buttonPhysical switch state.
8 bit[0]end_of_frameFrame completion state.
8 bits[3,1]—OpenLogi ignores these bits.
9 bits[7:6], 10touch2.contact_type, touch2.xType and 14-bit X coordinate.
11 bits[7:6], 12touch2.contact_status, touch2.yStatus and 14-bit Y coordinate.
13, 14touch2.z, touch2.areaRaw, flag-dependent bytes.
15 bits[7:4]touch2.finger_idFour-bit ID.
15 bits[3:0]finger_countFour-bit contact count.

How OpenLogi uses it

No device-layer or agent path uses TouchpadRawXyFeature in v0.8.15. The typed wrapper does not change report flags, read them back, or restore them for OpenLogi users.

Usage (Rust)

use hidpp::{
    device::Device,
    feature::{
        EmittingFeature,
        touchpad_raw_xy::{RawReportFlags, TouchpadRawXyFeature},
    },
};

// device: &mut Device, already created via Device::new(channel, index)
device.enumerate_features().await?;
if let Some(feature) = device.get_feature::<TouchpadRawXyFeature>() {
    println!("{:?}", feature.get_touchpad_info().await?);
    feature.set_raw_report_state(RawReportFlags::RAW).await?;

    let receiver = feature.listen();
    while let Ok(event) = receiver.recv().await {
        println!("{event:?}");
    }
}

On this page