# Supported Actions for Button Remapping in OpenLogi: Complete List and Configuration Guide

> Discover over 30 supported button remapping actions in OpenLogi, from mouse clicks to custom workflows. Configure your device easily with our complete guide.

- Repository: [Xuan Zhang/OpenLogi](https://github.com/AprilNEA/OpenLogi)
- Tags: api-reference
- Published: 2026-09-09

---

**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`](https://github.com/AprilNEA/OpenLogi/blob/main/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`](https://github.com/AprilNEA/OpenLogi/blob/main/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 entirely
- `LeftClick`, `RightClick`, `MiddleClick` – Standard mouse buttons
- `MouseBack`, `MouseForward` – Browser-style navigation buttons

### Text Editing Actions

Productivity-focused editing shortcuts:

- `Copy`, `Paste`, `Cut` – Clipboard operations
- `Undo`, `Redo` – History navigation
- `SelectAll`, `Find`, `Save` – Document management

### Browser Navigation Actions

Web browser control without keyboard context switching:

- `BrowserBack`, `BrowserForward` – History navigation
- `NewTab`, `CloseTab`, `ReopenTab` – Tab management
- `NextTab`, `PrevTab` – Tab cycling
- `ReloadPage` – Refresh current page

### System and Desktop Management Actions

macOS-specific window and desktop controls:

- `MissionControl`, `AppExpose` – Overview modes
- `PreviousDesktop`, `NextDesktop`, `ShowDesktop` – Desktop navigation
- `LaunchpadShow`, `LockScreen` – System features
- `Screenshot`, `CaptureRegion` – Screen capture

### Media Control Actions

Audio and playback management:

- `PlayPause`, `NextTrack`, `PrevTrack` – Playback control
- `VolumeUp`, `VolumeDown`, `MuteVolume` – Audio levels

### Device Configuration Actions

Hardware-specific settings for supported Logitech devices:

- `CycleDpiPresets` – Rotates through DPI settings
- `SetDpiPreset(u8)` – Jumps to specific DPI index (0-255)
- `ToggleSmartShift` – Enables/disables SmartShift feature

### Scrolling Actions

Independent scroll wheel emulation:

- `ScrollUp`, `ScrollDown` – Vertical scrolling
- `HorizontalScrollLeft`, `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 held
- `OpenApplication(ApplicationTarget)` – Launches apps or URLs
- `TypeText(String)` – Types literal text strings
- `RunAppleScript(String)`, `RunShellCommand(String)` – Script execution
- `Workflow(Vec<WorkflowStep>)` – Multi-step sequences with delays and conditional logic
- `ShowActionsRing` – Displays the on-screen action selector
- `Sleep` – 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`](https://github.com/AprilNEA/OpenLogi/blob/main/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`](https://github.com/AprilNEA/OpenLogi/blob/main/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:

1. **Event Reception** – The daemon captures the raw button press from the Logitech device
2. **Profile Resolution** – The current active profile's `bindings` table is queried for the matching `ButtonId`
3. **Action Resolution** – The corresponding `Action` variant is retrieved from the binding configuration
4. **OS Injection** – The action forwards to `openlogi-inject` ([`crates/openlogi-inject/src/inject.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-inject/src/inject.rs)), which synthesizes the appropriate OS-level input events
5. **IPC Communication** – For UI feedback, actions traverse process boundaries via `openlogi-ipc` ([`crates/openlogi-ipc/src/ipc.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-ipc/src/ipc.rs)) using the same `Action` enum 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

```toml
[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:

```toml
[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:

```toml
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:

```rust
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 `Action` type at [`crates/openlogi-core/src/binding/action.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/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`, and `Workflow` accept additional configuration data through the `args` field
- Actions are **cross-process compatible**, using the `Action` enum as the wire format in `openlogi-ipc` for 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`](https://github.com/AprilNEA/OpenLogi/blob/main/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.