Expand description
Face-independent key events.
The editor and the vi model are the same logic whether the keystroke came
from a terminal or a window, but each face has its own key type: the tui
reads crossterm::event::KeyEvent, a gui reads whatever its toolkit hands
it. Neither belongs in shared code — core takes no io dependencies.
So core owns the vocabulary and each face maps into it. The shape here
deliberately mirrors crossterm’s (code + modifiers, a contains on the
modifier set) so the terminal face’s mapping is mechanical and the editor
reads the same as it always did.
Structs§
- KeyEvent
- One keystroke.
- KeyModifiers
- Held modifiers.
containsasks “are all of the bits inotherset here”, matching the bitflags semantics the call sites were written against.
Enums§
- KeyCode
- Every key the editor and vi model actually distinguish. Closed on purpose — a face that sees something else drops it rather than widening this.