OpenLogi
功能(Features)

0x2200 · mousePointer

读取光学传感器分辨率与指针调校提示——包括加速曲线建议、系统弹道偏好及垂直方向微调标志。

报告设备的基本光学传感器属性与指针调校提示。getMousePointerInfo(function 0)是唯一的调用:返回传感器的典型分辨率(以 DPI 为单位)以及一组建议标志,供主机用来选择合理的默认值。

  • sensorResolution —— 在标准表面上的典型分辨率,以 1-DPI 为步进;受表面影响,实际值可能偏差 ±20%。
  • pointerAcceleration —— 设备建议的弹道加速曲线:NoneLowMediumHigh;内置多条曲线的主机可将此值作为默认选择依据。
  • suggestOsBallistics —— 为 true 时,设备建议保留操作系统原生弹道,而非由主机替换。
  • suggestVerticalTuning —— 为 true 时(轨迹球常见),主机可向用户提供 X/Y 方向与光标方向的微调功能。

规格: Logitech HID++ 2.0 —— mousePointer用于: openlogi-hidpp 中的类型化封装。

Function reference

The MousePointerFeature wrapper (0x2200) exposes:

Methods

FunctionHID++ fnSignatureReturns
get_mouse_pointer_info0()MousePointerInfo

All methods are async and return Result<…, Hidpp20Error>.

Types

MousePointerInfo

Sensor resolution and pointer-tuning hints returned by get_mouse_pointer_info.

FieldTypeDescription
sensor_resolutionu16Typical sensor resolution on a standard surface, in 1-DPI steps. Real-world values may vary by up to ±20% depending on the surface.
pointer_accelerationPointerAccelerationThe acceleration curve the device suggests.
suggest_os_ballisticsboolWhen false, the host may override OS ballistics; when true, the device suggests keeping the OS-native ballistics.
suggest_vertical_tuningboolWhen true (e.g. trackballs), the host can offer the user X/Y-to-cursor orientation tuning.

PointerAcceleration

The pointer-acceleration ("ballistics") curve a device suggests, based on its physical characteristics.

VariantValueDescription
None0No acceleration suggested.
Low1A low acceleration curve.
Medium2A medium acceleration curve.
High3A high acceleration curve.

Wire format

getMousePointerInfo carries a 3-byte zero request payload and returns a 16-byte long response payload (obtained via extend_payload()).

get_mouse_pointer_info (fn 0)

Request: [0x00, 0x00, 0x00] — three padding bytes; no parameters.

Response (byte → field):

ByteFieldNotes
0sensor_resolution high byteCombined with byte 1 as big-endian u16.
1sensor_resolution low byteu16::from_be_bytes([payload[0], payload[1]])
2 bits [1:0]pointer_accelerationLow 2 bits: 0=None, 1=Low, 2=Medium, 3=High.
2 bit 2suggest_os_ballistics(flags & (1 << 2)) != 0
2 bit 3suggest_vertical_tuning(flags & (1 << 3)) != 0
3–15(reserved)Ignored.

Usage (Rust)

use hidpp::{device::Device, feature::mouse_pointer::MousePointerFeature};

// device: &mut Device, already created via Device::new(channel, index).await?
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<MousePointerFeature>() {
    let info = feat.get_mouse_pointer_info().await?;
    println!("Sensor resolution: {} DPI", info.sensor_resolution);
    println!("Acceleration hint: {:?}", info.pointer_acceleration);
    println!("Suggest OS ballistics: {}", info.suggest_os_ballistics);
    println!("Suggest vertical tuning: {}", info.suggest_vertical_tuning);
}

本页目录