#[non_exhaustive]pub enum KeyCode {
}Expand description
Key identifier.
Covers printable characters, control keys, arrow keys, function keys, and navigation keys. Unrecognized keys are silently dropped by the crossterm conversion layer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Char(char)
A printable character (letter, digit, symbol, space, etc.).
Enter
Enter / Return key.
Backspace
Backspace key.
Tab
Tab key (forward tab).
BackTab
Shift+Tab (back tab).
Esc
Escape key.
Up
Up arrow key.
Down
Down arrow key.
Left
Left arrow key.
Right
Right arrow key.
Home
Home key.
End
End key.
PageUp
Page Up key.
PageDown
Page Down key.
Delete
Delete (forward delete) key.
Insert
Insert key.
Null
Null key (Ctrl+Space on some terminals).
CapsLock
Caps Lock key (Kitty keyboard protocol only).
ScrollLock
Scroll Lock key (Kitty keyboard protocol only).
NumLock
Num Lock key (Kitty keyboard protocol only).
PrintScreen
Print Screen key (Kitty keyboard protocol only).
Pause
Pause/Break key (Kitty keyboard protocol only).
Menu
Menu / context menu key.
KeypadBegin
Keypad center key (numpad 5 without NumLock).
F(u8)
Function key F1..F12 (and beyond). The inner u8 is the number.