pub fn dispatch(
key: KeyEvent,
state: &AppState,
ctx: &mut InputCtx,
) -> Option<Action>Expand description
Dispatches key to the appropriate mode handler.
Returns Some(Action) when the key maps to an action, None otherwise.
The caller is responsible for calling actions::apply with the returned
action and handling any resulting error.
Only KeyEventKind::Press events produce actions; Release and Repeat
are ignored so crossterm’s Windows double-fire doesn’t double-process.