Function: matchesShortcut()
ts
function matchesShortcut(
event,
shortcut,
apple?
): boolean;Whether a keyboard event matches a ProseMirror-style shortcut such as Mod-k.
Parameters
| Parameter | Type |
|---|---|
event | { altKey?: boolean; ctrlKey?: boolean; key?: string; metaKey?: boolean; shiftKey?: boolean; } |
event.altKey? | boolean |
event.ctrlKey? | boolean |
event.key? | string |
event.metaKey? | boolean |
event.shiftKey? | boolean |
shortcut | string |
apple? | boolean |
Returns
boolean