Skip to content

lightgun-poc / lib/hotkey / createDarwinProbe

Function: createDarwinProbe() ​

createDarwinProbe(ffi, keys): ProbeResult

Defined in: lib/hotkey.ts:278

macOS probe: CGEventSourceKeyState per key against the combined session state (stateID 0) — a passive read, not an event tap, so no Accessibility grant is needed to poll. Recent macOS may still require Input Monitoring for non-modifier keys (unverified without hardware — see CLAUDE.md); the failure mode is benign: the probe reads false and the hotkey stays inert, which check hints about.

Parameters ​

ffi ​

Ffi

keys ​

string[]

Returns ​

ProbeResult

Released under the MIT License.