Files
sst/Sources/SstProbe/HotkeyProbe.swift
T
2026-10-01 09:44:23 +02:00

17 lines
461 B
Swift

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)
}