-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKeysMap.h
71 lines (68 loc) · 1.59 KB
/
KeysMap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <unordered_map>
// https://stackoverflow.com/questions/66122109/how-to-check-if-any-key-is-pressed-in-pixel-game-engine
struct UpperLowerKeys{
uint8_t lower;
uint8_t upper;
};
// Each line is structured in the following way:
// {OLCCodeInput, {ASCIICodeLowerCase, ASCIICodeUpperCase}}
extern std::unordered_map<uint8_t, UpperLowerKeys> valueInputKeys = {
{1, {0x61, 0x41}},
{2, {0x62, 0x42}},
{3, {0x63, 0x43}},
{4, {0x64, 0x44}},
{5, {0x65, 0x45}},
{6, {0x66, 0x46}},
{7, {0x67, 0x47}},
{8, {0x68, 0x48}},
{9, {0x69, 0x49}},
{10, {0x6a, 0x4a}},
{11, {0x6b, 0x4b}},
{12, {0x6c, 0x4c}},
{13, {0x6d, 0x4d}},
{14, {0x6e, 0x4e}},
{15, {0x6f, 0x4f}},
{16, {0x70, 0x50}},
{17, {0x71, 0x51}},
{18, {0x72, 0x52}},
{19, {0x73, 0x53}},
{20, {0x74, 0x54}},
{21, {0x75, 0x55}},
{22, {0x76, 0x56}},
{23, {0x77, 0x57}},
{24, {0x78, 0x58}},
{25, {0x79, 0x59}},
{26, {0x7a, 0x5a}},
{27, {0x30, 0x29}},
{28, {0x31, 0x21}},
{29, {0x32, 0x40}},
{30, {0x33, 0x23}},
{31, {0x34, 0x24}},
{32, {0x35, 0x25}},
{33, {0x36, 0x5e}},
{34, {0x37, 0x26}},
{35, {0x38, 0x2a}},
{36, {0x39, 0x28}},
{53, {0x20, 0x20}},
{69, {0x30, 0x30}},
{70, {0x31, 0x31}},
{71, {0x32, 0x32}},
{72, {0x33, 0x33}},
{73, {0x34, 0x34}},
{74, {0x35, 0x35}},
{75, {0x36, 0x36}},
{76, {0x37, 0x37}},
{77, {0x38, 0x38}},
{78, {0x39, 0x39}},
{84, {0x2e, 0x3e}},
{88, {0x3b, 0x3a}},
{89, {0x2f, 0x3f}},
{0, {0x60, 0x7e}},
{91, {0x5b, 0x7b}},
{92, {0x5c, 0x7c}},
{93, {0x5d, 0x7d}},
{94, {0x27, 0x22}},
{85, {0x3d, 0x2b}},
{86, {0x2c, 0x3c}},
{87, {0x2d, 0x5f}}
};