-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkbd-consts.rb
594 lines (576 loc) · 9.69 KB
/
kbd-consts.rb
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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
module UInput
EVIOCGEFFECTS = 2147763588
EVIOCGID = 2148025602
EVIOCGKEYCODE = 2148025604
EVIOCGRAB = 1074021776
EVIOCGREP = 2148025603
EVIOCGVERSION = 2147763457
EVIOCRMFF = 1074021761
EVIOCSFF = 1076643200
EVIOCSKEYCODE = 1074283780
EVIOCSREP = 1074283779
UI_BEGIN_FF_ERASE = 3222033866
UI_BEGIN_FF_UPLOAD = 3224655304
UI_DEV_CREATE = 21761
UI_DEV_DESTROY = 21762
UI_END_FF_ERASE = 1074550219
UI_END_FF_UPLOAD = 1077171657
UI_FF_ERASE = 2
UI_FF_UPLOAD = 1
UI_SET_ABSBIT = 1074025831
UI_SET_EVBIT = 1074025828
UI_SET_FFBIT = 1074025835
UI_SET_KEYBIT = 1074025829
UI_SET_LEDBIT = 1074025833
UI_SET_MSCBIT = 1074025832
UI_SET_PHYS = 1074025836
UI_SET_RELBIT = 1074025830
UI_SET_SNDBIT = 1074025834
UI_SET_SWBIT = 1074025837
module FF
AUTOCENTER = 0x61
CONSTANT = 0x52
CUSTOM = 0x5d
DAMPER = 0x55
FRICTION = 0x54
GAIN = 0x60
INERTIA = 0x56
MAX = 0x7f
PERIODIC = 0x51
RAMP = 0x57
RUMBLE = 0x50
SAW_DOWN = 0x5c
SAW_UP = 0x5b
SINE = 0x5a
SPRING = 0x53
SQUARE = 0x58
STATUS_MAX = 0x01
STATUS_PLAYING = 0x01
STATUS_STOPPED = 0x00
TRIANGLE = 0x59
end
module BUS
ADB = 0x17
AMIGA = 0x16
BLUETOOTH = 0x05
GAMEPORT = 0x14
GSC = 0x1A
HIL = 0x04
HOST = 0x19
I2C = 0x18
I8042 = 0x11
ISA = 0x10
ISAPNP = 0x02
PARPORT = 0x15
PCI = 0x01
RS232 = 0x13
USB = 0x03
XTKBD = 0x12
end
module LED
CAPSL = 0x01
CHARGING = 0x0a
COMPOSE = 0x03
KANA = 0x04
MAIL = 0x09
MAX = 0x0f
MISC = 0x08
MUTE = 0x07
NUML = 0x00
SCROLLL = 0x02
SLEEP = 0x05
SUSPEND = 0x06
end
module REL
DIAL = 0x07
HWHEEL = 0x06
MAX = 0x0f
MISC = 0x09
RX = 0x03
RY = 0x04
RZ = 0x05
WHEEL = 0x08
X = 0x00
Y = 0x01
Z = 0x02
end
module SW
HEADPHONE_INSERT = 0x02
LID = 0x00
MAX = 0x0f
TABLET_MODE = 0x01
end
module ID
BUS = 0
PRODUCT = 2
VENDOR = 1
VERSION = 3
end
module BTN
BTN_0 = 0x100
BTN_1 = 0x101
BTN_2 = 0x102
BTN_3 = 0x103
BTN_4 = 0x104
BTN_5 = 0x105
BTN_6 = 0x106
BTN_7 = 0x107
BTN_8 = 0x108
BTN_9 = 0x109
A = 0x130
B = 0x131
BACK = 0x116
BASE = 0x126
BASE2 = 0x127
BASE3 = 0x128
BASE4 = 0x129
BASE5 = 0x12a
BASE6 = 0x12b
C = 0x132
DEAD = 0x12f
DIGI = 0x140
EXTRA = 0x114
FORWARD = 0x115
GAMEPAD = 0x130
GEAR_DOWN = 0x150
GEAR_UP = 0x151
JOYSTICK = 0x120
LEFT = 0x110
MIDDLE = 0x112
MISC = 0x100
MODE = 0x13c
MOUSE = 0x110
PINKIE = 0x125
RIGHT = 0x111
SELECT = 0x13a
SIDE = 0x113
START = 0x13b
STYLUS = 0x14b
STYLUS2 = 0x14c
TASK = 0x117
THUMB = 0x121
THUMB2 = 0x122
THUMBL = 0x13d
THUMBR = 0x13e
TL = 0x136
TL2 = 0x138
TOOL_AIRBRUSH = 0x144
TOOL_BRUSH = 0x142
TOOL_DOUBLETAP = 0x14d
TOOL_FINGER = 0x145
TOOL_LENS = 0x147
TOOL_MOUSE = 0x146
TOOL_PEN = 0x140
TOOL_PENCIL = 0x143
TOOL_RUBBER = 0x141
TOOL_TRIPLETAP = 0x14e
TOP = 0x123
TOP2 = 0x124
TOUCH = 0x14a
TR = 0x137
TR2 = 0x139
TRIGGER = 0x120
WHEEL = 0x150
X = 0x133
Y = 0x134
Z = 0x135
end
module EV
ABS = 0x03
FF = 0x15
FF_STATUS = 0x17
KEY = 0x01
LED = 0x11
MAX = 0x1f
MSC = 0x04
PWR = 0x16
REL = 0x02
REP = 0x14
SND = 0x12
SW = 0x05
SYN = 0x00
VERSION = 0x010000
end
module REP
DELAY = 0x00
MAX = 0x01
PERIOD = 0x01
end
module MSC
GESTURE = 0x02
MAX = 0x07
PULSELED = 0x01
RAW = 0x03
SCAN = 0x04
SERIAL = 0x00
end
module ABS
BRAKE = 0x0a
DISTANCE = 0x19
GAS = 0x09
HAT0X = 0x10
HAT0Y = 0x11
HAT1X = 0x12
HAT1Y = 0x13
HAT2X = 0x14
HAT2Y = 0x15
HAT3X = 0x16
HAT3Y = 0x17
MAX = 0x3f
MISC = 0x28
PRESSURE = 0x18
RUDDER = 0x07
RX = 0x03
RY = 0x04
RZ = 0x05
THROTTLE = 0x06
TILT_X = 0x1a
TILT_Y = 0x1b
TOOL_WIDTH = 0x1c
VOLUME = 0x20
WHEEL = 0x08
X = 0x00
Y = 0x01
Z = 0x02
end
module SYN
CONFIG = 1
REPORT = 0
end
module SND
BELL = 0x01
CLICK = 0x00
MAX = 0x07
TONE = 0x02
end
module KEY
KEY_0 = 11
KEY_1 = 2
KEY_102ND = 86
KEY_2 = 3
KEY_3 = 4
KEY_4 = 5
KEY_5 = 6
KEY_6 = 7
KEY_7 = 8
KEY_8 = 9
KEY_9 = 10
A = 30
AB = 0x196
AGAIN = 129
ALTERASE = 222
ANGLE = 0x173
APOSTROPHE = 40
ARCHIVE = 0x169
AUDIO = 0x188
AUX = 0x186
B = 48
BACK = 158
BACKSLASH = 43
BACKSPACE = 14
BASSBOOST = 209
BATTERY = 236
BLUE = 0x191
BOOKMARKS = 156
BREAK = 0x19b
BRIGHTNESSDOWN = 224
BRIGHTNESSUP = 225
BRL_DOT1 = 0x1f1
BRL_DOT2 = 0x1f2
BRL_DOT3 = 0x1f3
BRL_DOT4 = 0x1f4
BRL_DOT5 = 0x1f5
BRL_DOT6 = 0x1f6
BRL_DOT7 = 0x1f7
BRL_DOT8 = 0x1f8
C = 46
CALC = 140
CALENDAR = 0x18d
CAMERA = 212
CANCEL = 223
CAPSLOCK = 58
CD = 0x17f
CHANNEL = 0x16b
CHANNELDOWN = 0x193
CHANNELUP = 0x192
CHAT = 216
CLEAR = 0x163
CLOSE = 206
CLOSECD = 160
COFFEE = 152
COMMA = 51
COMPOSE = 127
COMPUTER = 157
CONFIG = 171
CONNECT = 218
COPY = 133
CUT = 137
CYCLEWINDOWS = 154
D = 32
DELETE = 111
DELETEFILE = 146
DEL_EOL = 0x1c0
DEL_EOS = 0x1c1
DEL_LINE = 0x1c3
DIGITS = 0x19d
DIRECTION = 153
DIRECTORY = 0x18a
DOCUMENTS = 235
DOT = 52
DOWN = 108
DVD = 0x185
E = 18
EDIT = 176
EJECTCD = 161
EJECTCLOSECD = 162
EMAIL = 215
KEY_END = 107
ENTER = 28
EPG = 0x16d
EQUAL = 13
ESC = 1
EXIT = 174
F = 33
F1 = 59
F10 = 68
F11 = 87
F12 = 88
F13 = 183
F14 = 184
F15 = 185
F16 = 186
F17 = 187
F18 = 188
F19 = 189
F2 = 60
F20 = 190
F21 = 191
F22 = 192
F23 = 193
F24 = 194
F3 = 61
F4 = 62
F5 = 63
F6 = 64
F7 = 65
F8 = 66
F9 = 67
FASTFORWARD = 208
FAVORITES = 0x16c
FILE = 144
FINANCE = 219
FIND = 136
FIRST = 0x194
FN = 0x1d0
FN_1 = 0x1de
FN_2 = 0x1df
FN_B = 0x1e4
FN_D = 0x1e0
FN_E = 0x1e1
FN_ESC = 0x1d1
FN_F = 0x1e2
FN_F1 = 0x1d2
FN_F10 = 0x1db
FN_F11 = 0x1dc
FN_F12 = 0x1dd
FN_F2 = 0x1d3
FN_F3 = 0x1d4
FN_F4 = 0x1d5
FN_F5 = 0x1d6
FN_F6 = 0x1d7
FN_F7 = 0x1d8
FN_F8 = 0x1d9
FN_F9 = 0x1da
FN_S = 0x1e3
FORWARD = 159
FORWARDMAIL = 233
FRONT = 132
G = 34
GOTO = 0x162
GRAVE = 41
GREEN = 0x18f
H = 35
HANGEUL = 122
HANJA = 123
HELP = 138
HENKAN = 92
HIRAGANA = 91
HOME = 102
HOMEPAGE = 172
HP = 211
I = 23
INFO = 0x166
INSERT = 110
INS_LINE = 0x1c2
ISO = 170
J = 36
K = 37
KATAKANA = 90
KATAKANAHIRAGANA = 93
KBDILLUMDOWN = 229
KBDILLUMTOGGLE = 228
KBDILLUMUP = 230
KEYBOARD = 0x176
KP0 = 82
KP1 = 79
KP2 = 80
KP3 = 81
KP4 = 75
KP5 = 76
KP6 = 77
KP7 = 71
KP8 = 72
KP9 = 73
KPASTERISK = 55
KPCOMMA = 121
KPDOT = 83
KPENTER = 96
KPEQUAL = 117
KPJPCOMMA = 95
KPLEFTPAREN = 179
KPMINUS = 74
KPPLUS = 78
KPPLUSMINUS = 118
KPRIGHTPAREN = 180
KPSLASH = 98
L = 38
LANGUAGE = 0x170
LAST = 0x195
LEFT = 105
LEFTALT = 56
LEFTBRACE = 26
LEFTCTRL = 29
LEFTMETA = 125
LEFTSHIFT = 42
LINEFEED = 101
LIST = 0x18b
M = 50
MACRO = 112
MAIL = 155
MAX = 0x1ff
MEDIA = 226
MEMO = 0x18c
MENU = 139
MHP = 0x16f
MINUS = 12
MODE = 0x175
MOVE = 175
MP3 = 0x187
MSDOS = 151
MUHENKAN = 94
MUTE = 113
N = 49
NEW = 181
NEXT = 0x197
NEXTSONG = 163
NUMLOCK = 69
O = 24
OK = 0x160
OPEN = 134
OPTION = 0x165
P = 25
PAGEDOWN = 109
PAGEUP = 104
PASTE = 135
PAUSE = 119
PAUSECD = 201
PC = 0x178
PHONE = 169
PLAY = 207
PLAYCD = 200
PLAYER = 0x183
PLAYPAUSE = 164
POWER = 116
POWER2 = 0x164
PREVIOUS = 0x19c
PREVIOUSSONG = 165
PRINT = 210
PROG1 = 148
PROG2 = 149
PROG3 = 202
PROG4 = 203
PROGRAM = 0x16a
PROPS = 130
PVR = 0x16e
Q = 16
QUESTION = 214
R = 19
RADIO = 0x181
RECORD = 167
RED = 0x18e
REDO = 182
REFRESH = 173
REPLY = 232
RESERVED = 0
RESTART = 0x198
REWIND = 168
RIGHT = 106
RIGHTALT = 100
RIGHTBRACE = 27
RIGHTCTRL = 97
RIGHTMETA = 126
RIGHTSHIFT = 54
RO = 89
S = 31
SAT = 0x17d
SAT2 = 0x17e
SAVE = 234
SCREEN = 0x177
SCROLLDOWN = 178
SCROLLLOCK = 70
SCROLLUP = 177
SEARCH = 217
SELECT = 0x161
SEMICOLON = 39
SEND = 231
SENDFILE = 145
SETUP = 141
SHOP = 221
SHUFFLE = 0x19a
SLASH = 53
SLEEP = 142
SLOW = 0x199
SOUND = 213
SPACE = 57
SPORT = 220
STOP = 128
STOPCD = 166
SUBTITLE = 0x172
SUSPEND = 205
SWITCHVIDEOMODE = 227
SYSRQ = 99
T = 20
TAB = 15
TAPE = 0x180
TEEN = 0x19e
TEXT = 0x184
TIME = 0x167
TITLE = 0x171
TUNER = 0x182
TV = 0x179
TV2 = 0x17a
TWEN = 0x19f
U = 22
UNDO = 131
UNKNOWN = 240
UP = 103
V = 47
VCR = 0x17b
VCR2 = 0x17c
VENDOR = 0x168
VIDEO = 0x189
VOLUMEDOWN = 114
VOLUMEUP = 115
W = 17
WAKEUP = 143
WWW = 150
X = 45
XFER = 147
Y = 21
YELLOW = 0x190
YEN = 124
Z = 44
ZENKAKUHANKAKU = 85
ZOOM = 0x174
end
end