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.
Modules are split by domain so concurrent feature work (new buttons, new actions, defaults, gesture maps) rarely edits the same file.
Structs§
- Action
Ring Config - Per-device Actions Ring settings and application-specific layouts.
- Action
Ring Entry - One populated Actions Ring slot.
- Action
Ring Layout - The actions displayed at the eight fixed ring positions.
- Application
Target - Validated application, folder, filesystem, or URL target.
- KeyCombo
- A platform-neutral keyboard chord.
- Keyboard
Usage - USB HID keyboard usage supported by custom shortcuts.
- Keyboard
Usage Error - Unsupported USB HID usage found in a shortcut payload.
- Ring
Action - An action that is valid inside an Actions Ring.
- Swipe
Accumulator - The mid-swipe state machine shared by both gesture-capture paths: the HID++
dedicated gesture button (
openlogi-hid’s0x1b04raw-XY divert) and the OS-hook Middle/Back/Forward buttons (openlogi-agent-core’s CGEventTap). A gesture button’s hold accumulates travel; the instant the dominant axis commits a direction — after the button has been heldGESTURE_HOLD_FOR_SWIPE, so a quick click whose cursor drifted doesn’t count —Self::accumulatereturns that direction exactly once, like Logitech Options+. A hold that never commits is a plain click, reported bySelf::end.
Enums§
- Action
- What pressing a [
ButtonId] should do. - Action
Ring Icon - Presentation icon for an Actions Ring slot.
- Action
Ring Slot - One of the eight fixed positions in an Actions Ring, clockwise from the top.
- Application
Target Error - Why an application launch target could not be constructed.
- Binding
- What a single rebindable [
ButtonId] does: either oneAction, or — for a raw-XY-capable button placed in gesture mode — a per-GestureDirectionmap (hold + swipe up/down/left/right, or a plain click). - Button
Id - One of the user-rebindable hotspots on a Logi mouse. The order matches the
physical layout from front to side;
ButtonId::ALLis consumed by the default-binding generator and the popover trigger list. - Category
- Grouping for popover section headers.
- Gesture
Direction - 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_*_BUTTONin thedevice_gesture_buttons_imagemetadata block) — OpenLogi mirrors the same shape. - KeyCombo
Parse Error - Why a user-entered keyboard shortcut could not be parsed.
- Ring
Action Error - Why an
Actioncannot be placed in an Actions Ring slot. - Workflow
Step - One step in a
Action::Workflow. A workflow is aVec<WorkflowStep>executed in order by the inject layer;Delayintroduces a pause between the surrounding steps.
Constants§
- GESTURE_
HOLD_ FOR_ SWIPE - Minimum time a gesture button must be held before its travel can commit to a swipe. Distinguishes a deliberate hold-and-swipe from a quick click whose cursor happened to be moving. Shared by both gesture paths (the HID++ thumb pad and the OS-hook Middle/Back/Forward).
- GESTURE_
SWIPE_ DEADZONE - Maximum cross-axis travel allowed at the threshold, so only a reasonably
straight swipe commits. Grows with the dominant axis (
max(deadzone, 35%)). - GESTURE_
SWIPE_ THRESHOLD - Minimum dominant-axis travel (raw-XY units) before a held gesture commits to a direction. Tuned to match Logitech Options+’s responsiveness.
Functions§
- default_
binding - Sensible defaults for a fresh device so the panel isn’t empty on first run.
- default_
binding_ for - The canonical default
Bindingfor a fresh button in the merged model. - 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. - detect_
swipe - Classify the running raw-XY travel of a held gesture button into a
directional swipe, the instant it commits — or
Nonewhile it’s still too short or too diagonal.