Skip to main content

Module event

Module event 

Source
Expand description

Key-event routing.

Rather than drive crossterm KeyEvent types through unit tests (which would pull the terminal into test scope) we translate key events into a small internal vocabulary and dispatch that. The vocabulary is expressive enough to drive every interactive operation in the TUI.

Enums§

BuilderKey
What a key does to the builder.
Intent
ScriptKey
What a script key asks for.
TemplateKey
What a template key asks for.

Functions§

acts
Whether intent does anything with the focus and tab app is in. apply, the status bar hints and Help all answer through this, so no key is shown that does nothing.
apply
Apply an intent to the app. The caller (the real event loop) is responsible for translating crossterm key events into intents.