[错误] macOS: 睡眠/唤醒后键绑定永久停止工作 — kCGEventTapDisabledByTimeout 后事件点击永远无法重新启用
作者: shyam-king创建于 2026年8月12日更新于 2026年8月12日
packages/wm-platform/src/platform_impl/macos/keyboard_hook.rs (same on main and v3.10.1):
When macOS disables a tap, it delivers one final event of type kCGEventTapDisabledByTimeout (0xFFFFFFFE) or kCGEventTapDisabledByUserInput (0xFFFFFFFF) to the callback — bypassing the event mask — and expects the app to call CGEventTapEnable(tap, true) to resume:
https://developer.apple.com/documentation/coregraphics/cgeventtapcallback
内容来源: glzr-io/glazewm