feat: add Fn hotkey monitor and probe CLI

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 09:44:23 +02:00
co-authored by Claude Sonnet 5.5
parent 7d24f3e874
commit 1c581e8eae
6 changed files with 118 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
public struct FnKeyTracker {
private var isDown = false
public init() {}
/// Feed the current Fn flag state; returns an event only on a transition.
public mutating func process(fnDown: Bool) -> HotkeyEvent? {
guard fnDown != isDown else { return nil }
isDown = fnDown
return fnDown ? .pressed : .released
}
}