Skip to content

Features Hotkeys

Tuck edited this page Jun 28, 2026 · 1 revision

Hotkeys

Register and unregister global keyboard shortcuts. When a registered hotkey is pressed, the daemon emits an event to all subscribed clients.

Actions

hotkeys.register

Register a global hotkey combination.

Parameter Type Description
hotkey_id string Unique identifier for this hotkey binding
keys string[] Key combination (e.g., ["Ctrl", "Shift", "A"])
deskbrid hotkeys.register '{"hotkey_id": "screenshot-tool", "keys": ["Ctrl", "Shift", "S"]}'
{
  "type": "hotkeys.register",
  "hotkey_id": "screenshot-tool",
  "keys": ["Ctrl", "Shift", "S"]
}

When the hotkey is pressed, subscribers receive:

{
  "type": "event",
  "event": "hotkey.pressed",
  "data": {
    "hotkey_id": "screenshot-tool",
    "keys": ["Ctrl", "Shift", "S"]
  }
}

hotkeys.unregister

Unregister a previously registered hotkey.

Parameter Type Description
hotkey_id string ID of the hotkey to unregister
deskbrid hotkeys.unregister '{"hotkey_id": "screenshot-tool"}'
{"type": "hotkeys.unregister", "hotkey_id": "screenshot-tool"}

Python Example

from deskbrid import Deskbrid
client = Deskbrid()

# Register a hotkey
client.hotkeys_register(
    hotkey_id="screenshot-tool",
    keys=["Ctrl", "Shift", "S"],
)

# Subscribe to hotkey events
client.connection_subscribe(events=["hotkey.*"])

# Later, unregister
client.hotkeys_unregister(hotkey_id="screenshot-tool")

Requirements

  • Global hotkeys require a Wayland session with Portal support, or X11 (XGrabKey)
  • Some desktop environments may restrict certain key combinations
  • Not all DEs support programmatic hotkey registration

Current Status

Stable — hotkey registration and unregistration supported.

Clone this wiki locally