Expand description
HID++ writes back to the device — DPI, SmartShift, lighting, and diagnostics.
Each entry point takes a DeviceRoute and resolves it to an open channel
through open_route_channel, so the same call works whether the device is
behind a Bolt receiver or attached directly (USB cable / Bluetooth). Each
call re-enumerates and re-opens — fine at the frequency this is invoked
(once per slider release) — unless a SharedChannel from the capture
session is reused.
Structs§
- DpiCapabilities
- Supported DPI values reported by a device’s HID++ AdjustableDpi feature.
- DpiInfo
- Current DPI plus the supported values reported by the device.
- Feature
Entry - Snapshot of one HID++ feature exposed by a device: protocol ID +
version. Returned by
dump_featuresfor diagnostics. - Reprog
Control Entry - Snapshot of one HID++
0x1b04reprogrammable control. Returned bydump_reprog_controlsfor diagnostics so new device controls can be identified before OpenLogi maps them to a first-class button. - Shared
Channel - An open HID++ channel to a device, shared so DPI / SmartShift writes can reuse the capture session’s connection instead of re-enumerating and opening a fresh channel each time (which costs ~100ms+).
Enums§
- Hidpp
Feature Error Kind - HID++ feature error kind in a serializable wire-safe form.
- Hidpp
Operation - HID++ operation being performed when a device write/read failed.
- Lighting
Method - Which HID++ lighting path drives a solid keyboard colour.
Autois what the GUI/agent use; the explicit variants exist for thediagA/B test. - Write
Error - Error returned by HID++ read/write operations.
Functions§
- dump_
features - Enumerate every HID++ feature the device on
routereports — used byopenlogi diag featuresto confirm which DPI / SmartShift / etc. feature IDs a given peripheral actually exposes (e.g. some mice use0x2202 ExtendedAdjustableDpiinstead of0x2201 AdjustableDpi). - dump_
reprog_ controls - Enumerate the device’s HID++
0x1b04reprogrammable controls. This is a diagnostics-only probe used to discover controls for newly released devices. For example, MX Master 4 has both a Gesture Button and a separate Haptic Sense Panel in the thumb area; this probe lets us identify the panel’s CID and capabilities before wiring it into the capture/remapping model. - get_dpi
- Read the device’s current DPI on sensor 0 — companion to
set_dpi. Used byopenlogi diag dpiand any future Settings → Diagnostics surface that wants to display the current value without writing. - get_
dpi_ info - Read the current DPI and the supported DPI values for sensor 0 in one route/channel session.
- get_
smartshift_ status - Read the device’s current SmartShift mode + sensitivity — companion to
toggle_smartshift. - set_dpi
- Set sensor 0’s DPI for the device addressed by
route. - set_
dpi_ on - Write DPI on an already-open
SharedChannel— the fast path that skips enumeration and channel setup. - set_
keyboard_ color - Set a keyboard to a solid
(r, g, b)colour, choosing the HID++ path automatically: the0x8070effect engine (which overrides the onboard profile) when present, else the0x8080per-key stream.FeatureUnsupportedwhen the device exposes neither. - set_
keyboard_ color_ with set_keyboard_colorwith an explicitLightingMethod.Autotries0x8070first and falls back to0x8080only when the effect engine is absent (a missing-0x8070FeatureUnsupported); any other error propagates.- set_
smartshift - Write a full SmartShift configuration — wheel mode, auto-disengage
threshold, and tunable torque — to
route. These values are volatile device state and should be re-applied after reconnect. Callers that mean to change only one field should read the rest viaget_smartshift_statusfirst and pass them back unchanged. A0auto-disengage threshold or tunable torque is the firmware’s “do not change” sentinel, not a real value to apply. On a Legacy (0x2110) device thetunable_torquefield is ignored. - set_
smartshift_ on - Write a full SmartShift configuration on an already-open
SharedChannel— the fast path that skips enumeration and channel setup. - set_
smartshift_ sensitivity - Set the SmartShift auto-disengage sensitivity on
route, preserving the current mode. Returns the read-back status after the write so the caller can display and verify it. - toggle_
smartshift - Toggle SmartShift mode (free ↔ ratchet) on
route. Reads the current mode first, then writes the opposite — keeps current sensitivity. Returns the new mode written. - toggle_
smartshift_ on - Toggle SmartShift on an already-open
SharedChannel.