Lib · lib · 3K
Keyboard target checks
isEditableTarget(target, { widgets }) and isInsideOrBehindModal(target) for page-wide shortcuts: skips fields, contenteditable, ARIA text boxes and (optionally) widgets that use arrow keys, and stays quiet while a modal layer is open. rememberOpener/returnToOpener put focus back where it was when a modal opened without a Trigger.
Install
pnpm dlx shadcn@latest add @s7ui/keyboard-utilsInfo
- Files:
- lib/keyboard.ts
- Uses:
- —
- Packages:
- —