/** * True when focus is in a field where global shortcuts should not fire. * * Mirrors the same skip logic baked into Radix `useShortcut` so global * hotkey handlers (export ⌘⌥E, rename F2, etc.) don't steal keystrokes * that the user clearly intends for the input. Covers native form * fields and any element marked `contenteditable="true"` (richtext * editors, comment composers). */ export function isEditableTarget(target: EventTarget | null): boolean { const el = target as HTMLElement | null if (!el) return false if ( el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement || el instanceof HTMLSelectElement ) return true return el.getAttribute?.("contenteditable") === "true" }