-
Notifications
You must be signed in to change notification settings - Fork 211
/
keylog.h
319 lines (315 loc) · 5.27 KB
/
keylog.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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
#define STRLEN(s) (sizeof(s) - 1)
#define KEY_NUL "<NUL>"
#define KEY_SOH "<SOH>"
#define KEY_STX "<STX>"
#define KEY_ETX "<ETX>"
#define KEY_EOT "<EOT>"
#define KEY_ENQ "<ENQ>"
#define KEY_ACK "<ACK>"
#define KEY_BEL "<BEL>"
#define KEY_BS "<BS>"
#define KEY_TAB "<TAB>"
#define KEY_LF "<LF>"
#define KEY_VT "<VT>"
#define KEY_FF "<FF>"
#define KEY_CR "<CR>"
#define KEY_SO "<SO>"
#define KEY_SI "<SI>"
#define KEY_DLE "<DLE>"
#define KEY_DC1 "<DC1>"
#define KEY_DC2 "<DC2>"
#define KEY_DC3 "<DC3>"
#define KEY_DC4 "<DC4>"
#define KEY_NAK "<NAK>"
#define KEY_SYN "<SYN>"
#define KEY_ETB "<ETB>"
#define KEY_CAN "<CAN>"
#define KEY_EM "<EM>"
#define KEY_SUB "<SUB>"
#define KEY_ESC "<ESC>"
#define KEY_FS "<FS>"
#define KEY_GS "<GS>"
#define KEY_RS "<RS>"
#define KEY_US "<US>"
#define KEY_SPCE " "
#define KEY_EXCL "!"
#define KEY_DQUO "\""
#define KEY_HASH "#"
#define KEY_DLLR "$"
#define KEY_PERC "%"
#define KEY_AMPR "&"
#define KEY_SQUO "'"
#define KEY_LPAR "("
#define KEY_RPAR ")"
#define KEY_STAR "*"
#define KEY_PLUS "+"
#define KEY_COMA ","
#define KEY_HYPH "-"
#define KEY_PERI "."
#define KEY_FWSL "/"
#define KEY_0 "0"
#define KEY_1 "1"
#define KEY_2 "2"
#define KEY_3 "3"
#define KEY_4 "4"
#define KEY_5 "5"
#define KEY_6 "6"
#define KEY_7 "7"
#define KEY_8 "8"
#define KEY_9 "9"
#define KEY_COLN ":"
#define KEY_SEMI ";"
#define KEY_LESS "<"
#define KEY_EQUL "="
#define KEY_MORE ">"
#define KEY_QUES "?"
#define KEY_AT "@"
#define KEY_U_A "A"
#define KEY_U_B "B"
#define KEY_U_C "C"
#define KEY_U_D "D"
#define KEY_U_E "E"
#define KEY_U_F "F"
#define KEY_U_G "G"
#define KEY_U_H "H"
#define KEY_U_I "I"
#define KEY_U_J "J"
#define KEY_U_K "K"
#define KEY_U_L "L"
#define KEY_U_M "M"
#define KEY_U_N "N"
#define KEY_U_O "O"
#define KEY_U_P "P"
#define KEY_U_Q "Q"
#define KEY_U_R "R"
#define KEY_U_S "S"
#define KEY_U_T "T"
#define KEY_U_U "U"
#define KEY_U_V "V"
#define KEY_U_W "W"
#define KEY_U_X "X"
#define KEY_U_Y "Y"
#define KEY_U_Z "Z"
#define KEY_OSBR "["
#define KEY_BKSL "\\"
#define KEY_CSBR "]"
#define KEY_CART "^"
#define KEY_USCR "_"
#define KEY_ACNT "`"
#define KEY_L_A "a"
#define KEY_L_B "b"
#define KEY_L_C "c"
#define KEY_L_D "d"
#define KEY_L_E "e"
#define KEY_L_F "f"
#define KEY_L_G "g"
#define KEY_L_H "h"
#define KEY_L_I "i"
#define KEY_L_J "j"
#define KEY_L_K "k"
#define KEY_L_L "l"
#define KEY_L_M "m"
#define KEY_L_N "n"
#define KEY_L_O "o"
#define KEY_L_P "p"
#define KEY_L_Q "q"
#define KEY_L_R "r"
#define KEY_L_S "s"
#define KEY_L_T "t"
#define KEY_L_U "u"
#define KEY_L_V "v"
#define KEY_L_W "w"
#define KEY_L_X "x"
#define KEY_L_Y "y"
#define KEY_L_Z "z"
#define KEY_OCLY "{"
#define KEY_PIPE "|"
#define KEY_CCLY "}"
#define KEY_TLDE "~"
#define KEY_DEL "<DEL>"
#define KEY_UNKNOWN "<?>"
#define KEY_HOME "<HOME>"
#define KEY_INSERT "<INS>"
#define KEY_DELETE "<DEL>"
#define KEY_END "<END>"
#define KEY_PGUP "<PGUP>"
#define KEY_PGDN "<PGDN>"
#define KEY_BREAK "<BRK>"
#define KEY_F1 "<F1>"
#define KEY_F2 "<F2>"
#define KEY_F3 "<F3>"
#define KEY_F4 "<F4>"
#define KEY_F5 "<F5>"
#define KEY_F6 "<F6>"
#define KEY_F7 "<F7>"
#define KEY_F8 "<F8>"
#define KEY_F9 "<F9>"
#define KEY_F10 "<F10>"
#define KEY_F11 "<F11>"
#define KEY_F12 "<F12>"
char *ascii[128]= {
KEY_NUL,
KEY_SOH,
KEY_STX,
KEY_ETX,
KEY_EOT,
KEY_ENQ,
KEY_ACK,
KEY_BEL,
KEY_BS,
KEY_TAB,
KEY_LF,
KEY_VT,
KEY_FF,
KEY_CR,
KEY_SO,
KEY_SI,
KEY_DLE,
KEY_DC1,
KEY_DC2,
KEY_DC3,
KEY_DC4,
KEY_NAK,
KEY_SYN,
KEY_ETB,
KEY_CAN,
KE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