obs-hotkey-1.0.31 is not a library.
obs-hotkey
A lightweight Rust daemon for controlling OBS Studio with global hotkeys on Wayland and X11.
Works on Wayland! Uses evdev for direct keyboard input capture, bypassing Wayland's security restrictions.
Features
- Wayland & X11 Support — works on both display servers
- Single Static Binary — no runtime dependencies
- Global Hotkeys — works even when OBS is not focused
- Auto-start on Login — systemd user service integration
- Auto-reconnect — automatically reconnects if OBS restarts
- Multi-keyboard — monitors all connected keyboards
- F13-F24 Support — use extra keys as stream deck buttons
Quick Start
# 1. Install
# 2. Run once — shows the setup guide
# 3. Follow the on-screen steps:
# - Enable OBS WebSocket Server
# - Add yourself to the input group
# - Run: obs-hotkey setup
Installation
From crates.io
From GitHub Releases
# amd64
# ARM64
From source
Setup
1. Enable OBS WebSocket Server
- Open OBS Studio
- Go to Tools → WebSocket Server Settings
- Check Enable WebSocket server
- Port: 4455 (default)
- Authentication: disabled
2. Add yourself to the input group
# Log out and back in for changes to take effect
3. Run setup
This writes the systemd user service and enables it to start on login.
Usage
obs-hotkey # Show quickstart guide (interactive setup help)
obs-hotkey daemon # Run the hotkey daemon
obs-hotkey setup # Install systemd user service
obs-hotkey teardown # Remove service and binaries
obs-hotkey status # Check service, config, and OBS connectivity
Global flags
| Flag | Description |
|---|---|
--config <path> |
Use a custom config file |
--version |
Show version |
--help |
Show full help |
Teardown options
| Command | Description |
|---|---|
obs-hotkey teardown |
Stop service, remove service files and binaries |
obs-hotkey teardown --purge |
Above + remove config directory |
Default Hotkeys
| Key | Action |
|---|---|
| Scroll Lock | Toggle recording start/stop |
| Pause | Toggle recording pause/resume |
Customizing Hotkeys
Edit ~/.config/obs-hotkey/hotkeys.json:
Supported Keys
- Function keys:
f1–f24 - Special keys:
scroll lock,pause,home,end,page up,page down,insert,delete
Available Actions
| Action | OBS Request | Notes |
|---|---|---|
toggle_recording |
ToggleRecord |
Start/stop recording |
toggle_pause |
ToggleRecordPause |
Pause/resume recording |
toggle_streaming |
ToggleStream |
Start/stop streaming |
screenshot |
SaveSourceScreenshot |
Saves PNG to screenshot_dir |
toggle_mute_mic |
ToggleInputMute |
Requires mic_name in config |
toggle_studio_mode |
SetStudioModeEnabled |
Toggles studio mode |
toggle_replay_buffer |
ToggleReplayBuffer |
Requires replay buffer enabled |
save_replay |
SaveReplayBuffer |
Saves current replay buffer |
Managing the Service
# Check status
# View live logs
# Restart (after config changes)
# Stop
Building
# Build release binary
# Cross-compile for ARM64
Requirements
- Linux (Wayland or X11)
- OBS Studio 28+ with WebSocket enabled
- Membership in the
inputgroup
Uninstall
# Stop service and remove everything
License
MIT