* 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[])
| 152 | * accepts both spellings, so the tap must too. |
| 153 | */ |
| 154 | function isBareEscape(parts: readonly string[]): boolean { |
| 155 | if (parts.length !== 1) return false |
| 156 | const lower = parts[0]!.toLowerCase() |
| 157 | return lower === 'escape' || lower === 'esc' |
| 158 | } |
| 159 | |
| 160 | /** |
| 161 | * Instant move, then 50ms — an input→HID→AppKit→NSEvent round-trip before the |