R
fn

runKeydown

Look up and run the command bound to a keydown event. Returns `true` when a command handled it (the caller should then `preventDefault`).

Signature

ts
export function runKeydown(
  event: KeyboardEvent,
  compiled: Map<string, Command>,
  state: EditorState,
  dispatch: Dispatch,
  view: CommandView,
): boolean{ ... }

Parameters

ParameterTypeDescription
eventKeyboardEvent
compiledMap<string, Command>
stateEditorState
dispatchDispatch
viewCommandView

Returns

boolean