Skip to content

artboard-deluxe / keyboard

keyboard()

const keyboard: (options?) => ArtboardPluginDefinition<{ keymap?: Keymap; modifier?: KeyboardModifier; }, object>

Defined in: plugins/keyboard/index.ts:29

Parameters

options?

keymap?

Keymap

Override the default keymap.

Should be an object whose properties are the keyboard code (according to KeyboardEvent['code']) and the values is an array where the first item is the name of the Artboard method to call and the second (optional value) is whether a modifier key is required.

modifier?

KeyboardModifier

The modifier key to check.

Defaults to 'ctrl'.

Returns

ArtboardPluginDefinition<{ keymap?: Keymap; modifier?: KeyboardModifier; }, object>