| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Termtab.UI.Keybindings
Description
Vim-inspired modal input handling: translates key events into calls against the pure navigation functions in Termtab.UI.Types and the document edits in Termtab.UI.Editing, plus the stateful bits neither of those modules owns — playback transport, file save, and note preview.
Dispatch is keyed on asInputMode (NormalMode, GoToMode,
VisualMode, a nested MenuMode, or CommandMode); each mode has its
own handle* function below that only recognizes the keys valid in that
mode, falling through to a "you're on your own" case in NormalMode
or an explicit "unknown" status message in the others.
Synopsis
Documentation
handleEvent :: BrickEvent ResourceName AppEvent -> EventM ResourceName AppState () Source #
Top-level Brick event handler: routes a key event to the handle*
function for the current asInputMode, or updates playhead state on a
PlaybackTick. Anything else (mouse events, unrecognized AppEvents)
is ignored.