MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / GetKeyName

Function GetKeyName

PanzerChasm/system_event.cpp:8–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6{
7
8const char* GetKeyName( const SystemEvent::KeyEvent::KeyCode key_code )
9{
10 using KeyCode= SystemEvent::KeyEvent::KeyCode;
11 switch( key_code )
12 {
13 case KeyCode::KeyCount:
14 case KeyCode::Unknown: return "";
15
16 case KeyCode::Escape: return "Esc";
17 case KeyCode::Enter: return "Enter";
18 case KeyCode::Space: return "Space";
19 case KeyCode::Backspace: return "Backspace";
20 case KeyCode::Tab: return "Tab";
21
22 case KeyCode::PageUp: return "PageUp";
23 case KeyCode::PageDown: return "PageDown";
24
25 case KeyCode::Up: return "Up";
26 case KeyCode::Down: return "Down";
27 case KeyCode::Left: return "Left";
28 case KeyCode::Right: return "Right";
29 case KeyCode::BackQuote: return "`";
30
31 case KeyCode::A: return "A";
32 case KeyCode::B: return "B";
33 case KeyCode::C: return "C";
34 case KeyCode::D: return "D";
35 case KeyCode::E: return "E";
36 case KeyCode::F: return "F";
37 case KeyCode::G: return "G";
38 case KeyCode::H: return "H";
39 case KeyCode::I: return "I";
40 case KeyCode::J: return "J";
41 case KeyCode::K: return "K";
42 case KeyCode::L: return "L";
43 case KeyCode::M: return "M";
44 case KeyCode::N: return "N";
45 case KeyCode::O: return "O";
46 case KeyCode::P: return "P";
47 case KeyCode::Q: return "Q";
48 case KeyCode::R: return "R";
49 case KeyCode::S: return "S";
50 case KeyCode::T: return "T";
51 case KeyCode::U: return "U";
52 case KeyCode::V: return "V";
53 case KeyCode::W: return "W";
54 case KeyCode::X: return "X";
55 case KeyCode::Y: return "X";
56 case KeyCode::Z: return "Z";
57
58 case KeyCode::K0: return "0";
59 case KeyCode::K1: return "1";
60 case KeyCode::K2: return "2";
61 case KeyCode::K3: return "3";
62 case KeyCode::K4: return "4";
63 case KeyCode::K5: return "5";
64 case KeyCode::K6: return "6";
65 case KeyCode::K7: return "7";

Callers 1

DrawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected