pub enum KeyInput {
Enter,
Up,
Down,
Left,
Right,
Char(char),
Backspace,
Colon(String),
Escape,
}Expand description
A normalized terminal key event, decoded from raw input upstream.
This is the reduction layer the surface tests target: it names the keys the
tty surface acts on, not raw escape sequences. Colon carries the text of a
command-line entry (the part after the : prompt).
Variants§
Enter
The Enter/Return key: activate the focused target.
Up
The Up arrow: select toward the previous item.
Down
The Down arrow: select toward the next item.
Left
The Left arrow: move the focused node left.
Right
The Right arrow: move the focused node right.
Char(char)
A printable character typed into the focused field. The field key is
supplied to intent_from_key; with no focused field the keystroke is
dropped rather than overwriting the whole resource.
Backspace
The Backspace key (no Intent mapping; deletion is handled in the field).
Colon(String)
A submitted command line (:-prompt), carrying the command text.
Escape
The Escape key: cancel the active pane.