feat: add Fn hotkey monitor and probe CLI
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import Foundation
|
||||
import CoreGraphics
|
||||
import SstCore
|
||||
|
||||
func runHotkeyProbe() -> Never {
|
||||
if !CGPreflightListenEventAccess() { _ = CGRequestListenEventAccess() }
|
||||
let monitor = HotkeyMonitor()
|
||||
monitor.onEvent = { print("hotkey:", $0) }
|
||||
do { try monitor.start() } catch {
|
||||
print("failed:", error.localizedDescription)
|
||||
exit(1)
|
||||
}
|
||||
print("Houd Fn ingedrukt en laat los. Ctrl-C om te stoppen.")
|
||||
RunLoop.main.run()
|
||||
exit(0)
|
||||
}
|
||||
Reference in New Issue
Block a user