Shortcut
Keyboard shortcuts for a whole application from one element: each binding fires an action event, runs a handler or activates a target.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
bindings | ShortcutBinding[] | [] | The shortcuts: { keys, action?, for?, handler?, scope?, description?, allowInInputs?, allowDefault?, repeat?, disabled? }
objects. As an attribute, a JSON array. Assigning a new array replaces every binding. |
disabled | boolean | false | Pause every binding of this element. |
Events
| Name | Type | Description |
|---|---|---|
shortcut | CustomEvent<ShortcutEventDetail> | Fired when a binding's keys are pressed. detail.action is the binding's action, detail.keys the alternative that matched, detail.binding the binding and detail.originalEvent the keydown. Cancelable: preventDefault() skips the binding's handler and for target. Does not bubble. |