Overview
Klaus requires specific macOS permissions to enable global hotkeys (push-to-talk and mode toggle that work when Klaus is not focused). Without these permissions, Klaus still functions fully using in-app hotkeys when the window is focused.Accessibility Permission
Grant Accessibility Permission
On first launch, macOS prompts you to grant your terminal Accessibility (input monitoring) permission:- During first launch: Click “Open System Settings” when prompted
- Navigate to: System Settings > Privacy & Security > Accessibility
- Ensure your terminal app is checked:
- Terminal.app (if running from built-in Terminal)
- iTerm (if using iTerm2)
- VS Code (if running from integrated terminal)
- If not listed, click + and add your terminal app
- Restart Klaus
Permission Denied - What Still Works
If you deny Accessibility permission:- ✅ In-app hotkeys work when Klaus window is focused
- ✅ On-screen buttons for push-to-talk and mode toggle
- ✅ All other features (camera, STT, TTS, Claude API)
- ❌ Global hotkeys (F2, F3, §) won’t work when Klaus is in background
README.md:107, main.py:436-509
Global Hotkey Listener
How It Works
Klaus usespynput for global hotkeys. The listener:
- Runs in a daemon thread
- Starts gracefully (logs a warning on failure, doesn’t crash)
- Automatically disables on known crash combinations (macOS 26 + Python 3.14)
Listener Start Failure
If you see this warning:- No Accessibility permission - Grant as described above
- macOS 26 + Python 3.14 - Use Python 3.13 instead
- Terminal app not trusted - Add terminal to Accessibility list
main.py:11-43, main.py:493-509
F-Key System Actions Conflict
F3 triggers Mission Control instead of Klaus
F3 triggers Mission Control instead of Klaus
macOS binds F-keys to system functions by default:
- F3 = Mission Control
- F4 = Launchpad
- F5/F6 = Brightness
- F7-F9 = Media controls
- Press Fn+key (e.g., Fn+F3 for toggle)
- Enable standard function keys:
- System Settings > Keyboard
- Enable “Use F1, F2, etc. keys as standard function keys”
- Change Klaus hotkeys in
~/.klaus/config.toml:
main.py:511-517ISO Keyboard Shifted Keys
§ key not working on my keyboard
§ key not working on my keyboard
Klaus maps shifted-key variants for macOS ISO keyboards:
- Unshifted:
§(section sign) - Shifted:
±(plus-minus)
±), Klaus automatically resolves it to the base § key.For macOS with same PTT and toggle key:- Unshifted press: Push-to-talk
- Shifted press: Toggle mode
main.py:45-99, main.py:102-126Homebrew Permissions
Homebrew Klaus and terminal permissions
Homebrew Klaus and terminal permissions
When running Klaus via Homebrew (
brew install klaus), the permission prompt asks for your terminal app, not Klaus itself.This is because Homebrew installs a Python script wrapper. The terminal is the parent process executing Klaus.Which terminal to authorize:- If you run
klausfrom Terminal.app: Authorize Terminal - If you run from iTerm2: Authorize iTerm
- If you run from VS Code integrated terminal: Authorize Visual Studio Code
Verifying Permissions
How do I check if permissions are granted?
How do I check if permissions are granted?
- Open System Settings > Privacy & Security > Accessibility
- Look for your terminal app in the list
- Ensure the checkbox is enabled
- If you toggled it while Klaus was running, restart Klaus
Platform-Specific Behavior
macOS 26 + Python 3.14 Crash Path
Reference:main.py:11-33, main.py:444-460
Why Does Klaus Import pynput Conditionally?
On the crash-prone platform combination, Klaus uses a guard at import time:pynput library when it’s known to segfault, ensuring Klaus stays stable.
Reference: main.py:36-43
Troubleshooting Checklist
If global hotkeys aren’t working:- macOS Accessibility permission granted to terminal app
- Terminal app restarted after granting permission
- Klaus restarted after granting permission
- Not on macOS 26 + Python 3.14 (or
KLAUS_FORCE_GLOBAL_HOTKEYS=1set) - F-key not bound to system action (or using Fn+key)
- Hotkey configured correctly in
~/.klaus/config.toml - Check logs for “Global hotkey listener started” message