@mocanvas/mocanvas · interface

TLKeyboardShortcut

interface TLKeyboardShortcut

One binding this hook installs.


Methods · 1

run(editor: Editor, event: KeyboardEvent): void | false

Do the thing. Returning false means "not handled after all" — the event keeps its default, which is what lets ⌘C fall through to the browser's own copy when there is no selection to take.


Properties · 5

also?: readonly string[]

Further bindings that do the same thing; not shown.

group: TLKeyboardShortcutGroup
id: string

Stable id; also what the dialog keys its rows on.

kbd: string

The binding, in the "mod+shift+z" notation TldrawUiKbd renders.

label: string

Display text for the dialog.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.