1 module allegro5.keycodes;
2 
3 enum
4 {
5 	ALLEGRO_KEY_A      = 1,
6 	ALLEGRO_KEY_B      = 2,
7 	ALLEGRO_KEY_C      = 3,
8 	ALLEGRO_KEY_D      = 4,
9 	ALLEGRO_KEY_E      = 5,
10 	ALLEGRO_KEY_F      = 6,
11 	ALLEGRO_KEY_G      = 7,
12 	ALLEGRO_KEY_H      = 8,
13 	ALLEGRO_KEY_I      = 9,
14 	ALLEGRO_KEY_J      = 10,
15 	ALLEGRO_KEY_K      = 11,
16 	ALLEGRO_KEY_L      = 12,
17 	ALLEGRO_KEY_M      = 13,
18 	ALLEGRO_KEY_N      = 14,
19 	ALLEGRO_KEY_O      = 15,
20 	ALLEGRO_KEY_P      = 16,
21 	ALLEGRO_KEY_Q      = 17,
22 	ALLEGRO_KEY_R      = 18,
23 	ALLEGRO_KEY_S      = 19,
24 	ALLEGRO_KEY_T      = 20,
25 	ALLEGRO_KEY_U      = 21,
26 	ALLEGRO_KEY_V      = 22,
27 	ALLEGRO_KEY_W      = 23,
28 	ALLEGRO_KEY_X      = 24,
29 	ALLEGRO_KEY_Y      = 25,
30 	ALLEGRO_KEY_Z      = 26,
31 
32 	ALLEGRO_KEY_0      = 27,
33 	ALLEGRO_KEY_1      = 28,
34 	ALLEGRO_KEY_2      = 29,
35 	ALLEGRO_KEY_3      = 30,
36 	ALLEGRO_KEY_4      = 31,
37 	ALLEGRO_KEY_5      = 32,
38 	ALLEGRO_KEY_6      = 33,
39 	ALLEGRO_KEY_7      = 34,
40 	ALLEGRO_KEY_8      = 35,
41 	ALLEGRO_KEY_9      = 36,
42 
43 	ALLEGRO_KEY_PAD_0      = 37,
44 	ALLEGRO_KEY_PAD_1      = 38,
45 	ALLEGRO_KEY_PAD_2      = 39,
46 	ALLEGRO_KEY_PAD_3      = 40,
47 	ALLEGRO_KEY_PAD_4      = 41,
48 	ALLEGRO_KEY_PAD_5      = 42,
49 	ALLEGRO_KEY_PAD_6      = 43,
50 	ALLEGRO_KEY_PAD_7      = 44,
51 	ALLEGRO_KEY_PAD_8      = 45,
52 	ALLEGRO_KEY_PAD_9      = 46,
53 
54 	ALLEGRO_KEY_F1      = 47,
55 	ALLEGRO_KEY_F2      = 48,
56 	ALLEGRO_KEY_F3      = 49,
57 	ALLEGRO_KEY_F4      = 50,
58 	ALLEGRO_KEY_F5      = 51,
59 	ALLEGRO_KEY_F6      = 52,
60 	ALLEGRO_KEY_F7      = 53,
61 	ALLEGRO_KEY_F8      = 54,
62 	ALLEGRO_KEY_F9      = 55,
63 	ALLEGRO_KEY_F10      = 56,
64 	ALLEGRO_KEY_F11      = 57,
65 	ALLEGRO_KEY_F12      = 58,
66 
67 	ALLEGRO_KEY_ESCAPE   = 59,
68 	ALLEGRO_KEY_TILDE      = 60,
69 	ALLEGRO_KEY_MINUS      = 61,
70 	ALLEGRO_KEY_EQUALS   = 62,
71 	ALLEGRO_KEY_BACKSPACE   = 63,
72 	ALLEGRO_KEY_TAB      = 64,
73 	ALLEGRO_KEY_OPENBRACE   = 65,
74 	ALLEGRO_KEY_CLOSEBRACE   = 66,
75 	ALLEGRO_KEY_ENTER      = 67,
76 	ALLEGRO_KEY_SEMICOLON   = 68,
77 	ALLEGRO_KEY_QUOTE      = 69,
78 	ALLEGRO_KEY_BACKSLASH   = 70,
79 	ALLEGRO_KEY_BACKSLASH2   = 71, /* DirectInput calls this DIK_OEM_102: "< > | on UK/Germany keyboards" */
80 	ALLEGRO_KEY_COMMA      = 72,
81 	ALLEGRO_KEY_FULLSTOP   = 73,
82 	ALLEGRO_KEY_SLASH      = 74,
83 	ALLEGRO_KEY_SPACE      = 75,
84 
85 	ALLEGRO_KEY_INSERT   = 76,
86 	ALLEGRO_KEY_DELETE   = 77,
87 	ALLEGRO_KEY_HOME      = 78,
88 	ALLEGRO_KEY_END      = 79,
89 	ALLEGRO_KEY_PGUP      = 80,
90 	ALLEGRO_KEY_PGDN      = 81,
91 	ALLEGRO_KEY_LEFT      = 82,
92 	ALLEGRO_KEY_RIGHT      = 83,
93 	ALLEGRO_KEY_UP      = 84,
94 	ALLEGRO_KEY_DOWN      = 85,
95 
96 	ALLEGRO_KEY_PAD_SLASH   = 86,
97 	ALLEGRO_KEY_PAD_ASTERISK   = 87,
98 	ALLEGRO_KEY_PAD_MINUS   = 88,
99 	ALLEGRO_KEY_PAD_PLUS   = 89,
100 	ALLEGRO_KEY_PAD_DELETE   = 90,
101 	ALLEGRO_KEY_PAD_ENTER   = 91,
102 
103 	ALLEGRO_KEY_PRINTSCREEN   = 92,
104 	ALLEGRO_KEY_PAUSE      = 93,
105 
106 	ALLEGRO_KEY_ABNT_C1   = 94,
107 	ALLEGRO_KEY_YEN      = 95,
108 	ALLEGRO_KEY_KANA      = 96,
109 	ALLEGRO_KEY_CONVERT   = 97,
110 	ALLEGRO_KEY_NOCONVERT   = 98,
111 	ALLEGRO_KEY_AT      = 99,
112 	ALLEGRO_KEY_CIRCUMFLEX   = 100,
113 	ALLEGRO_KEY_COLON2   = 101,
114 	ALLEGRO_KEY_KANJI      = 102,
115 
116 	ALLEGRO_KEY_PAD_EQUALS   = 103,   /* MacOS X */
117 	ALLEGRO_KEY_BACKQUOTE   = 104,   /* MacOS X */
118 	ALLEGRO_KEY_SEMICOLON2   = 105,   /* MacOS X -- TODO: ask lillo what this should be */
119 	ALLEGRO_KEY_COMMAND   = 106,   /* MacOS X */
120 	
121 	ALLEGRO_KEY_BACK = 107,        /* Android back key */
122 	ALLEGRO_KEY_VOLUME_UP = 108,
123 	ALLEGRO_KEY_VOLUME_DOWN = 109,
124 
125 	/* Android game keys */
126 	ALLEGRO_KEY_SEARCH       = 110,
127 	ALLEGRO_KEY_DPAD_CENTER  = 111,
128 	ALLEGRO_KEY_BUTTON_X     = 112,
129 	ALLEGRO_KEY_BUTTON_Y     = 113,
130 	ALLEGRO_KEY_DPAD_UP      = 114,
131 	ALLEGRO_KEY_DPAD_DOWN    = 115,
132 	ALLEGRO_KEY_DPAD_LEFT    = 116,
133 	ALLEGRO_KEY_DPAD_RIGHT   = 117,
134 	ALLEGRO_KEY_SELECT       = 118,
135 	ALLEGRO_KEY_START        = 119,
136 	ALLEGRO_KEY_BUTTON_L1    = 120,
137 	ALLEGRO_KEY_BUTTON_R1    = 121,
138 	ALLEGRO_KEY_BUTTON_L2    = 122,
139 	ALLEGRO_KEY_BUTTON_R2    = 123,
140 	ALLEGRO_KEY_BUTTON_A     = 124,
141 	ALLEGRO_KEY_BUTTON_B     = 125,
142 	ALLEGRO_KEY_THUMBL       = 126,
143 	ALLEGRO_KEY_THUMBR       = 127,
144 
145 	ALLEGRO_KEY_UNKNOWN      = 128,
146 
147 	/* All codes up to before ALLEGRO_KEY_MODIFIERS can be freely
148 	* assignedas additional unknown keys, like various multimedia
149 	* and application keys keyboards may have.
150 	*/
151 
152 	ALLEGRO_KEY_MODIFIERS   = 215,
153 
154 	ALLEGRO_KEY_LSHIFT   = 215,
155 	ALLEGRO_KEY_RSHIFT   = 216,
156 	ALLEGRO_KEY_LCTRL   = 217,
157 	ALLEGRO_KEY_RCTRL   = 218,
158 	ALLEGRO_KEY_ALT      = 219,
159 	ALLEGRO_KEY_ALTGR   = 220,
160 	ALLEGRO_KEY_LWIN      = 221,
161 	ALLEGRO_KEY_RWIN      = 222,
162 	ALLEGRO_KEY_MENU      = 223,
163 	ALLEGRO_KEY_SCROLLLOCK = 224,
164 	ALLEGRO_KEY_NUMLOCK   = 225,
165 	ALLEGRO_KEY_CAPSLOCK   = 226,
166 
167 	ALLEGRO_KEY_MAX
168 }
169 
170 enum
171 {
172 	ALLEGRO_KEYMOD_SHIFT       = 0x00001,
173 	ALLEGRO_KEYMOD_CTRL        = 0x00002,
174 	ALLEGRO_KEYMOD_ALT         = 0x00004,
175 	ALLEGRO_KEYMOD_LWIN        = 0x00008,
176 	ALLEGRO_KEYMOD_RWIN        = 0x00010,
177 	ALLEGRO_KEYMOD_MENU        = 0x00020,
178 	ALLEGRO_KEYMOD_ALTGR       = 0x00040,
179 	ALLEGRO_KEYMOD_COMMAND     = 0x00080,
180 	ALLEGRO_KEYMOD_SCROLLLOCK  = 0x00100,
181 	ALLEGRO_KEYMOD_NUMLOCK     = 0x00200,
182 	ALLEGRO_KEYMOD_CAPSLOCK    = 0x00400,
183 	ALLEGRO_KEYMOD_INALTSEQ    = 0x00800,
184 	ALLEGRO_KEYMOD_ACCENT1     = 0x01000,
185 	ALLEGRO_KEYMOD_ACCENT2     = 0x02000,
186 	ALLEGRO_KEYMOD_ACCENT3     = 0x04000,
187 	ALLEGRO_KEYMOD_ACCENT4     = 0x08000
188 }