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,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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user