-
Notifications
You must be signed in to change notification settings - Fork 1
/
winkeys.h
279 lines (277 loc) · 7.79 KB
/
winkeys.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
/* winkeys.h - convert windows keysyms to Zedit keys
* Copyright (C) 2013-2017 Sean MacLennan <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this project; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
static Byte virt[] = {
0,
0, /* 0x01 VK_LBUTTON */
0, /* 0x02 VK_RBUTTON */
0, /* 0x03 VK_CANCEL */
0, /* 0x04 VK_MBUTTON */
0, /* 0x05 VK_XBUTTON1 */
0, /* 0x06 VK_XBUTTON2 */
0, /* 0x07 Undefined */
127, /* 0x08 VK_BACK */
'\t', /* 0x09 VK_TAB */
0, /* 0x0A-0B Reserved */
0, /* 0x0A-0B Reserved */
0, /* 0x0C VK_CLEAR */
'\r', /* 0x0D VK_RETURN */
0, /* 0x0E-0F Undefined */
0, /* 0x0E-0F Undefined */
0, /* 0x10 VK_SHIFT */
0, /* 0x11 VK_CONTROL */
0, /* 0x12 VK_MENU */
0, /* 0x13 VK_PAUSE */
0, /* 0x14 VK_CAPITAL */
0, /* 0x15 VK_KANA/VK_HANGUL */
0, /* 0x16 Undefined */
0, /* 0x17 VK_JUNJA */
0, /* 0x18 VK_FINAL */
0, /* 0x19 VK_HANJA/VK_KANJI */
0, /* 0x1A Undefined */
'\033', /* 0x1B VK_ESCAPE */
0, /* 0x1C VK_CONVERT */
0, /* 0x1D VK_NONCONVERT */
0, /* 0x1E VK_ACCEPT */
0, /* 0x1F VK_MODECHANGE */
' ', /* 0x20 VK_SPACE */
TC_PGUP, /* 0x21 VK_PRIOR */
TC_PGDOWN, /* 0x22 VK_NEXT */
TC_END, /* 0x23 VK_END */
TC_HOME, /* 0x24 VK_HOME */
TC_LEFT, /* 0x25 VK_LEFT */
TC_UP, /* 0x26 VK_UP */
TC_RIGHT, /* 0x27 VK_RIGHT */
TC_DOWN, /* 0x28 VK_DOWN */
0, /* 0x29 VK_SELECT */
0, /* 0x2A VK_PRINT */
0, /* 0x2B VK_EXECUTE */
0, /* 0x2C VK_SNAPSHOT */
TC_INSERT, /* 0x2D VK_INSERT */
TC_DELETE, /* 0x2E VK_DELETE */
0, /* 0x2F VK_HELP */
'0', /* 0x30 0 key */
'1', /* 0x31 1 key */
'2', /* 0x32 2 key */
'3', /* 0x33 3 key */
'4', /* 0x34 4 key */
'5', /* 0x35 5 key */
'6', /* 0x36 6 key */
'7', /* 0x37 7 key */
'8', /* 0x38 8 key */
'9', /* 0x39 9 key */
0, /* 0x3A-40 Undefined */
0, /* 0x3A-40 Undefined */
0, /* 0x3A-40 Undefined */
0, /* 0x3A-40 Undefined */
0, /* 0x3A-40 Undefined */
0, /* 0x3A-40 Undefined */
0, /* 0x3A-40 Undefined */
'a', /* 0x41 A key */
'b', /* 0x42 B key */
'c', /* 0x43 C key */
'd', /* 0x44 D key */
'e', /* 0x45 E key */
'f', /* 0x46 F key */
'g', /* 0x47 G key */
'h', /* 0x48 H key */
'i', /* 0x49 I key */
'j', /* 0x4A J key */
'k', /* 0x4B K key */
'l', /* 0x4C L key */
'm', /* 0x4D M key */
'n', /* 0x4E N key */
'o', /* 0x4F O key */
'p', /* 0x50 P key */
'q', /* 0x51 Q key */
'r', /* 0x52 R key */
's', /* 0x53 S key */
't', /* 0x54 T key */
'u', /* 0x55 U key */
'v', /* 0x56 V key */
'w', /* 0x57 W key */
'x', /* 0x58 X key */
'y', /* 0x59 Y key */
'z', /* 0x5A Z key */
0, /* 0x5B VK_LWIN */
0, /* 0x5C VK_RWIN */
0, /* 0x5D VK_APPS */
0, /* 0x5E Reserved */
0, /* 0x5F VK_SLEEP */
0, /* 0x60 VK_NUMPAD0 */
0, /* 0x61 VK_NUMPAD1 */
0, /* 0x62 VK_NUMPAD2 */
0, /* 0x63 VK_NUMPAD3 */
0, /* 0x64 VK_NUMPAD4 */
0, /* 0x65 VK_NUMPAD5 */
0, /* 0x66 VK_NUMPAD6 */
0, /* 0x67 VK_NUMPAD7 */
0, /* 0x68 VK_NUMPAD8 */
0, /* 0x69 VK_NUMPAD9 */
0, /* 0x6A VK_MULTIPLY */
0, /* 0x6B VK_ADD */
0, /* 0x6C VK_SEPARATOR */
0, /* 0x6D VK_SUBTRACT */
0, /* 0x6E VK_DECIMAL */
0, /* 0x6F VK_DIVIDE */
TC_F1, /* 0x70 VK_F1 */
TC_F2, /* 0x71 VK_F2 */
TC_F3, /* 0x72 VK_F3 */
TC_F4, /* 0x73 VK_F4 */
TC_F5, /* 0x74 VK_F5 */
TC_F6, /* 0x75 VK_F6 */
TC_F7, /* 0x76 VK_F7 */
TC_F8, /* 0x77 VK_F8 */
TC_F9, /* 0x78 VK_F9 */
TC_F10, /* 0x79 VK_F10 */
TC_F11, /* 0x7A VK_F11 */
TC_F12, /* 0x7B VK_F12 */
0, /* 0x7C VK_F13 */
0, /* 0x7D VK_F14 */
0, /* 0x7E VK_F15 */
0, /* 0x7F VK_F16 */
0, /* 0x80 VK_F17 */
0, /* 0x81 VK_F18 */
0, /* 0x82 VK_F19 */
0, /* 0x83 VK_F20 */
0, /* 0x84 VK_F21 */
0, /* 0x85 VK_F22 */
0, /* 0x86 VK_F23 */
0, /* 0x87 VK_F24 */
0, /* 0x88-8F Unassigned */
0, /* 0x88-8F Unassigned */
0, /* 0x88-8F Unassigned */
0, /* 0x88-8F Unassigned */
0, /* 0x88-8F Unassigned */
0, /* 0x88-8F Unassigned */
0, /* 0x88-8F Unassigned */
0, /* 0x88-8F Unassigned */
0, /* 0x90 VK_NUMLOCK */
0, /* 0x91 VK_SCROLL */
0, /* 0x92-96 OEM specific */
0, /* 0x92-96 OEM specific */
0, /* 0x92-96 OEM specific */
0, /* 0x92-96 OEM specific */
0, /* 0x92-96 OEM specific */
0, /* 0x97-9F Unassigned */
0, /* 0x97-9F Unassigned */
0, /* 0x97-9F Unassigned */
0, /* 0x97-9F Unassigned */
0, /* 0x97-9F Unassigned */
0, /* 0x97-9F Unassigned */
0, /* 0x97-9F Unassigned */
0, /* 0x97-9F Unassigned */
0, /* 0x97-9F Unassigned */
0, /* 0xA0 VK_LSHIFT */
0, /* 0xA1 VK_RSHIFT */
0, /* 0xA2 VK_LCONTROL */
0, /* 0xA3 VK_RCONTROL */
0, /* 0xA4 VK_LMENU */
0, /* 0xA5 VK_RMENU */
0, /* 0xA6 VK_BROWSER_BACK */
0, /* 0xA7 VK_BROWSER_FORWARD */
0, /* 0xA8 VK_BROWSER_REFRESH */
0, /* 0xA9 VK_BROWSER_STOP */
0, /* 0xAA VK_BROWSER_SEARCH */
0, /* 0xAB VK_BROWSER_FAVORITES */
0, /* 0xAC VK_BROWSER_HOME */
0, /* 0xAD VK_VOLUME_MUTE */
0, /* 0xAE VK_VOLUME_DOWN */
0, /* 0xAF VK_VOLUME_UP */
0, /* 0xB0 VK_MEDIA_NEXT_TRACK */
0, /* 0xB1 VK_MEDIA_PREV_TRACK */
0, /* 0xB2 VK_MEDIA_STOP */
0, /* 0xB3 VK_MEDIA_PLAY_PAUSE */
0, /* 0xB4 VK_LAUNCH_MAIL */
0, /* 0xB5 VK_LAUNCH_MEDIA_SELECT */
0, /* 0xB6 VK_LAUNCH_APP1 */
0, /* 0xB7 VK_LAUNCH_APP2 */
0, /* 0xB8-B9 Reserved */
0, /* 0xB8-B9 Reserved */
';', /* 0xBA VK_OEM_1';:' */
'=', /* 0xBB VK_OEM_PLUS */
',', /* 0xBC VK_OEM_COMMA */
'-', /* 0xBD VK_OEM_MINUS */
'.', /* 0xBE VK_OEM_PERIOD */
'/', /* 0xBF VK_OEM_2'/?' */
'`', /* 0xC0 VK_OEM_3'`~' */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xC1-D7 Reserved */
0, /* 0xD8-DA Unassigned */
0, /* 0xD8-DA Unassigned */
0, /* 0xD8-DA Unassigned */
'[', /* 0xDB VK_OEM_4'[{' */
'\\', /* 0xDC VK_OEM_5'\|' */
']', /* 0xDD VK_OEM_6']}' */
'\'', /* 0xDE VK_OEM_7''"' */
0, /* 0xDF VK_OEM_8 */
0, /* 0xE0 Reserved */
0, /* 0xE1 OEM specific */
0, /* 0xE2 VK_OEM_102 */
0, /* 0xE3-E4 OEM specific */
0, /* 0xE3-E4 OEM specific */
0, /* 0xE5 VK_PROCESSKEY */
0, /* 0xE6 OEM specific */
0, /* 0xE7 VK_PACKET */
0, /* 0xE8 Unassigned */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xE9-F5 OEM specific */
0, /* 0xF6 VK_ATTN */
0, /* 0xF7 VK_CRSEL */
0, /* 0xF8 VK_EXSEL */
0, /* 0xF9 VK_EREOF */
0, /* 0xFA VK_PLAY */
0, /* 0xFB VK_ZOOM */
0, /* 0xFC VK_NONAME */
0, /* 0xFD VK_PA1 */
0, /* 0xFE VK_OEM_CLEAR */
0
};
extern HANDLE hstdin;