Core Functionality of skhd.zig
mainskhd.zig is a macOS keyboard remapping and hotkey utility written in Zig. Its core capabilities include:
- Event capturing: Uses macOS Core Graphics Event Tap for system-wide interception.
- Hotkey mapping: Maps key combinations (with full modifier support) to shell commands.
- Process-specific bindings: Execute different commands depending on the active application.
- Key forwarding/remapping: Remap keys to other key combinations.
- Modal system: A multi-level modal hotkey system with capture modes.
- Configuration: Compatible with the original
skhdformat and supports automatic hot reloading. - Device-aware HID remapping: Per-keyboard 1:1 remaps via
hidutiland tap-vs-hold rules via the optionalskhd-grabberdaemon.