skhd.zig
679
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
Zig
语言
创建时间
最近更新
项目能做什么
macOS 轻量快捷键守护进程,移植自 asmvik 的 skhd
来源:AI 基于仓库事实生成
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# SKHD in Zig
Simple Hotkey Daemon for macOS, ported from [skhd](https://github.com/koekeishiya/skhd) to Zig.
This implementation is **fully compatible with the original skhd configuration format** - your existing `.skhdrc` files will work without modification. Additionally, it includes new features like process groups and command definitions (`.define`) for cleaner configs, key forwarding/remapping, and improved error reporting.
📋 [View Changelog](CHANGELOG.md)
## v0.2.0 — Hotkey sequences
Bind a run of chords to one action, fired only when the chords arrive in order within a time budget (default 300ms, set with `.sequence_timeout`):
```bash
# Two quick Cmd-Q presses to quit Chrome; a single press does nothing.
cmd - q, cmd - q [
"Google Chrome" | cmd - q
]
```
A shorter binding can also be the **prefix** of a longer sequence and fires when the sequence doesn't complete — like Vim's `timeoutlen`, but the wait only happens in apps where a longer match applies. That lets a global binding and an app's native shortcut share one chord:
```bash
lcmd - k : yabai -m window --focus north # focus north — everywhere, instantly
cmd - k, cmd - k [
"Google Chrome" | cmd - k # …but double-tap sends Chrome its own Cmd-K
]
```
Every action form works on a sequence (commands, forwarding, unbound/passthrough, mode activation, process lists). See [SYNTAX.md](SYNTAX.md#hotkey-sequences) for the grammar and the [v0.2.0 CHANGELOG entry](CHANGELOG.md#020---2026-07-20).
## v0.1.0 — QMK-style keyboard remapping
skhd.zig now ships a system-level **grabber daemon** that enables remapping the user-session event tap can't reach. New directives:
- **`.remap caps_lock [device <alias>] : escape`** — instant 1:1 swap, applied via `hidutil` (no daemon).
- **`.remap key [device <alias>] { tap: …, hold: …, … }`** — tap vs. hold on the same key (e.g. `caps_lock` tapped = escape, held = control). Routed through `skhd-grabber` (root LaunchDaemon) which seizes the keyboard at the IOKit/HID level via Karabiner DriverKit. Required for caps-lock-class rules and modifier-as-hold rules that `hidutil` silently drops.
- **Layer holds** — `hold` can target a skhd mode instead of a key, so holding the source key activates the layer for the duration of the hold (e.g. hold `space` to enter `fn_layer`, where `fn_layer < 1 | f1` rebinds the number row to F-keys).
- **`.device <alias> { vendor: 0x…, product: 0x… }`** — scope rules to a specific keyboard, so one config does the right thing on each machine.
**Install** via Homebrew, or download the `.app` bundle from GitHub releases:
```bash
brew install jackielii/tap/skhd-zig
skhd --install-service
```
Or, manual install:
```bash
gh release download v0.1.0 --repo jackielii/skhd.zig --pattern '*-arm64-macos.tar.gz'
tar -xzf skhd-arm64-macos.tar.gz -C /tmp
sudo mv /tmp/skhd.app /Applications/
/Applications/skhd.app/Contents/MacOS/skhd --install-service
```
`--install-service` registers the agent, auto-installs th
阅读完整原文
商业机会分析 AI 生成
macOS 极客键盘增强 GUI 商业版客户端
| 产品构想 | 基于 skhd.zig 作为高性能底层引擎,封装一个现代化 macOS 原生菜单栏/设置面板(Swift/SwiftUI),提供图形化按键重映射、Tap-Hold 设定与快捷键冲突检测。 |
| 核心功能 | 可视化的键位映射与图层配置界面、一键安装/管理 DriverKit 驱动和守护进程、快捷键序列录制与即时生效预览、针对主流 App(Raycast、Chrome 等)的预设模板库。 |
| 目标用户 | 渴望 QMK 逻辑与低延迟快捷键、但抗拒纯 CLI 和手动编辑 .skhdrc 的 Mac 效率办公用户。 |
| 难度/周期 | 中等 · 2-3 个月 · 成本:主要为 Apple Developer 账号费用及少量 UI 设计资产支出。 |
| 收费模式 | 买断制独立软件授权(如 $14.99-$29.99 单机或双机激活码),或入驻 Setapp。 |
| 竞争风险 | 开源底层本身可免费配置,GUI 外壳对纯纯硬核极客吸引力有限,需下沉至进阶办公人群。 |
| 依据 | 已验证事实 |
团队开发环境桌面工作流统一配置云服务
| 产品构想 | 面向工程团队或跨设备重度用户,提供 CLI/云端配置同步、按外设硬件自动下发规则及安全合规策略工具。 |
| 核心功能 | 外设配置云端备份与一键拉取、团队内部键位工作流分享库、CI/Dotfiles 一键集成安装脚本、不同硬件(Mac 键盘 vs 机械键盘)的规则自动匹配分发。 |
| 目标用户 | 拥有多台 Mac 的资深工程师、推行统一键位标准或无鼠标开发流的技术型初创团队。 |
| 难度/周期 | 低 · 1 个月 · 成本:轻量云端服务器与域名维护成本(每月 < $20)。 |
| 收费模式 | SaaS 订阅制(个人多设备免费/高级版 $2/月,团队席位制 $5/人/月)。 |
| 竞争风险 | 极客群体高度依赖 GitHub/Dotfiles 自行同步,对付费云服务抵触情绪高,推测付费意愿较低。 |
| 依据 | AI推测 |
专业效率工作流预设市场与付费插件系统
| 产品构想 | 依托 skhd.zig 的序列触发与 process groups 特性,打包深度集成 IDE、设计软件与窗口管理器的“全键盘操控包”。 |
| 核心功能 | 开箱即用的专业工作流预设(例如仿 Vim 全局导航、Figma/VSCode 深度单键层切换)、一键导入激活工具、版本更新推送与兼容性修复保障。 |
| 目标用户 | Vim/Emacs 深度用户、经常在多屏幕间切换的架构师、追求纯键盘操作的效率工具狂热者。 |
| 难度/周期 | 低 · 2-4 周 · 成本:几乎零成本,主要为内容制作与 Gumroad 等平台手续费。 |
| 收费模式 | 数字商品单次购买(Gumroad/个人站点),定价 $5 - $19 / 方案包。 |
| 竞争风险 | 开源配置文件的不可逆复制代码容易被免费二次传播,盗版防御成本高。 |
| 依据 | 尚需验证的假设 |
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| aimuzov/tree-sitter-skhdrc | 中文介绍暂未生成 Tree-sitter grammar for skhd.zig configuration files (skhdrc |
1 | JavaScript |
| sebb3/skhd-zig.nix | 中文介绍暂未生成 | 0 | Nix |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 ,最近推送 ,发布过 38 个 Release |
| 社区活跃 | Star 679 / Fork 0 / Issue 0(数据支持,可自行核实) |
| 许可证 | 未检测到(需人工确认) |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/jackielii/skhd.zig.git cd skhd.zig # 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。