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: WritekitState,
  dispatch: Dispatch,
  view: CommandView,
): boolean{ ... }

Parameters

ParameterTypeDescription
eventKeyboardEvent—
compiledMap<string, Command>—
stateWritekitState—
dispatchDispatch—
viewCommandView—

Returns

boolean