Debian Codegraph @

phoenix/core/keyboard.hpp

raw
1 //each code refers to a physical key
2 //names are taken assuming: NumLock on, CapsLock off, Shift off
3 //layout uses US-104 keyboard
4 enum class Scancode : unsigned {
5 None,
6
7 Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
8 PrintScreen, ScrollLock, Pause,
9 Insert, Delete, Home, End, PageUp, PageDown,
10 Up, Down, Left, Right,
11
12 Grave, Number1, Number2, Number3, Number4, Number5, Number6, Number7, Number8, Number9, Number0, Minus, Equal, Backspace,
13 BracketLeft, BracketRight, Backslash, Semicolon, Apostrophe, Comma, Period, Slash,
14 Tab, CapsLock, Return, ShiftLeft, ShiftRight, ControlLeft, ControlRight, SuperLeft, SuperRight, AltLeft, AltRight, Space, Menu,
15 A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z,
16
17 NumLock, Divide, Multiply, Subtract, Add, Enter, Point,
18 Keypad1, Keypad2, Keypad3, Keypad4, Keypad5, Keypad6, Keypad7, Keypad8, Keypad9, Keypad0,
19
20 Limit,
21 };
22
23 //each enum refers to a translated scancode (eg Shift+1 = !)
24 enum class Keycode : unsigned {
25 None,
26
27 Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
28 PrintScreen, SysRq, ScrollLock, Pause, Break,
29 Insert, Delete, Home, End, PageUp, PageDown,
30 Up, Down, Left, Right,
31
32 Grave, Number1, Number2, Number3, Number4, Number5, Number6, Number7, Number8, Number9, Number0, Minus, Equal, Backspace,
33 Tilde, Exclamation, At, Pound, Dollar, Percent, Power, Ampersand, Asterisk, ParenthesisLeft, ParenthesisRight, Underscore, Plus,
34 BracketLeft, BracketRight, Backslash, Semicolon, Apostrophe, Comma, Period, Slash,
35 BraceLeft, BraceRight, Pipe, Colon, Quote, CaretLeft, CaretRight, Question,
36 Tab, CapsLock, Return, ShiftLeft, ShiftRight, ControlLeft, ControlRight, SuperLeft, SuperRight, AltLeft, AltRight, Space, Menu,
37 A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z,
38 a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z,
39
40 NumLock, Divide, Multiply, Subtract, Add, Enter, Point,
41 Keypad1, Keypad2, Keypad3, Keypad4, Keypad5, Keypad6, Keypad7, Keypad8, Keypad9, Keypad0,
42 KeypadInsert, KeypadDelete, KeypadHome, KeypadEnd, KeypadPageUp, KeypadPageDown, KeypadUp, KeypadDown, KeypadLeft, KeypadRight, KeypadCenter,
43
44 Limit,
45 };