OpenLogi

0x6110 · touchMouseRawTouchPoints

Access raw touch-point data from a touch mouse — query pad geometry, select a raw reporting mode, and receive up to four simultaneous finger contacts per event.

Exposes the raw touch-point data produced by a touch mouse's pad surface. get_touchpad_info returns the pad characteristics: X/Y extent in dots, sensor resolution in DPI, coordinate Origin, maximum finger count, and the width/height data range. get_raw_mode / set_raw_mode control whether the firmware delivers native gestures, filtered raw data, or one of three unfiltered modes (including a Z-axis variant).

Once a raw mode is active, the feature emits up to four simultaneous touch points per RawData event, each carrying 12-bit X/Y coordinates and 4-bit contact-width fields; a lifted finger is None. StatusChanged reports MOUSE_LIFTED and BUTTON_DOWN flag transitions independently of raw-data reporting.

  • RawModeNativeGestures · RawFiltered · RawUnfilteredAndGestures · RawUnfilteredAlways · RawUnfilteredWithZ.
  • TouchMousePoint — 12-bit x / y, 4-bit width_x / width_y (replaced by Z in RawUnfilteredWithZ mode).
  • TouchMouseStatus — bitflags: MOUSE_LIFTED, BUTTON_DOWN.
  • Origin — corner of the pad that holds the coordinate origin.

Spec: Logitech HID++ 2.0 — touchMouseRawTouchPoints. Used by: Typed wrapper in openlogi-hidpp.

Function reference

The TouchMouseRawFeature wrapper (0x6110) exposes:

Methods

FunctionHID++ fnSignatureReturns
get_touchpad_info0()TouchMouseInfo
get_raw_mode1()RawMode
set_raw_mode2(mode: RawMode)()
listenevent()async_channel::Receiver<TouchMouseRawEvent>

All async methods return Result<…, Hidpp20Error>. listen is synchronous and returns a channel receiver.

Types

TouchMouseInfo

Touch-mouse characteristics returned by get_touchpad_info.

FieldTypeDescription
x_max_countu16Maximum X count in dots.
y_max_countu16Maximum Y count in dots.
resolution_dpiu16Sensor resolution in DPI (assumed equal for X and Y).
originOriginPosition of the coordinate origin.
max_finger_countu8Maximum number of reported fingers.
width_height_data_rangeu8Maximum value of the touch-point width/height data.

RawMode

The raw-reporting mode of a touch mouse.

VariantValueDescription
NativeGestures0Native gestures only (out of the box).
RawFiltered1Filtered raw data.
RawUnfilteredAndGestures2Unfiltered raw data plus native gestures.
RawUnfilteredAlways3Unfiltered raw data, sent even while lifted or with a button active.
RawUnfilteredWithZ4Like RawUnfilteredAndGestures but with Z information in place of width.

Origin

The position of the touch surface's coordinate origin, viewed from above.

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

Events

TouchMouseRawFeature implements EmittingFeature<TouchMouseRawEvent>. Call listen() to receive a channel of TouchMouseRawEvent values.

TouchMouseRawEvent

VariantDescription
RawData { touches }Raw touch-point data for up to four simultaneous fingers; a lifted finger is None. Only emitted when a raw mode is active.
StatusChanged(TouchMouseStatus)A mouse status flag changed.

TouchMousePoint

A single touch point in a RawData event. The finger ID is the point's index (0..4) in the touches array.

FieldTypeDescription
xu1612-bit X coordinate.
yu1612-bit Y coordinate.
width_xu8Contact width along X (4-bit), or Z in RawUnfilteredWithZ mode.
width_yu8Contact width along Y (4-bit).

TouchMouseStatus

Mouse status flags carried by StatusChanged.

FlagBit/ValueDescription
MOUSE_LIFTED1 << 0The mouse is lifted off the surface.
BUTTON_DOWN1 << 1A mouse button is pressed.

Wire format

Getter requests carry a 3-byte zero payload; set_raw_mode encodes the mode in the first byte. All responses use the 16-byte long payload. Events are pushed by the device unsolicited; no request is sent.

get_touchpad_info (fn 0)

Request: [0x00, 0x00, 0x00]

Response (byte → field):

Byte(s)FieldNotes
0–1x_max_countBig-endian u16
2–3y_max_countBig-endian u16
4–5resolution_dpiBig-endian u16, DPI
6originOrigin enum (14)
7max_finger_countRaw u8
8width_height_data_rangeRaw u8; bytes 9–15 unused

get_raw_mode (fn 1)

Request: [0x00, 0x00, 0x00]

Response (byte → field):

ByteFieldNotes
0RawMode0=NativeGestures … 4=RawUnfilteredWithZ; bytes 1–15 unused

set_raw_mode (fn 2)

Request: [mode, 0x00, 0x00]mode is the u8 representation of RawMode.

Response: acknowledged (no payload fields used).

Event — RawData (event fn 0)

The 16-byte payload carries four touch points packed consecutively (4 bytes each, indices 0..3).

Per touch point (bytes i*4i*4+3):

OffsetByteFieldEncoding
0x_highX coordinate, bits 11–40xff = finger lifted (None)
1y_highY coordinate, bits 11–4
2low_nibblesX bits 3–0 in low_nibbles & 0x0f; Y bits 3–0 in low_nibbles >> 4
3widthswidth_x = widths & 0x0f; width_y = widths >> 44-bit each

Assembled: x = (x_high << 4) \| (low_nibbles & 0x0f) (12-bit); y = (y_high << 4) \| (low_nibbles >> 4) (12-bit).

Event — StatusChanged (event fn 1)

ByteBitFlag
00 (1 << 0)MOUSE_LIFTED
01 (1 << 1)BUTTON_DOWN

Bytes 1–15 are unused.

Usage (Rust)

use hidpp::{
    device::Device,
    feature::{
        EmittingFeature,
        touch_mouse_raw::{RawMode, TouchMouseRawEvent, TouchMouseRawFeature},
    },
};

// device: &mut Device, already created via Device::new(channel, index)
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<TouchMouseRawFeature>() {
    // Read pad geometry and capabilities.
    let info = feat.get_touchpad_info().await?;
    println!("pad {}x{} dots @ {} DPI", info.x_max_count, info.y_max_count, info.resolution_dpi);

    // Enable filtered raw-data reporting.
    feat.set_raw_mode(RawMode::RawFiltered).await?;

    // Receive raw touch events.
    let rx = feat.listen();
    while let Ok(event) = rx.recv().await {
        match event {
            TouchMouseRawEvent::RawData { touches } => {
                for (id, point) in touches.iter().enumerate() {
                    if let Some(p) = point {
                        println!("finger {} at ({}, {})", id, p.x, p.y);
                    }
                }
            }
            TouchMouseRawEvent::StatusChanged(status) => {
                println!("status: {:?}", status);
            }
        }
    }
}

On this page