Skip to main content

Module binding

Module binding 

Source
Expand description

Logical mouse button identifiers and the action vocabulary each one can bind to. Lives in openlogi-core because the config schema serializes these directly — the GUI re-exports them.

When Action gains new variants, keep the existing variant names stable: the TOML config keys/values use the enum variant identifiers verbatim, so renames are migration events.

Structs§

KeyCombo
A modifier + virtual-key keystroke captured by the P1.3 recorder UI or hand-authored in config.toml.

Enums§

Action
What pressing a ButtonId should do.
ButtonId
One of the user-rebindable hotspots on a Logi mouse. The order matches the physical layout from front to side; ButtonId::ALL is consumed by the default-binding generator and the popover trigger list.
Category
Grouping for popover section headers.
GestureDirection
One of the five sub-bindings on the gesture button: hold + swipe up/down/ left/right or a plain click without movement. Logi ships these as independent assignments (SLOT_NAME_GESTURE_*_BUTTON in the device_gesture_buttons_image metadata block) — OpenLogi mirrors the same shape.

Functions§

classify_gesture
Classify an accumulated raw-XY swipe — the summed dx/dy the device reports while the gesture button is held — into one of the five GestureDirection slots.
default_binding
Sensible defaults for a fresh device so the panel isn’t empty on first run.
default_gesture_binding
Per-direction defaults for the gesture button. These are captured live over HID++ 0x1b04 (raw-XY diversion) and dispatched like any other binding; the defaults give the picker something sensible to show on first run.