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

Définition

La définition TypeScript telle qu'elle apparaît dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Entrées

Valeurs

Toutes les entrées de cette constante. Cliquez sur une valeur pour la copier dans le presse-papiers.

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.

Écosystème

Utilisé par

Composables et composants qui consomment cette constante.

Usage

Exemples

Extraits de code prêts à coller utilisant cette constante.

Normalising a key string with KEYBOARD_ALIASES

typescript