cli_prompts/input/mod.rs
1//! Module for handling input
2
3/// Represents different keyboard keys
4#[derive(Debug, PartialEq, Eq)]
5pub enum Key {
6 /// Backspace key
7 Backspace,
8
9 /// Enter (Return) key
10 Enter,
11
12 /// Left arrow key
13 Left,
14
15 /// Right arrow key
16 Right,
17
18 /// Up arrow key
19 Up,
20
21 /// Down arrow key
22 Down,
23
24 /// Home key
25 Home,
26
27 /// End key
28 End,
29
30 /// Page Up key
31 PageUp,
32
33 /// Page Down key
34 PageDown,
35
36 /// Tab key
37 Tab,
38
39 /// Shift+Tab key
40 BackTab,
41
42 /// Delete key
43 Delete,
44
45 /// Insert key
46 Insert,
47
48 /// Function keys from F1 to F12
49 F(u8),
50
51 /// All the character keys
52 Char(char),
53
54 /// A character key pressed with Ctrl
55 Ctrl(char),
56
57 /// Esc key
58 Esc,
59}