Supported Actions for Button Remapping in OpenLogi: Complete List and Configuration Guide
OpenLogi supports 30+ button remapping actions—including mouse clicks, media controls, system shortcuts, and custom workflows—defined in the Action enum located at crates/openlogi-core/src/binding/action.rs.
OpenLogi is an open-source driver and configuration tool for Logitech HID++ devices that enables deep customization of mouse and keyboard buttons. When configuring button remapping, users select from a strongly-typed Action enum that serializes directly into TOML configuration files, allowing precise control over hardware behavior without writing code.
The Action Enum: Core of Button Remapping
The definitive list of supported button remapping actions resides in the Action enum, starting at line 23 of crates/openlogi-core/src/binding/action.rs. This enum derives Serialize and Deserialize, enabling seamless integration between the user interface, configuration parser, and runtime injection system.
The variants are organized into functional categories:
Pointer and Click Actions
Basic mouse operations form the foundation of button remapping:
None– Disables the button entirelyLeftClick,RightClick,MiddleClick– Standard mouse buttonsMouseBack,MouseForward– Browser-style navigation buttons
Text Editing Actions
Productivity-focused editing shortcuts:
Copy,Paste,Cut– Clipboard operationsUndo,Redo– History navigationSelectAll,Find,Save– Document management
Browser Navigation Actions
Web browser control without keyboard context switching:
BrowserBack,BrowserForward– History navigationNewTab,CloseTab,ReopenTab– Tab managementNextTab,PrevTab– Tab cyclingReloadPage– Refresh current page
System and Desktop Management Actions
macOS-specific window and desktop controls:
MissionControl,AppExpose– Overview modesPreviousDesktop,NextDesktop,ShowDesktop– Desktop navigationLaunchpadShow,LockScreen– System featuresScreenshot,CaptureRegion– Screen capture
Media Control Actions
Audio and playback management:
PlayPause,NextTrack,PrevTrack– Playback controlVolumeUp,VolumeDown,MuteVolume– Audio levels
Device Configuration Actions
Hardware-specific settings for supported Logitech devices:
CycleDpiPresets– Rotates through DPI settingsSetDpiPreset(u8)– Jumps to specific DPI index (0-255)ToggleSmartShift– Enables/disables SmartShift feature
Scrolling Actions
Independent scroll wheel emulation:
ScrollUp,ScrollDown– Vertical scrollingHorizontalScrollLeft,HorizontalScrollRight– Horizontal scrolling
Advanced Custom Actions
Complex automation and scripting capabilities:
CustomShortcut(KeyCombo)– Arbitrary keyboard shortcuts (e.g.,Ctrl+Shift+T)HoldShortcut(KeyCombo)– Maintains key press while button is heldOpenApplication(ApplicationTarget)– Launches apps or URLsTypeText(String)– Types literal text stringsRunAppleScript(String),RunShellCommand(String)– Script executionWorkflow(Vec<WorkflowStep>)– Multi-step sequences with delays and conditional logicShowActionsRing– Displays the on-screen action selectorSleep– No-op delay
How Button Remapping Works in OpenLogi
The button remapping architecture follows a strict pipeline from hardware event to OS injection:
Button Identification and Binding
Physical buttons are identified by ButtonId (defined in crates/openlogi-core/src/binding/button.rs), which maps hardware HID++ identifiers to logical names like "Button5" or "ThumbWheelUp". The Binding struct (in crates/openlogi-core/src/binding/binding.rs) couples a ButtonId with an Action, creating the mapping stored in user profiles.
Runtime Dispatch Flow
When the agent receives a HID++ event:
- Event Reception – The daemon captures the raw button press from the Logitech device
- Profile Resolution – The current active profile's
bindingstable is queried for the matchingButtonId - Action Resolution – The corresponding
Actionvariant is retrieved from the binding configuration - OS Injection – The action forwards to
openlogi-inject(crates/openlogi-inject/src/inject.rs), which synthesizes the appropriate OS-level input events - IPC Communication – For UI feedback, actions traverse process boundaries via
openlogi-ipc(crates/openlogi-ipc/src/ipc.rs) using the sameActionenum as the wire format
Configuring Button Remapping in TOML Profiles
Users define button remapping in their TOML configuration files by referencing the exact Action variant names. The action field accepts the Rust enum variant directly, with optional args for parameterized variants.
Basic Button Mapping
[profile."Gaming Mouse"]
bindings = [
{ button = "Button5", action = "NextTrack" },
{ button = "ThumbWheelUp", action = "VolumeUp" },
{ button = "Button4", action = "BrowserBack" }
]
Custom Shortcuts with Arguments
Parameterized actions require the args field containing the variant's associated data:
[profile."Productivity"]
bindings = [
{
button = "Button6",
action = "CustomShortcut",
args = { key = "Ctrl+Shift+T" }
},
{
button = "Button7",
action = "SetDpiPreset",
args = 2
}
]
Complex Workflow Configuration
The Workflow action executes sequential steps, enabling sophisticated automation:
bindings = [
{
button = "Button8",
action = "Workflow",
args = [
{ type = "OpenApplication", target = "https://rust-lang.org" },
{ type = "Delay", millis = 2000 },
{ type = "RunShellCommand", command = "open https://github.com" },
{ type = "TypeText", text = "Search completed" }
]
}
]
Programmatic Usage in Rust
Developers integrating OpenLogi into Rust applications can construct bindings programmatically using the core crate:
use openlogi_core::binding::{Action, ButtonId, Binding};
// Create a simple media control binding
let volume_binding = Binding {
button: ButtonId::KeyVolumeUp,
action: Action::VolumeUp,
..Default::default()
};
// Create a custom shortcut binding
let custom_binding = Binding {
button: ButtonId::Button(6),
action: Action::CustomShortcut("Cmd+Option+Left".parse().unwrap()),
..Default::default()
};
The Action enum's strict typing ensures that only valid actions can be instantiated, preventing runtime errors in the configuration layer.
Summary
- OpenLogi defines 30+ button remapping actions across eight categories, from basic clicks to complex multi-step workflows
- All actions are enumerated in the
Actiontype atcrates/openlogi-core/src/binding/action.rs, deriving serialization traits for TOML configuration - The architecture separates button identification (
ButtonId), binding storage (Binding), and OS injection (openlogi-inject) into distinct layers - Parameterized actions like
CustomShortcut,SetDpiPreset, andWorkflowaccept additional configuration data through theargsfield - Actions are cross-process compatible, using the
Actionenum as the wire format inopenlogi-ipcfor communication between GUI, overlay, and agent processes
Frequently Asked Questions
What file defines the supported button remapping actions in OpenLogi?
The complete list of supported actions is defined in crates/openlogi-core/src/binding/action.rs, specifically in the Action enum starting at line 23. This file serves as the single source of truth for all possible button remapping operations, with each variant representing a specific OS-level action that can be synthesized when a button is pressed.
How do I configure a custom keyboard shortcut for button remapping?
Use the CustomShortcut action with a key argument specifying the key combination. In your TOML profile, set action = "CustomShortcut" and provide args = { key = "Ctrl+Shift+T" } (using standard key names separated by +). For holding modifiers while the button is pressed, use HoldShortcut instead, which maintains the keydown state until button release.
Can I create multi-step workflows with button remapping?
Yes, using the Workflow action, which accepts a vector of WorkflowStep objects. Each step can include delays (Delay), application launching (OpenApplication), command execution (RunShellCommand), or text input (TypeText). The openlogi-inject crate executes these steps sequentially, enabling complex automation chains from a single button press.
Does OpenLogi support DPI switching through button remapping?
Yes, OpenLogi provides three DPI-related actions: CycleDpiPresets rotates through configured DPI levels, SetDpiPreset(u8) jumps to a specific preset index (0-255), and ToggleSmartShift controls the SmartShift feature on supported devices. These actions interface directly with the Logitech HID++ protocol to modify hardware settings in real-time.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →