Skip to main content

KeyboardShortcutMatch

interface
interface KeyboardShortcutMatch

Import

import { KeyboardShortcutMatch } from '@modular/sdk/editor';

Members3

key
string

The `KeyboardEvent.key` to match, case-insensitive (e.g. `'b'`, `'1'`, `'Enter'`, `'ArrowLeft'`)

modifiersoptional
KeyboardEventModifierMask

The expected state of the modifier keys. A modifier that is omitted or `false` must not be pressed, `true` must be pressed, and `'any'` is ignored. The default of `{}` matches only events with no modifiers.

unshiftedKeyoptional
string

The unshifted key to display to the user, only relevant when the shift modifier is true on non-Apple environments.