KEYBOARD_ALIASES
const
Interactivity
Centralised key-alias mapping used by the hotkey system to normalise user-friendly shorthand (esc, up, del, space…) to canonical KeyboardEvent.key values in lowercase.
TypeScript
Definition
The TypeScript definition as found in the origam source. Click the copy icon to copy the snippet.
Entries
Values
All entries in this constant. Click a value to copy it to clipboard.
- control: 'ctrl'
- Alias for the Ctrl modifier key.
- command: 'cmd'
- Alias for the Cmd (Meta) modifier key.
- option: 'alt'
- Alias for the Alt/Option modifier key.
- up: 'arrowup'
- Alias for ArrowUp.
- down: 'arrowdown'
- Alias for ArrowDown.
- left: 'arrowleft'
- Alias for ArrowLeft.
- right: 'arrowright'
- Alias for ArrowRight.
- esc: 'escape'
- Alias for Escape.
- spacebar: ' '
- Alias for the Space key (full name).
- space: ' '
- Alias for the Space key (short name).
- return: 'enter'
- Alias for Enter.
- del: 'delete'
- Alias for Delete.
- minus: '-'
- Alias for the minus/dash key.
- hyphen: '-'
- Alias for the hyphen key.
Ecosystem
Used by
Composables and components that consume this constant.
useHotkey
Usage
Examples
Ready-to-paste code snippets using this constant.
Normalising a key string with KEYBOARD_ALIASES