#[non_exhaustive]pub enum Key {
}Expand description
A physical key, independent of which terminal or OS produced it.
Only keys whose identity is unambiguous across environments are enumerated
today. Keys whose meaning is environment-dependent (media keys, keypad
distinctions, etc.) are intentionally omitted and will be added later; this
enum is #[non_exhaustive], so adding them is not a breaking change. Because
of that, downstream match expressions must include a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Char(char)
A character-producing key, carrying the resolved glyph. See the
normalization note on KeyInput for how shift interacts with this.
F(u8)
A function key, F(1) through F(n).
Enter
The Enter / Return key.
Esc
The Escape key.
Tab
The Tab key. Shift+Tab is represented as Tab with Modifiers::SHIFT.
Backspace
The Backspace key.
Delete
The forward Delete key.
Insert
The Insert key.
Home
The Home key.
End
The End key.
PageUp
The Page Up key.
PageDown
The Page Down key.
Up
The Up arrow.
Down
The Down arrow.
Left
The Left arrow.
Right
The Right arrow.