Puck is a lightweight daemon for macOS designed to provide fast and configurable switching between input methods using keyboard shortcuts. Inspired by the simplicity and efficiency of skhd, Puck uses a similar configuration syntax for defining your keybindings.
- Background Operation: Runs silently as a launchd service.
- Configurable Hotkeys: Define custom keyboard shortcuts for specific input methods or groups.
- Input Method Cycling: Assign the same shortcut to multiple input methods to cycle through them.
- Simple Configuration: Uses an
skhd
-inspired text file for easy setup. - Discoverability: List available input methods and observe key presses directly from the CLI.
- Autostart: Automatically configures itself to launch on login.
- Modern macOS: Built with Swift for optimal performance and integration.
puck
: Installs and starts the service if not already running.puck -l
orpuck --list
: Lists all available input source IDs configured on the system.puck -o
orpuck --observe
: Enters a mode to observe and print key presses (names and modifiers) to help with configuration.puck -f
orpuck --foreground
: Run in foreground mode without installing as a service.puck -s
orpuck --status
: Show service status (installed and running state).puck -u
orpuck --uninstall
: Uninstall the service.puck -c <path>
orpuck --config <path>
: Use a specific configuration file path.puck -v
orpuck --version
: Show version information.
The default configuration file location is ~/.config/puck/puckrc
. You need to create this file before running the service.
Note: The application requires accessibility permissions to function. You will be prompted to grant these permissions in System Settings -> Privacy & Security -> Accessibility when installing the service.
Puck looks for its configuration file at ~/.config/puck/puckrc
by default. The syntax is straightforward:
cmd + shift - space : com.apple.keylayout.US
ctrl + alt - p : com.apple.keylayout.Russian ctrl + alt - p : com.apple.keylayout.US
brew tap hmepas/puck
brew install puck
- macOS
- Xcode 14.0 or later (will be installed automatically via Homebrew if not present)
- Accessibility permissions (required for input source switching)
- Swift Package Manager
- Xcode Command Line Tools
Contributions are welcome! Please open an issue or submit a pull request.
MIT License