01
Overview
An accessible read-only keyboard shortcut recorder. Focus the field, press a combination, or press Escape to cancel capture.
MetaK
02
When to use
Use when
- Letting a user assign or replace an application keyboard shortcut.
Avoid when
- Displaying a shortcut without editing it—use kbd or shortcut-hint.
03
Examples
Shortcut field
Capture a keyboard shortcut in an accessible field.
04
Props
| Name | Type | Default | Description |
|---|---|---|---|
value bindable | string[] | [] | |
onValueChange | (value: string[]) => void | ||
validate | (value: string[]) => stringundefined | ||
label | text | 'Keyboard shortcut' | |
disabled | boolean | false |