* Single-element key sequence matching "escape" or "esc" (case-insensitive). * Used to hole-punch the CGEventTap abort for model-synthesized Escape — enigo * accepts both spellings, so the tap must too.
(parts: readonly string[])
| 95 | * accepts both spellings, so the tap must too. |
| 96 | */ |
| 97 | function isBareEscape(parts: readonly string[]): boolean { |
| 98 | if (parts.length !== 1) return false |
| 99 | const lower = parts[0]!.toLowerCase() |
| 100 | return lower === 'escape' || lower === 'esc' |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Instant move, then 50ms — an input→HID→AppKit→NSEvent round-trip before the |