-
Notifications
You must be signed in to change notification settings - Fork 0
/
codes.go
962 lines (911 loc) · 48.3 KB
/
codes.go
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
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
package input
// Code generated by go generate; DO NOT EDIT.
func evCode(ev EVCode, c uint16) Coder {
switch ev {
case EV_SYN:
return SYNCode(c)
case EV_KEY:
return KEYCode(c)
case EV_REL:
return RELCode(c)
case EV_ABS:
return ABSCode(c)
case EV_MSC:
return MSCCode(c)
case EV_SW:
return SWCode(c)
case EV_LED:
return LEDCode(c)
case EV_SND:
return SNDCode(c)
case EV_REP:
return REPCode(c)
}
return Code(c)
}
type ABSCode Code
func (c ABSCode) Code() Code {
return Code(c)
}
func (c ABSCode) String() string {
m := map[ABSCode]string{0x00: "ABS_X", 0x01: "ABS_Y", 0x02: "ABS_Z", 0x03: "ABS_RX", 0x04: "ABS_RY", 0x05: "ABS_RZ", 0x06: "ABS_THROTTLE", 0x07: "ABS_RUDDER", 0x08: "ABS_WHEEL", 0x09: "ABS_GAS", 0x0a: "ABS_BRAKE", 0x10: "ABS_HAT0X", 0x11: "ABS_HAT0Y", 0x12: "ABS_HAT1X", 0x13: "ABS_HAT1Y", 0x14: "ABS_HAT2X", 0x15: "ABS_HAT2Y", 0x16: "ABS_HAT3X", 0x17: "ABS_HAT3Y", 0x18: "ABS_PRESSURE", 0x19: "ABS_DISTANCE", 0x1a: "ABS_TILT_X", 0x1b: "ABS_TILT_Y", 0x1c: "ABS_TOOL_WIDTH", 0x20: "ABS_VOLUME", 0x28: "ABS_MISC", 0x2e: "ABS_RESERVED", 0x2f: "ABS_MT_SLOT", 0x30: "ABS_MT_TOUCH_MAJOR", 0x31: "ABS_MT_TOUCH_MINOR", 0x32: "ABS_MT_WIDTH_MAJOR", 0x33: "ABS_MT_WIDTH_MINOR", 0x34: "ABS_MT_ORIENTATION", 0x35: "ABS_MT_POSITION_X", 0x36: "ABS_MT_POSITION_Y", 0x37: "ABS_MT_TOOL_TYPE", 0x38: "ABS_MT_BLOB_ID", 0x39: "ABS_MT_TRACKING_ID", 0x3a: "ABS_MT_PRESSURE", 0x3b: "ABS_MT_DISTANCE", 0x3c: "ABS_MT_TOOL_X", 0x3d: "ABS_MT_TOOL_Y", 0x3f: "ABS_MAX", (ABS_MAX + 1): "ABS_CNT"}
return m[c]
}
// ABS
const (
ABS_X ABSCode = 0x00
ABS_Y ABSCode = 0x01
ABS_Z ABSCode = 0x02
ABS_RX ABSCode = 0x03
ABS_RY ABSCode = 0x04
ABS_RZ ABSCode = 0x05
ABS_THROTTLE ABSCode = 0x06
ABS_RUDDER ABSCode = 0x07
ABS_WHEEL ABSCode = 0x08
ABS_GAS ABSCode = 0x09
ABS_BRAKE ABSCode = 0x0a
ABS_HAT0X ABSCode = 0x10
ABS_HAT0Y ABSCode = 0x11
ABS_HAT1X ABSCode = 0x12
ABS_HAT1Y ABSCode = 0x13
ABS_HAT2X ABSCode = 0x14
ABS_HAT2Y ABSCode = 0x15
ABS_HAT3X ABSCode = 0x16
ABS_HAT3Y ABSCode = 0x17
ABS_PRESSURE ABSCode = 0x18
ABS_DISTANCE ABSCode = 0x19
ABS_TILT_X ABSCode = 0x1a
ABS_TILT_Y ABSCode = 0x1b
ABS_TOOL_WIDTH ABSCode = 0x1c
ABS_VOLUME ABSCode = 0x20
ABS_MISC ABSCode = 0x28
ABS_RESERVED ABSCode = 0x2e
ABS_MT_SLOT ABSCode = 0x2f
ABS_MT_TOUCH_MAJOR ABSCode = 0x30
ABS_MT_TOUCH_MINOR ABSCode = 0x31
ABS_MT_WIDTH_MAJOR ABSCode = 0x32
ABS_MT_WIDTH_MINOR ABSCode = 0x33
ABS_MT_ORIENTATION ABSCode = 0x34
ABS_MT_POSITION_X ABSCode = 0x35
ABS_MT_POSITION_Y ABSCode = 0x36
ABS_MT_TOOL_TYPE ABSCode = 0x37
ABS_MT_BLOB_ID ABSCode = 0x38
ABS_MT_TRACKING_ID ABSCode = 0x39
ABS_MT_PRESSURE ABSCode = 0x3a
ABS_MT_DISTANCE ABSCode = 0x3b
ABS_MT_TOOL_X ABSCode = 0x3c
ABS_MT_TOOL_Y ABSCode = 0x3d
ABS_MAX ABSCode = 0x3f
ABS_CNT ABSCode = (ABS_MAX + 1)
)
type BTNCode Code
func (c BTNCode) Code() Code {
return Code(c)
}
func (c BTNCode) String() string {
m := map[BTNCode]string{0x100: "BTN_MISC", 0x101: "BTN_1", 0x102: "BTN_2", 0x103: "BTN_3", 0x104: "BTN_4", 0x105: "BTN_5", 0x106: "BTN_6", 0x107: "BTN_7", 0x108: "BTN_8", 0x109: "BTN_9", 0x110: "BTN_MOUSE", 0x111: "BTN_RIGHT", 0x112: "BTN_MIDDLE", 0x113: "BTN_SIDE", 0x114: "BTN_EXTRA", 0x115: "BTN_FORWARD", 0x116: "BTN_BACK", 0x117: "BTN_TASK", 0x120: "BTN_JOYSTICK", 0x121: "BTN_THUMB", 0x122: "BTN_THUMB2", 0x123: "BTN_TOP", 0x124: "BTN_TOP2", 0x125: "BTN_PINKIE", 0x126: "BTN_BASE", 0x127: "BTN_BASE2", 0x128: "BTN_BASE3", 0x129: "BTN_BASE4", 0x12a: "BTN_BASE5", 0x12b: "BTN_BASE6", 0x12f: "BTN_DEAD", 0x130: "BTN_GAMEPAD", 0x131: "BTN_EAST", 0x132: "BTN_C", 0x133: "BTN_NORTH", 0x134: "BTN_WEST", 0x135: "BTN_Z", 0x136: "BTN_TL", 0x137: "BTN_TR", 0x138: "BTN_TL2", 0x139: "BTN_TR2", 0x13a: "BTN_SELECT", 0x13b: "BTN_START", 0x13c: "BTN_MODE", 0x13d: "BTN_THUMBL", 0x13e: "BTN_THUMBR", 0x140: "BTN_DIGI", 0x141: "BTN_TOOL_RUBBER", 0x142: "BTN_TOOL_BRUSH", 0x143: "BTN_TOOL_PENCIL", 0x144: "BTN_TOOL_AIRBRUSH", 0x145: "BTN_TOOL_FINGER", 0x146: "BTN_TOOL_MOUSE", 0x147: "BTN_TOOL_LENS", 0x148: "BTN_TOOL_QUINTTAP", 0x149: "BTN_STYLUS3", 0x14a: "BTN_TOUCH", 0x14b: "BTN_STYLUS", 0x14c: "BTN_STYLUS2", 0x14d: "BTN_TOOL_DOUBLETAP", 0x14e: "BTN_TOOL_TRIPLETAP", 0x14f: "BTN_TOOL_QUADTAP", 0x150: "BTN_WHEEL", 0x151: "BTN_GEAR_UP", 0x220: "BTN_DPAD_UP", 0x221: "BTN_DPAD_DOWN", 0x222: "BTN_DPAD_LEFT", 0x223: "BTN_DPAD_RIGHT", 0x2c0: "BTN_TRIGGER_HAPPY", 0x2c1: "BTN_TRIGGER_HAPPY2", 0x2c2: "BTN_TRIGGER_HAPPY3", 0x2c3: "BTN_TRIGGER_HAPPY4", 0x2c4: "BTN_TRIGGER_HAPPY5", 0x2c5: "BTN_TRIGGER_HAPPY6", 0x2c6: "BTN_TRIGGER_HAPPY7", 0x2c7: "BTN_TRIGGER_HAPPY8", 0x2c8: "BTN_TRIGGER_HAPPY9", 0x2c9: "BTN_TRIGGER_HAPPY10", 0x2ca: "BTN_TRIGGER_HAPPY11", 0x2cb: "BTN_TRIGGER_HAPPY12", 0x2cc: "BTN_TRIGGER_HAPPY13", 0x2cd: "BTN_TRIGGER_HAPPY14", 0x2ce: "BTN_TRIGGER_HAPPY15", 0x2cf: "BTN_TRIGGER_HAPPY16", 0x2d0: "BTN_TRIGGER_HAPPY17", 0x2d1: "BTN_TRIGGER_HAPPY18", 0x2d2: "BTN_TRIGGER_HAPPY19", 0x2d3: "BTN_TRIGGER_HAPPY20", 0x2d4: "BTN_TRIGGER_HAPPY21", 0x2d5: "BTN_TRIGGER_HAPPY22", 0x2d6: "BTN_TRIGGER_HAPPY23", 0x2d7: "BTN_TRIGGER_HAPPY24", 0x2d8: "BTN_TRIGGER_HAPPY25", 0x2d9: "BTN_TRIGGER_HAPPY26", 0x2da: "BTN_TRIGGER_HAPPY27", 0x2db: "BTN_TRIGGER_HAPPY28", 0x2dc: "BTN_TRIGGER_HAPPY29", 0x2dd: "BTN_TRIGGER_HAPPY30", 0x2de: "BTN_TRIGGER_HAPPY31", 0x2df: "BTN_TRIGGER_HAPPY32", 0x2e0: "BTN_TRIGGER_HAPPY33", 0x2e1: "BTN_TRIGGER_HAPPY34", 0x2e2: "BTN_TRIGGER_HAPPY35", 0x2e3: "BTN_TRIGGER_HAPPY36", 0x2e4: "BTN_TRIGGER_HAPPY37", 0x2e5: "BTN_TRIGGER_HAPPY38", 0x2e6: "BTN_TRIGGER_HAPPY39", 0x2e7: "BTN_TRIGGER_HAPPY40"}
return m[c]
}
// BTN
const (
BTN_MISC BTNCode = 0x100
BTN_0 BTNCode = 0x100
BTN_1 BTNCode = 0x101
BTN_2 BTNCode = 0x102
BTN_3 BTNCode = 0x103
BTN_4 BTNCode = 0x104
BTN_5 BTNCode = 0x105
BTN_6 BTNCode = 0x106
BTN_7 BTNCode = 0x107
BTN_8 BTNCode = 0x108
BTN_9 BTNCode = 0x109
BTN_MOUSE BTNCode = 0x110
BTN_LEFT BTNCode = 0x110
BTN_RIGHT BTNCode = 0x111
BTN_MIDDLE BTNCode = 0x112
BTN_SIDE BTNCode = 0x113
BTN_EXTRA BTNCode = 0x114
BTN_FORWARD BTNCode = 0x115
BTN_BACK BTNCode = 0x116
BTN_TASK BTNCode = 0x117
BTN_JOYSTICK BTNCode = 0x120
BTN_TRIGGER BTNCode = 0x120
BTN_THUMB BTNCode = 0x121
BTN_THUMB2 BTNCode = 0x122
BTN_TOP BTNCode = 0x123
BTN_TOP2 BTNCode = 0x124
BTN_PINKIE BTNCode = 0x125
BTN_BASE BTNCode = 0x126
BTN_BASE2 BTNCode = 0x127
BTN_BASE3 BTNCode = 0x128
BTN_BASE4 BTNCode = 0x129
BTN_BASE5 BTNCode = 0x12a
BTN_BASE6 BTNCode = 0x12b
BTN_DEAD BTNCode = 0x12f
BTN_GAMEPAD BTNCode = 0x130
BTN_SOUTH BTNCode = 0x130
BTN_A BTNCode = BTN_SOUTH
BTN_EAST BTNCode = 0x131
BTN_B BTNCode = BTN_EAST
BTN_C BTNCode = 0x132
BTN_NORTH BTNCode = 0x133
BTN_X BTNCode = BTN_NORTH
BTN_WEST BTNCode = 0x134
BTN_Y BTNCode = BTN_WEST
BTN_Z BTNCode = 0x135
BTN_TL BTNCode = 0x136
BTN_TR BTNCode = 0x137
BTN_TL2 BTNCode = 0x138
BTN_TR2 BTNCode = 0x139
BTN_SELECT BTNCode = 0x13a
BTN_START BTNCode = 0x13b
BTN_MODE BTNCode = 0x13c
BTN_THUMBL BTNCode = 0x13d
BTN_THUMBR BTNCode = 0x13e
BTN_DIGI BTNCode = 0x140
BTN_TOOL_PEN BTNCode = 0x140
BTN_TOOL_RUBBER BTNCode = 0x141
BTN_TOOL_BRUSH BTNCode = 0x142
BTN_TOOL_PENCIL BTNCode = 0x143
BTN_TOOL_AIRBRUSH BTNCode = 0x144
BTN_TOOL_FINGER BTNCode = 0x145
BTN_TOOL_MOUSE BTNCode = 0x146
BTN_TOOL_LENS BTNCode = 0x147
BTN_TOOL_QUINTTAP BTNCode = 0x148
BTN_STYLUS3 BTNCode = 0x149
BTN_TOUCH BTNCode = 0x14a
BTN_STYLUS BTNCode = 0x14b
BTN_STYLUS2 BTNCode = 0x14c
BTN_TOOL_DOUBLETAP BTNCode = 0x14d
BTN_TOOL_TRIPLETAP BTNCode = 0x14e
BTN_TOOL_QUADTAP BTNCode = 0x14f
BTN_WHEEL BTNCode = 0x150
BTN_GEAR_DOWN BTNCode = 0x150
BTN_GEAR_UP BTNCode = 0x151
BTN_DPAD_UP BTNCode = 0x220
BTN_DPAD_DOWN BTNCode = 0x221
BTN_DPAD_LEFT BTNCode = 0x222
BTN_DPAD_RIGHT BTNCode = 0x223
BTN_TRIGGER_HAPPY BTNCode = 0x2c0
BTN_TRIGGER_HAPPY1 BTNCode = 0x2c0
BTN_TRIGGER_HAPPY2 BTNCode = 0x2c1
BTN_TRIGGER_HAPPY3 BTNCode = 0x2c2
BTN_TRIGGER_HAPPY4 BTNCode = 0x2c3
BTN_TRIGGER_HAPPY5 BTNCode = 0x2c4
BTN_TRIGGER_HAPPY6 BTNCode = 0x2c5
BTN_TRIGGER_HAPPY7 BTNCode = 0x2c6
BTN_TRIGGER_HAPPY8 BTNCode = 0x2c7
BTN_TRIGGER_HAPPY9 BTNCode = 0x2c8
BTN_TRIGGER_HAPPY10 BTNCode = 0x2c9
BTN_TRIGGER_HAPPY11 BTNCode = 0x2ca
BTN_TRIGGER_HAPPY12 BTNCode = 0x2cb
BTN_TRIGGER_HAPPY13 BTNCode = 0x2cc
BTN_TRIGGER_HAPPY14 BTNCode = 0x2cd
BTN_TRIGGER_HAPPY15 BTNCode = 0x2ce
BTN_TRIGGER_HAPPY16 BTNCode = 0x2cf
BTN_TRIGGER_HAPPY17 BTNCode = 0x2d0
BTN_TRIGGER_HAPPY18 BTNCode = 0x2d1
BTN_TRIGGER_HAPPY19 BTNCode = 0x2d2
BTN_TRIGGER_HAPPY20 BTNCode = 0x2d3
BTN_TRIGGER_HAPPY21 BTNCode = 0x2d4
BTN_TRIGGER_HAPPY22 BTNCode = 0x2d5
BTN_TRIGGER_HAPPY23 BTNCode = 0x2d6
BTN_TRIGGER_HAPPY24 BTNCode = 0x2d7
BTN_TRIGGER_HAPPY25 BTNCode = 0x2d8
BTN_TRIGGER_HAPPY26 BTNCode = 0x2d9
BTN_TRIGGER_HAPPY27 BTNCode = 0x2da
BTN_TRIGGER_HAPPY28 BTNCode = 0x2db
BTN_TRIGGER_HAPPY29 BTNCode = 0x2dc
BTN_TRIGGER_HAPPY30 BTNCode = 0x2dd
BTN_TRIGGER_HAPPY31 BTNCode = 0x2de
BTN_TRIGGER_HAPPY32 BTNCode = 0x2df
BTN_TRIGGER_HAPPY33 BTNCode = 0x2e0
BTN_TRIGGER_HAPPY34 BTNCode = 0x2e1
BTN_TRIGGER_HAPPY35 BTNCode = 0x2e2
BTN_TRIGGER_HAPPY36 BTNCode = 0x2e3
BTN_TRIGGER_HAPPY37 BTNCode = 0x2e4
BTN_TRIGGER_HAPPY38 BTNCode = 0x2e5
BTN_TRIGGER_HAPPY39 BTNCode = 0x2e6
BTN_TRIGGER_HAPPY40 BTNCode = 0x2e7
)
type EVCode Code
func (c EVCode) Code() Code {
return Code(c)
}
func (c EVCode) String() string {
m := map[EVCode]string{0x00: "EV_SYN", 0x01: "EV_KEY", 0x02: "EV_REL", 0x03: "EV_ABS", 0x04: "EV_MSC", 0x05: "EV_SW", 0x11: "EV_LED", 0x12: "EV_SND", 0x14: "EV_REP", 0x15: "EV_FF", 0x16: "EV_PWR", 0x17: "EV_FF_STATUS", 0x1f: "EV_MAX", (EV_MAX + 1): "EV_CNT"}
return m[c]
}
// EV
const (
EV_SYN EVCode = 0x00
EV_KEY EVCode = 0x01
EV_REL EVCode = 0x02
EV_ABS EVCode = 0x03
EV_MSC EVCode = 0x04
EV_SW EVCode = 0x05
EV_LED EVCode = 0x11
EV_SND EVCode = 0x12
EV_REP EVCode = 0x14
EV_FF EVCode = 0x15
EV_PWR EVCode = 0x16
EV_FF_STATUS EVCode = 0x17
EV_MAX EVCode = 0x1f
EV_CNT EVCode = (EV_MAX + 1)
)
type INPUTCode Code
func (c INPUTCode) Code() Code {
return Code(c)
}
func (c INPUTCode) String() string {
m := map[INPUTCode]string{0x00: "INPUT_PROP_POINTER", 0x01: "INPUT_PROP_DIRECT", 0x02: "INPUT_PROP_BUTTONPAD", 0x03: "INPUT_PROP_SEMI_MT", 0x04: "INPUT_PROP_TOPBUTTONPAD", 0x05: "INPUT_PROP_POINTING_STICK", 0x06: "INPUT_PROP_ACCELEROMETER", 0x1f: "INPUT_PROP_MAX", (INPUT_PROP_MAX + 1): "INPUT_PROP_CNT"}
return m[c]
}
// INPUT
const (
INPUT_PROP_POINTER INPUTCode = 0x00
INPUT_PROP_DIRECT INPUTCode = 0x01
INPUT_PROP_BUTTONPAD INPUTCode = 0x02
INPUT_PROP_SEMI_MT INPUTCode = 0x03
INPUT_PROP_TOPBUTTONPAD INPUTCode = 0x04
INPUT_PROP_POINTING_STICK INPUTCode = 0x05
INPUT_PROP_ACCELEROMETER INPUTCode = 0x06
INPUT_PROP_MAX INPUTCode = 0x1f
INPUT_PROP_CNT INPUTCode = (INPUT_PROP_MAX + 1)
)
type KEYCode Code
func (c KEYCode) Code() Code {
return Code(c)
}
func (c KEYCode) String() string {
m := map[KEYCode]string{0: "KEY_RESERVED", 1: "KEY_ESC", 2: "KEY_1", 3: "KEY_2", 4: "KEY_3", 5: "KEY_4", 6: "KEY_5", 7: "KEY_6", 8: "KEY_7", 9: "KEY_8", 10: "KEY_9", 11: "KEY_0", 12: "KEY_MINUS", 13: "KEY_EQUAL", 14: "KEY_BACKSPACE", 15: "KEY_TAB", 16: "KEY_Q", 17: "KEY_W", 18: "KEY_E", 19: "KEY_R", 20: "KEY_T", 21: "KEY_Y", 22: "KEY_U", 23: "KEY_I", 24: "KEY_O", 25: "KEY_P", 26: "KEY_LEFTBRACE", 27: "KEY_RIGHTBRACE", 28: "KEY_ENTER", 29: "KEY_LEFTCTRL", 30: "KEY_A", 31: "KEY_S", 32: "KEY_D", 33: "KEY_F", 34: "KEY_G", 35: "KEY_H", 36: "KEY_J", 37: "KEY_K", 38: "KEY_L", 39: "KEY_SEMICOLON", 40: "KEY_APOSTROPHE", 41: "KEY_GRAVE", 42: "KEY_LEFTSHIFT", 43: "KEY_BACKSLASH", 44: "KEY_Z", 45: "KEY_X", 46: "KEY_C", 47: "KEY_V", 48: "KEY_B", 49: "KEY_N", 50: "KEY_M", 51: "KEY_COMMA", 52: "KEY_DOT", 53: "KEY_SLASH", 54: "KEY_RIGHTSHIFT", 55: "KEY_KPASTERISK", 56: "KEY_LEFTALT", 57: "KEY_SPACE", 58: "KEY_CAPSLOCK", 59: "KEY_F1", 60: "KEY_F2", 61: "KEY_F3", 62: "KEY_F4", 63: "KEY_F5", 64: "KEY_F6", 65: "KEY_F7", 66: "KEY_F8", 67: "KEY_F9", 68: "KEY_F10", 69: "KEY_NUMLOCK", 70: "KEY_SCROLLLOCK", 71: "KEY_KP7", 72: "KEY_KP8", 73: "KEY_KP9", 74: "KEY_KPMINUS", 75: "KEY_KP4", 76: "KEY_KP5", 77: "KEY_KP6", 78: "KEY_KPPLUS", 79: "KEY_KP1", 80: "KEY_KP2", 81: "KEY_KP3", 82: "KEY_KP0", 83: "KEY_KPDOT", 85: "KEY_ZENKAKUHANKAKU", 86: "KEY_102ND", 87: "KEY_F11", 88: "KEY_F12", 89: "KEY_RO", 90: "KEY_KATAKANA", 91: "KEY_HIRAGANA", 92: "KEY_HENKAN", 93: "KEY_KATAKANAHIRAGANA", 94: "KEY_MUHENKAN", 95: "KEY_KPJPCOMMA", 96: "KEY_KPENTER", 97: "KEY_RIGHTCTRL", 98: "KEY_KPSLASH", 99: "KEY_SYSRQ", 100: "KEY_RIGHTALT", 101: "KEY_LINEFEED", 102: "KEY_HOME", 103: "KEY_UP", 104: "KEY_PAGEUP", 105: "KEY_LEFT", 106: "KEY_RIGHT", 107: "KEY_END", 108: "KEY_DOWN", 109: "KEY_PAGEDOWN", 110: "KEY_INSERT", 111: "KEY_DELETE", 112: "KEY_MACRO", 113: "KEY_MUTE", 114: "KEY_VOLUMEDOWN", 115: "KEY_VOLUMEUP", 116: "KEY_POWER", 117: "KEY_KPEQUAL", 118: "KEY_KPPLUSMINUS", 119: "KEY_PAUSE", 120: "KEY_SCALE", 121: "KEY_KPCOMMA", 122: "KEY_HANGEUL", 123: "KEY_HANJA", 124: "KEY_YEN", 125: "KEY_LEFTMETA", 126: "KEY_RIGHTMETA", 127: "KEY_COMPOSE", 128: "KEY_STOP", 129: "KEY_AGAIN", 130: "KEY_PROPS", 131: "KEY_UNDO", 132: "KEY_FRONT", 133: "KEY_COPY", 134: "KEY_OPEN", 135: "KEY_PASTE", 136: "KEY_FIND", 137: "KEY_CUT", 138: "KEY_HELP", 139: "KEY_MENU", 140: "KEY_CALC", 141: "KEY_SETUP", 142: "KEY_SLEEP", 143: "KEY_WAKEUP", 144: "KEY_FILE", 145: "KEY_SENDFILE", 146: "KEY_DELETEFILE", 147: "KEY_XFER", 148: "KEY_PROG1", 149: "KEY_PROG2", 150: "KEY_WWW", 151: "KEY_MSDOS", 152: "KEY_COFFEE", 153: "KEY_ROTATE_DISPLAY", 154: "KEY_CYCLEWINDOWS", 155: "KEY_MAIL", 156: "KEY_BOOKMARKS", 157: "KEY_COMPUTER", 158: "KEY_BACK", 159: "KEY_FORWARD", 160: "KEY_CLOSECD", 161: "KEY_EJECTCD", 162: "KEY_EJECTCLOSECD", 163: "KEY_NEXTSONG", 164: "KEY_PLAYPAUSE", 165: "KEY_PREVIOUSSONG", 166: "KEY_STOPCD", 167: "KEY_RECORD", 168: "KEY_REWIND", 169: "KEY_PHONE", 170: "KEY_ISO", 171: "KEY_CONFIG", 172: "KEY_HOMEPAGE", 173: "KEY_REFRESH", 174: "KEY_EXIT", 175: "KEY_MOVE", 176: "KEY_EDIT", 177: "KEY_SCROLLUP", 178: "KEY_SCROLLDOWN", 179: "KEY_KPLEFTPAREN", 180: "KEY_KPRIGHTPAREN", 181: "KEY_NEW", 182: "KEY_REDO", 183: "KEY_F13", 184: "KEY_F14", 185: "KEY_F15", 186: "KEY_F16", 187: "KEY_F17", 188: "KEY_F18", 189: "KEY_F19", 190: "KEY_F20", 191: "KEY_F21", 192: "KEY_F22", 193: "KEY_F23", 194: "KEY_F24", 200: "KEY_PLAYCD", 201: "KEY_PAUSECD", 202: "KEY_PROG3", 203: "KEY_PROG4", 204: "KEY_DASHBOARD", 205: "KEY_SUSPEND", 206: "KEY_CLOSE", 207: "KEY_PLAY", 208: "KEY_FASTFORWARD", 209: "KEY_BASSBOOST", 210: "KEY_PRINT", 211: "KEY_HP", 212: "KEY_CAMERA", 213: "KEY_SOUND", 214: "KEY_QUESTION", 215: "KEY_EMAIL", 216: "KEY_CHAT", 217: "KEY_SEARCH", 218: "KEY_CONNECT", 219: "KEY_FINANCE", 220: "KEY_SPORT", 221: "KEY_SHOP", 222: "KEY_ALTERASE", 223: "KEY_CANCEL", 224: "KEY_BRIGHTNESSDOWN", 225: "KEY_BRIGHTNESSUP", 226: "KEY_MEDIA", 227: "KEY_SWITCHVIDEOMODE", 228: "KEY_KBDILLUMTOGGLE", 229: "KEY_KBDILLUMDOWN", 230: "KEY_KBDILLUMUP", 231: "KEY_SEND", 232: "KEY_REPLY", 233: "KEY_FORWARDMAIL", 234: "KEY_SAVE", 235: "KEY_DOCUMENTS", 236: "KEY_BATTERY", 237: "KEY_BLUETOOTH", 238: "KEY_WLAN", 239: "KEY_UWB", 240: "KEY_UNKNOWN", 241: "KEY_VIDEO_NEXT", 242: "KEY_VIDEO_PREV", 243: "KEY_BRIGHTNESS_CYCLE", 244: "KEY_BRIGHTNESS_AUTO", 245: "KEY_DISPLAY_OFF", 246: "KEY_WWAN", 247: "KEY_RFKILL", 248: "KEY_MICMUTE", 0x160: "KEY_OK", 0x161: "KEY_SELECT", 0x162: "KEY_GOTO", 0x163: "KEY_CLEAR", 0x164: "KEY_POWER2", 0x165: "KEY_OPTION", 0x166: "KEY_INFO", 0x167: "KEY_TIME", 0x168: "KEY_VENDOR", 0x169: "KEY_ARCHIVE", 0x16a: "KEY_PROGRAM", 0x16b: "KEY_CHANNEL", 0x16c: "KEY_FAVORITES", 0x16d: "KEY_EPG", 0x16e: "KEY_PVR", 0x16f: "KEY_MHP", 0x170: "KEY_LANGUAGE", 0x171: "KEY_TITLE", 0x172: "KEY_SUBTITLE", 0x173: "KEY_ANGLE", 0x174: "KEY_FULL_SCREEN", 0x175: "KEY_MODE", 0x176: "KEY_KEYBOARD", 0x177: "KEY_ASPECT_RATIO", 0x178: "KEY_PC", 0x179: "KEY_TV", 0x17a: "KEY_TV2", 0x17b: "KEY_VCR", 0x17c: "KEY_VCR2", 0x17d: "KEY_SAT", 0x17e: "KEY_SAT2", 0x17f: "KEY_CD", 0x180: "KEY_TAPE", 0x181: "KEY_RADIO", 0x182: "KEY_TUNER", 0x183: "KEY_PLAYER", 0x184: "KEY_TEXT", 0x185: "KEY_DVD", 0x186: "KEY_AUX", 0x187: "KEY_MP3", 0x188: "KEY_AUDIO", 0x189: "KEY_VIDEO", 0x18a: "KEY_DIRECTORY", 0x18b: "KEY_LIST", 0x18c: "KEY_MEMO", 0x18d: "KEY_CALENDAR", 0x18e: "KEY_RED", 0x18f: "KEY_GREEN", 0x190: "KEY_YELLOW", 0x191: "KEY_BLUE", 0x192: "KEY_CHANNELUP", 0x193: "KEY_CHANNELDOWN", 0x194: "KEY_FIRST", 0x195: "KEY_LAST", 0x196: "KEY_AB", 0x197: "KEY_NEXT", 0x198: "KEY_RESTART", 0x199: "KEY_SLOW", 0x19a: "KEY_SHUFFLE", 0x19b: "KEY_BREAK", 0x19c: "KEY_PREVIOUS", 0x19d: "KEY_DIGITS", 0x19e: "KEY_TEEN", 0x19f: "KEY_TWEN", 0x1a0: "KEY_VIDEOPHONE", 0x1a1: "KEY_GAMES", 0x1a2: "KEY_ZOOMIN", 0x1a3: "KEY_ZOOMOUT", 0x1a4: "KEY_ZOOMRESET", 0x1a5: "KEY_WORDPROCESSOR", 0x1a6: "KEY_EDITOR", 0x1a7: "KEY_SPREADSHEET", 0x1a8: "KEY_GRAPHICSEDITOR", 0x1a9: "KEY_PRESENTATION", 0x1aa: "KEY_DATABASE", 0x1ab: "KEY_NEWS", 0x1ac: "KEY_VOICEMAIL", 0x1ad: "KEY_ADDRESSBOOK", 0x1ae: "KEY_MESSENGER", 0x1af: "KEY_DISPLAYTOGGLE", 0x1b0: "KEY_SPELLCHECK", 0x1b1: "KEY_LOGOFF", 0x1b2: "KEY_DOLLAR", 0x1b3: "KEY_EURO", 0x1b4: "KEY_FRAMEBACK", 0x1b5: "KEY_FRAMEFORWARD", 0x1b6: "KEY_CONTEXT_MENU", 0x1b7: "KEY_MEDIA_REPEAT", 0x1b8: "KEY_10CHANNELSUP", 0x1b9: "KEY_10CHANNELSDOWN", 0x1ba: "KEY_IMAGES", 0x1bc: "KEY_NOTIFICATION_CENTER", 0x1bd: "KEY_PICKUP_PHONE", 0x1be: "KEY_HANGUP_PHONE", 0x1c0: "KEY_DEL_EOL", 0x1c1: "KEY_DEL_EOS", 0x1c2: "KEY_INS_LINE", 0x1c3: "KEY_DEL_LINE", 0x1d0: "KEY_FN", 0x1d1: "KEY_FN_ESC", 0x1d2: "KEY_FN_F1", 0x1d3: "KEY_FN_F2", 0x1d4: "KEY_FN_F3", 0x1d5: "KEY_FN_F4", 0x1d6: "KEY_FN_F5", 0x1d7: "KEY_FN_F6", 0x1d8: "KEY_FN_F7", 0x1d9: "KEY_FN_F8", 0x1da: "KEY_FN_F9", 0x1db: "KEY_FN_F10", 0x1dc: "KEY_FN_F11", 0x1dd: "KEY_FN_F12", 0x1de: "KEY_FN_1", 0x1df: "KEY_FN_2", 0x1e0: "KEY_FN_D", 0x1e1: "KEY_FN_E", 0x1e2: "KEY_FN_F", 0x1e3: "KEY_FN_S", 0x1e4: "KEY_FN_B", 0x1e5: "KEY_FN_RIGHT_SHIFT", 0x1f1: "KEY_BRL_DOT1", 0x1f2: "KEY_BRL_DOT2", 0x1f3: "KEY_BRL_DOT3", 0x1f4: "KEY_BRL_DOT4", 0x1f5: "KEY_BRL_DOT5", 0x1f6: "KEY_BRL_DOT6", 0x1f7: "KEY_BRL_DOT7", 0x1f8: "KEY_BRL_DOT8", 0x1f9: "KEY_BRL_DOT9", 0x1fa: "KEY_BRL_DOT10", 0x200: "KEY_NUMERIC_0", 0x201: "KEY_NUMERIC_1", 0x202: "KEY_NUMERIC_2", 0x203: "KEY_NUMERIC_3", 0x204: "KEY_NUMERIC_4", 0x205: "KEY_NUMERIC_5", 0x206: "KEY_NUMERIC_6", 0x207: "KEY_NUMERIC_7", 0x208: "KEY_NUMERIC_8", 0x209: "KEY_NUMERIC_9", 0x20a: "KEY_NUMERIC_STAR", 0x20b: "KEY_NUMERIC_POUND", 0x20c: "KEY_NUMERIC_A", 0x20d: "KEY_NUMERIC_B", 0x20e: "KEY_NUMERIC_C", 0x20f: "KEY_NUMERIC_D", 0x210: "KEY_CAMERA_FOCUS", 0x211: "KEY_WPS_BUTTON", 0x212: "KEY_TOUCHPAD_TOGGLE", 0x213: "KEY_TOUCHPAD_ON", 0x214: "KEY_TOUCHPAD_OFF", 0x215: "KEY_CAMERA_ZOOMIN", 0x216: "KEY_CAMERA_ZOOMOUT", 0x217: "KEY_CAMERA_UP", 0x218: "KEY_CAMERA_DOWN", 0x219: "KEY_CAMERA_LEFT", 0x21a: "KEY_CAMERA_RIGHT", 0x21b: "KEY_ATTENDANT_ON", 0x21c: "KEY_ATTENDANT_OFF", 0x21d: "KEY_ATTENDANT_TOGGLE", 0x21e: "KEY_LIGHTS_TOGGLE", 0x230: "KEY_ALS_TOGGLE", 0x231: "KEY_ROTATE_LOCK_TOGGLE", 0x240: "KEY_BUTTONCONFIG", 0x241: "KEY_TASKMANAGER", 0x242: "KEY_JOURNAL", 0x243: "KEY_CONTROLPANEL", 0x244: "KEY_APPSELECT", 0x245: "KEY_SCREENSAVER", 0x246: "KEY_VOICECOMMAND", 0x247: "KEY_ASSISTANT", 0x248: "KEY_KBD_LAYOUT_NEXT", 0x249: "KEY_EMOJI_PICKER", 0x250: "KEY_BRIGHTNESS_MIN", 0x251: "KEY_BRIGHTNESS_MAX", 0x260: "KEY_KBDINPUTASSIST_PREV", 0x261: "KEY_KBDINPUTASSIST_NEXT", 0x262: "KEY_KBDINPUTASSIST_PREVGROUP", 0x263: "KEY_KBDINPUTASSIST_NEXTGROUP", 0x264: "KEY_KBDINPUTASSIST_ACCEPT", 0x265: "KEY_KBDINPUTASSIST_CANCEL", 0x266: "KEY_RIGHT_UP", 0x267: "KEY_RIGHT_DOWN", 0x268: "KEY_LEFT_UP", 0x269: "KEY_LEFT_DOWN", 0x26a: "KEY_ROOT_MENU", 0x26b: "KEY_MEDIA_TOP_MENU", 0x26c: "KEY_NUMERIC_11", 0x26d: "KEY_NUMERIC_12", 0x26e: "KEY_AUDIO_DESC", 0x26f: "KEY_3D_MODE", 0x270: "KEY_NEXT_FAVORITE", 0x271: "KEY_STOP_RECORD", 0x272: "KEY_PAUSE_RECORD", 0x273: "KEY_VOD", 0x274: "KEY_UNMUTE", 0x275: "KEY_FASTREVERSE", 0x276: "KEY_SLOWREVERSE", 0x277: "KEY_DATA", 0x278: "KEY_ONSCREEN_KEYBOARD", 0x279: "KEY_PRIVACY_SCREEN_TOGGLE", 0x27a: "KEY_SELECTIVE_SCREENSHOT", 0x290: "KEY_MACRO1", 0x291: "KEY_MACRO2", 0x292: "KEY_MACRO3", 0x293: "KEY_MACRO4", 0x294: "KEY_MACRO5", 0x295: "KEY_MACRO6", 0x296: "KEY_MACRO7", 0x297: "KEY_MACRO8", 0x298: "KEY_MACRO9", 0x299: "KEY_MACRO10", 0x29a: "KEY_MACRO11", 0x29b: "KEY_MACRO12", 0x29c: "KEY_MACRO13", 0x29d: "KEY_MACRO14", 0x29e: "KEY_MACRO15", 0x29f: "KEY_MACRO16", 0x2a0: "KEY_MACRO17", 0x2a1: "KEY_MACRO18", 0x2a2: "KEY_MACRO19", 0x2a3: "KEY_MACRO20", 0x2a4: "KEY_MACRO21", 0x2a5: "KEY_MACRO22", 0x2a6: "KEY_MACRO23", 0x2a7: "KEY_MACRO24", 0x2a8: "KEY_MACRO25", 0x2a9: "KEY_MACRO26", 0x2aa: "KEY_MACRO27", 0x2ab: "KEY_MACRO28", 0x2ac: "KEY_MACRO29", 0x2ad: "KEY_MACRO30", 0x2b0: "KEY_MACRO_RECORD_START", 0x2b1: "KEY_MACRO_RECORD_STOP", 0x2b2: "KEY_MACRO_PRESET_CYCLE", 0x2b3: "KEY_MACRO_PRESET1", 0x2b4: "KEY_MACRO_PRESET2", 0x2b5: "KEY_MACRO_PRESET3", 0x2b8: "KEY_KBD_LCD_MENU1", 0x2b9: "KEY_KBD_LCD_MENU2", 0x2ba: "KEY_KBD_LCD_MENU3", 0x2bb: "KEY_KBD_LCD_MENU4", 0x2bc: "KEY_KBD_LCD_MENU5", 0x2ff: "KEY_MAX", (KEY_MAX + 1): "KEY_CNT"}
return m[c]
}
// KEY
const (
KEY_RESERVED KEYCode = 0
KEY_ESC KEYCode = 1
KEY_1 KEYCode = 2
KEY_2 KEYCode = 3
KEY_3 KEYCode = 4
KEY_4 KEYCode = 5
KEY_5 KEYCode = 6
KEY_6 KEYCode = 7
KEY_7 KEYCode = 8
KEY_8 KEYCode = 9
KEY_9 KEYCode = 10
KEY_0 KEYCode = 11
KEY_MINUS KEYCode = 12
KEY_EQUAL KEYCode = 13
KEY_BACKSPACE KEYCode = 14
KEY_TAB KEYCode = 15
KEY_Q KEYCode = 16
KEY_W KEYCode = 17
KEY_E KEYCode = 18
KEY_R KEYCode = 19
KEY_T KEYCode = 20
KEY_Y KEYCode = 21
KEY_U KEYCode = 22
KEY_I KEYCode = 23
KEY_O KEYCode = 24
KEY_P KEYCode = 25
KEY_LEFTBRACE KEYCode = 26
KEY_RIGHTBRACE KEYCode = 27
KEY_ENTER KEYCode = 28
KEY_LEFTCTRL KEYCode = 29
KEY_A KEYCode = 30
KEY_S KEYCode = 31
KEY_D KEYCode = 32
KEY_F KEYCode = 33
KEY_G KEYCode = 34
KEY_H KEYCode = 35
KEY_J KEYCode = 36
KEY_K KEYCode = 37
KEY_L KEYCode = 38
KEY_SEMICOLON KEYCode = 39
KEY_APOSTROPHE KEYCode = 40
KEY_GRAVE KEYCode = 41
KEY_LEFTSHIFT KEYCode = 42
KEY_BACKSLASH KEYCode = 43
KEY_Z KEYCode = 44
KEY_X KEYCode = 45
KEY_C KEYCode = 46
KEY_V KEYCode = 47
KEY_B KEYCode = 48
KEY_N KEYCode = 49
KEY_M KEYCode = 50
KEY_COMMA KEYCode = 51
KEY_DOT KEYCode = 52
KEY_SLASH KEYCode = 53
KEY_RIGHTSHIFT KEYCode = 54
KEY_KPASTERISK KEYCode = 55
KEY_LEFTALT KEYCode = 56
KEY_SPACE KEYCode = 57
KEY_CAPSLOCK KEYCode = 58
KEY_F1 KEYCode = 59
KEY_F2 KEYCode = 60
KEY_F3 KEYCode = 61
KEY_F4 KEYCode = 62
KEY_F5 KEYCode = 63
KEY_F6 KEYCode = 64
KEY_F7 KEYCode = 65
KEY_F8 KEYCode = 66
KEY_F9 KEYCode = 67
KEY_F10 KEYCode = 68
KEY_NUMLOCK KEYCode = 69
KEY_SCROLLLOCK KEYCode = 70
KEY_KP7 KEYCode = 71
KEY_KP8 KEYCode = 72
KEY_KP9 KEYCode = 73
KEY_KPMINUS KEYCode = 74
KEY_KP4 KEYCode = 75
KEY_KP5 KEYCode = 76
KEY_KP6 KEYCode = 77
KEY_KPPLUS KEYCode = 78
KEY_KP1 KEYCode = 79
KEY_KP2 KEYCode = 80
KEY_KP3 KEYCode = 81
KEY_KP0 KEYCode = 82
KEY_KPDOT KEYCode = 83
KEY_ZENKAKUHANKAKU KEYCode = 85
KEY_102ND KEYCode = 86
KEY_F11 KEYCode = 87
KEY_F12 KEYCode = 88
KEY_RO KEYCode = 89
KEY_KATAKANA KEYCode = 90
KEY_HIRAGANA KEYCode = 91
KEY_HENKAN KEYCode = 92
KEY_KATAKANAHIRAGANA KEYCode = 93
KEY_MUHENKAN KEYCode = 94
KEY_KPJPCOMMA KEYCode = 95
KEY_KPENTER KEYCode = 96
KEY_RIGHTCTRL KEYCode = 97
KEY_KPSLASH KEYCode = 98
KEY_SYSRQ KEYCode = 99
KEY_RIGHTALT KEYCode = 100
KEY_LINEFEED KEYCode = 101
KEY_HOME KEYCode = 102
KEY_UP KEYCode = 103
KEY_PAGEUP KEYCode = 104
KEY_LEFT KEYCode = 105
KEY_RIGHT KEYCode = 106
KEY_END KEYCode = 107
KEY_DOWN KEYCode = 108
KEY_PAGEDOWN KEYCode = 109
KEY_INSERT KEYCode = 110
KEY_DELETE KEYCode = 111
KEY_MACRO KEYCode = 112
KEY_MUTE KEYCode = 113
KEY_VOLUMEDOWN KEYCode = 114
KEY_VOLUMEUP KEYCode = 115
KEY_POWER KEYCode = 116
KEY_KPEQUAL KEYCode = 117
KEY_KPPLUSMINUS KEYCode = 118
KEY_PAUSE KEYCode = 119
KEY_SCALE KEYCode = 120
KEY_KPCOMMA KEYCode = 121
KEY_HANGEUL KEYCode = 122
KEY_HANGUEL KEYCode = KEY_HANGEUL
KEY_HANJA KEYCode = 123
KEY_YEN KEYCode = 124
KEY_LEFTMETA KEYCode = 125
KEY_RIGHTMETA KEYCode = 126
KEY_COMPOSE KEYCode = 127
KEY_STOP KEYCode = 128
KEY_AGAIN KEYCode = 129
KEY_PROPS KEYCode = 130
KEY_UNDO KEYCode = 131
KEY_FRONT KEYCode = 132
KEY_COPY KEYCode = 133
KEY_OPEN KEYCode = 134
KEY_PASTE KEYCode = 135
KEY_FIND KEYCode = 136
KEY_CUT KEYCode = 137
KEY_HELP KEYCode = 138
KEY_MENU KEYCode = 139
KEY_CALC KEYCode = 140
KEY_SETUP KEYCode = 141
KEY_SLEEP KEYCode = 142
KEY_WAKEUP KEYCode = 143
KEY_FILE KEYCode = 144
KEY_SENDFILE KEYCode = 145
KEY_DELETEFILE KEYCode = 146
KEY_XFER KEYCode = 147
KEY_PROG1 KEYCode = 148
KEY_PROG2 KEYCode = 149
KEY_WWW KEYCode = 150
KEY_MSDOS KEYCode = 151
KEY_COFFEE KEYCode = 152
KEY_SCREENLOCK KEYCode = KEY_COFFEE
KEY_ROTATE_DISPLAY KEYCode = 153
KEY_DIRECTION KEYCode = KEY_ROTATE_DISPLAY
KEY_CYCLEWINDOWS KEYCode = 154
KEY_MAIL KEYCode = 155
KEY_BOOKMARKS KEYCode = 156
KEY_COMPUTER KEYCode = 157
KEY_BACK KEYCode = 158
KEY_FORWARD KEYCode = 159
KEY_CLOSECD KEYCode = 160
KEY_EJECTCD KEYCode = 161
KEY_EJECTCLOSECD KEYCode = 162
KEY_NEXTSONG KEYCode = 163
KEY_PLAYPAUSE KEYCode = 164
KEY_PREVIOUSSONG KEYCode = 165
KEY_STOPCD KEYCode = 166
KEY_RECORD KEYCode = 167
KEY_REWIND KEYCode = 168
KEY_PHONE KEYCode = 169
KEY_ISO KEYCode = 170
KEY_CONFIG KEYCode = 171
KEY_HOMEPAGE KEYCode = 172
KEY_REFRESH KEYCode = 173
KEY_EXIT KEYCode = 174
KEY_MOVE KEYCode = 175
KEY_EDIT KEYCode = 176
KEY_SCROLLUP KEYCode = 177
KEY_SCROLLDOWN KEYCode = 178
KEY_KPLEFTPAREN KEYCode = 179
KEY_KPRIGHTPAREN KEYCode = 180
KEY_NEW KEYCode = 181
KEY_REDO KEYCode = 182
KEY_F13 KEYCode = 183
KEY_F14 KEYCode = 184
KEY_F15 KEYCode = 185
KEY_F16 KEYCode = 186
KEY_F17 KEYCode = 187
KEY_F18 KEYCode = 188
KEY_F19 KEYCode = 189
KEY_F20 KEYCode = 190
KEY_F21 KEYCode = 191
KEY_F22 KEYCode = 192
KEY_F23 KEYCode = 193
KEY_F24 KEYCode = 194
KEY_PLAYCD KEYCode = 200
KEY_PAUSECD KEYCode = 201
KEY_PROG3 KEYCode = 202
KEY_PROG4 KEYCode = 203
KEY_DASHBOARD KEYCode = 204
KEY_SUSPEND KEYCode = 205
KEY_CLOSE KEYCode = 206
KEY_PLAY KEYCode = 207
KEY_FASTFORWARD KEYCode = 208
KEY_BASSBOOST KEYCode = 209
KEY_PRINT KEYCode = 210
KEY_HP KEYCode = 211
KEY_CAMERA KEYCode = 212
KEY_SOUND KEYCode = 213
KEY_QUESTION KEYCode = 214
KEY_EMAIL KEYCode = 215
KEY_CHAT KEYCode = 216
KEY_SEARCH KEYCode = 217
KEY_CONNECT KEYCode = 218
KEY_FINANCE KEYCode = 219
KEY_SPORT KEYCode = 220
KEY_SHOP KEYCode = 221
KEY_ALTERASE KEYCode = 222
KEY_CANCEL KEYCode = 223
KEY_BRIGHTNESSDOWN KEYCode = 224
KEY_BRIGHTNESSUP KEYCode = 225
KEY_MEDIA KEYCode = 226
KEY_SWITCHVIDEOMODE KEYCode = 227
KEY_KBDILLUMTOGGLE KEYCode = 228
KEY_KBDILLUMDOWN KEYCode = 229
KEY_KBDILLUMUP KEYCode = 230
KEY_SEND KEYCode = 231
KEY_REPLY KEYCode = 232
KEY_FORWARDMAIL KEYCode = 233
KEY_SAVE KEYCode = 234
KEY_DOCUMENTS KEYCode = 235
KEY_BATTERY KEYCode = 236
KEY_BLUETOOTH KEYCode = 237
KEY_WLAN KEYCode = 238
KEY_UWB KEYCode = 239
KEY_UNKNOWN KEYCode = 240
KEY_VIDEO_NEXT KEYCode = 241
KEY_VIDEO_PREV KEYCode = 242
KEY_BRIGHTNESS_CYCLE KEYCode = 243
KEY_BRIGHTNESS_AUTO KEYCode = 244
KEY_BRIGHTNESS_ZERO KEYCode = KEY_BRIGHTNESS_AUTO
KEY_DISPLAY_OFF KEYCode = 245
KEY_WWAN KEYCode = 246
KEY_WIMAX KEYCode = KEY_WWAN
KEY_RFKILL KEYCode = 247
KEY_MICMUTE KEYCode = 248
KEY_OK KEYCode = 0x160
KEY_SELECT KEYCode = 0x161
KEY_GOTO KEYCode = 0x162
KEY_CLEAR KEYCode = 0x163
KEY_POWER2 KEYCode = 0x164
KEY_OPTION KEYCode = 0x165
KEY_INFO KEYCode = 0x166
KEY_TIME KEYCode = 0x167
KEY_VENDOR KEYCode = 0x168
KEY_ARCHIVE KEYCode = 0x169
KEY_PROGRAM KEYCode = 0x16a
KEY_CHANNEL KEYCode = 0x16b
KEY_FAVORITES KEYCode = 0x16c
KEY_EPG KEYCode = 0x16d
KEY_PVR KEYCode = 0x16e
KEY_MHP KEYCode = 0x16f
KEY_LANGUAGE KEYCode = 0x170
KEY_TITLE KEYCode = 0x171
KEY_SUBTITLE KEYCode = 0x172
KEY_ANGLE KEYCode = 0x173
KEY_FULL_SCREEN KEYCode = 0x174
KEY_ZOOM KEYCode = KEY_FULL_SCREEN
KEY_MODE KEYCode = 0x175
KEY_KEYBOARD KEYCode = 0x176
KEY_ASPECT_RATIO KEYCode = 0x177
KEY_SCREEN KEYCode = KEY_ASPECT_RATIO
KEY_PC KEYCode = 0x178
KEY_TV KEYCode = 0x179
KEY_TV2 KEYCode = 0x17a
KEY_VCR KEYCode = 0x17b
KEY_VCR2 KEYCode = 0x17c
KEY_SAT KEYCode = 0x17d
KEY_SAT2 KEYCode = 0x17e
KEY_CD KEYCode = 0x17f
KEY_TAPE KEYCode = 0x180
KEY_RADIO KEYCode = 0x181
KEY_TUNER KEYCode = 0x182
KEY_PLAYER KEYCode = 0x183
KEY_TEXT KEYCode = 0x184
KEY_DVD KEYCode = 0x185
KEY_AUX KEYCode = 0x186
KEY_MP3 KEYCode = 0x187
KEY_AUDIO KEYCode = 0x188
KEY_VIDEO KEYCode = 0x189
KEY_DIRECTORY KEYCode = 0x18a
KEY_LIST KEYCode = 0x18b
KEY_MEMO KEYCode = 0x18c
KEY_CALENDAR KEYCode = 0x18d
KEY_RED KEYCode = 0x18e
KEY_GREEN KEYCode = 0x18f
KEY_YELLOW KEYCode = 0x190
KEY_BLUE KEYCode = 0x191
KEY_CHANNELUP KEYCode = 0x192
KEY_CHANNELDOWN KEYCode = 0x193
KEY_FIRST KEYCode = 0x194
KEY_LAST KEYCode = 0x195
KEY_AB KEYCode = 0x196
KEY_NEXT KEYCode = 0x197
KEY_RESTART KEYCode = 0x198
KEY_SLOW KEYCode = 0x199
KEY_SHUFFLE KEYCode = 0x19a
KEY_BREAK KEYCode = 0x19b
KEY_PREVIOUS KEYCode = 0x19c
KEY_DIGITS KEYCode = 0x19d
KEY_TEEN KEYCode = 0x19e
KEY_TWEN KEYCode = 0x19f
KEY_VIDEOPHONE KEYCode = 0x1a0
KEY_GAMES KEYCode = 0x1a1
KEY_ZOOMIN KEYCode = 0x1a2
KEY_ZOOMOUT KEYCode = 0x1a3
KEY_ZOOMRESET KEYCode = 0x1a4
KEY_WORDPROCESSOR KEYCode = 0x1a5
KEY_EDITOR KEYCode = 0x1a6
KEY_SPREADSHEET KEYCode = 0x1a7
KEY_GRAPHICSEDITOR KEYCode = 0x1a8
KEY_PRESENTATION KEYCode = 0x1a9
KEY_DATABASE KEYCode = 0x1aa
KEY_NEWS KEYCode = 0x1ab
KEY_VOICEMAIL KEYCode = 0x1ac
KEY_ADDRESSBOOK KEYCode = 0x1ad
KEY_MESSENGER KEYCode = 0x1ae
KEY_DISPLAYTOGGLE KEYCode = 0x1af
KEY_BRIGHTNESS_TOGGLE KEYCode = KEY_DISPLAYTOGGLE
KEY_SPELLCHECK KEYCode = 0x1b0
KEY_LOGOFF KEYCode = 0x1b1
KEY_DOLLAR KEYCode = 0x1b2
KEY_EURO KEYCode = 0x1b3
KEY_FRAMEBACK KEYCode = 0x1b4
KEY_FRAMEFORWARD KEYCode = 0x1b5
KEY_CONTEXT_MENU KEYCode = 0x1b6
KEY_MEDIA_REPEAT KEYCode = 0x1b7
KEY_10CHANNELSUP KEYCode = 0x1b8
KEY_10CHANNELSDOWN KEYCode = 0x1b9
KEY_IMAGES KEYCode = 0x1ba
KEY_NOTIFICATION_CENTER KEYCode = 0x1bc
KEY_PICKUP_PHONE KEYCode = 0x1bd
KEY_HANGUP_PHONE KEYCode = 0x1be
KEY_DEL_EOL KEYCode = 0x1c0
KEY_DEL_EOS KEYCode = 0x1c1
KEY_INS_LINE KEYCode = 0x1c2
KEY_DEL_LINE KEYCode = 0x1c3
KEY_FN KEYCode = 0x1d0
KEY_FN_ESC KEYCode = 0x1d1
KEY_FN_F1 KEYCode = 0x1d2
KEY_FN_F2 KEYCode = 0x1d3
KEY_FN_F3 KEYCode = 0x1d4
KEY_FN_F4 KEYCode = 0x1d5
KEY_FN_F5 KEYCode = 0x1d6
KEY_FN_F6 KEYCode = 0x1d7
KEY_FN_F7 KEYCode = 0x1d8
KEY_FN_F8 KEYCode = 0x1d9
KEY_FN_F9 KEYCode = 0x1da
KEY_FN_F10 KEYCode = 0x1db
KEY_FN_F11 KEYCode = 0x1dc
KEY_FN_F12 KEYCode = 0x1dd
KEY_FN_1 KEYCode = 0x1de
KEY_FN_2 KEYCode = 0x1df
KEY_FN_D KEYCode = 0x1e0
KEY_FN_E KEYCode = 0x1e1
KEY_FN_F KEYCode = 0x1e2
KEY_FN_S KEYCode = 0x1e3
KEY_FN_B KEYCode = 0x1e4
KEY_FN_RIGHT_SHIFT KEYCode = 0x1e5
KEY_BRL_DOT1 KEYCode = 0x1f1
KEY_BRL_DOT2 KEYCode = 0x1f2
KEY_BRL_DOT3 KEYCode = 0x1f3
KEY_BRL_DOT4 KEYCode = 0x1f4
KEY_BRL_DOT5 KEYCode = 0x1f5
KEY_BRL_DOT6 KEYCode = 0x1f6
KEY_BRL_DOT7 KEYCode = 0x1f7
KEY_BRL_DOT8 KEYCode = 0x1f8
KEY_BRL_DOT9 KEYCode = 0x1f9
KEY_BRL_DOT10 KEYCode = 0x1fa
KEY_NUMERIC_0 KEYCode = 0x200
KEY_NUMERIC_1 KEYCode = 0x201
KEY_NUMERIC_2 KEYCode = 0x202
KEY_NUMERIC_3 KEYCode = 0x203
KEY_NUMERIC_4 KEYCode = 0x204
KEY_NUMERIC_5 KEYCode = 0x205
KEY_NUMERIC_6 KEYCode = 0x206
KEY_NUMERIC_7 KEYCode = 0x207
KEY_NUMERIC_8 KEYCode = 0x208
KEY_NUMERIC_9 KEYCode = 0x209
KEY_NUMERIC_STAR KEYCode = 0x20a
KEY_NUMERIC_POUND KEYCode = 0x20b
KEY_NUMERIC_A KEYCode = 0x20c
KEY_NUMERIC_B KEYCode = 0x20d
KEY_NUMERIC_C KEYCode = 0x20e
KEY_NUMERIC_D KEYCode = 0x20f
KEY_CAMERA_FOCUS KEYCode = 0x210
KEY_WPS_BUTTON KEYCode = 0x211
KEY_TOUCHPAD_TOGGLE KEYCode = 0x212
KEY_TOUCHPAD_ON KEYCode = 0x213
KEY_TOUCHPAD_OFF KEYCode = 0x214
KEY_CAMERA_ZOOMIN KEYCode = 0x215
KEY_CAMERA_ZOOMOUT KEYCode = 0x216
KEY_CAMERA_UP KEYCode = 0x217
KEY_CAMERA_DOWN KEYCode = 0x218
KEY_CAMERA_LEFT KEYCode = 0x219
KEY_CAMERA_RIGHT KEYCode = 0x21a
KEY_ATTENDANT_ON KEYCode = 0x21b
KEY_ATTENDANT_OFF KEYCode = 0x21c
KEY_ATTENDANT_TOGGLE KEYCode = 0x21d
KEY_LIGHTS_TOGGLE KEYCode = 0x21e
KEY_ALS_TOGGLE KEYCode = 0x230
KEY_ROTATE_LOCK_TOGGLE KEYCode = 0x231
KEY_BUTTONCONFIG KEYCode = 0x240
KEY_TASKMANAGER KEYCode = 0x241
KEY_JOURNAL KEYCode = 0x242
KEY_CONTROLPANEL KEYCode = 0x243
KEY_APPSELECT KEYCode = 0x244
KEY_SCREENSAVER KEYCode = 0x245
KEY_VOICECOMMAND KEYCode = 0x246
KEY_ASSISTANT KEYCode = 0x247
KEY_KBD_LAYOUT_NEXT KEYCode = 0x248
KEY_EMOJI_PICKER KEYCode = 0x249
KEY_BRIGHTNESS_MIN KEYCode = 0x250
KEY_BRIGHTNESS_MAX KEYCode = 0x251
KEY_KBDINPUTASSIST_PREV KEYCode = 0x260
KEY_KBDINPUTASSIST_NEXT KEYCode = 0x261
KEY_KBDINPUTASSIST_PREVGROUP KEYCode = 0x262
KEY_KBDINPUTASSIST_NEXTGROUP KEYCode = 0x263
KEY_KBDINPUTASSIST_ACCEPT KEYCode = 0x264
KEY_KBDINPUTASSIST_CANCEL KEYCode = 0x265
KEY_RIGHT_UP KEYCode = 0x266
KEY_RIGHT_DOWN KEYCode = 0x267
KEY_LEFT_UP KEYCode = 0x268
KEY_LEFT_DOWN KEYCode = 0x269
KEY_ROOT_MENU KEYCode = 0x26a
KEY_MEDIA_TOP_MENU KEYCode = 0x26b
KEY_NUMERIC_11 KEYCode = 0x26c
KEY_NUMERIC_12 KEYCode = 0x26d
KEY_AUDIO_DESC KEYCode = 0x26e
KEY_3D_MODE KEYCode = 0x26f
KEY_NEXT_FAVORITE KEYCode = 0x270
KEY_STOP_RECORD KEYCode = 0x271
KEY_PAUSE_RECORD KEYCode = 0x272
KEY_VOD KEYCode = 0x273
KEY_UNMUTE KEYCode = 0x274
KEY_FASTREVERSE KEYCode = 0x275
KEY_SLOWREVERSE KEYCode = 0x276
KEY_DATA KEYCode = 0x277
KEY_ONSCREEN_KEYBOARD KEYCode = 0x278
KEY_PRIVACY_SCREEN_TOGGLE KEYCode = 0x279
KEY_SELECTIVE_SCREENSHOT KEYCode = 0x27a
KEY_MACRO1 KEYCode = 0x290
KEY_MACRO2 KEYCode = 0x291
KEY_MACRO3 KEYCode = 0x292
KEY_MACRO4 KEYCode = 0x293
KEY_MACRO5 KEYCode = 0x294
KEY_MACRO6 KEYCode = 0x295
KEY_MACRO7 KEYCode = 0x296
KEY_MACRO8 KEYCode = 0x297
KEY_MACRO9 KEYCode = 0x298
KEY_MACRO10 KEYCode = 0x299
KEY_MACRO11 KEYCode = 0x29a
KEY_MACRO12 KEYCode = 0x29b
KEY_MACRO13 KEYCode = 0x29c
KEY_MACRO14 KEYCode = 0x29d
KEY_MACRO15 KEYCode = 0x29e
KEY_MACRO16 KEYCode = 0x29f
KEY_MACRO17 KEYCode = 0x2a0
KEY_MACRO18 KEYCode = 0x2a1
KEY_MACRO19 KEYCode = 0x2a2
KEY_MACRO20 KEYCode = 0x2a3
KEY_MACRO21 KEYCode = 0x2a4
KEY_MACRO22 KEYCode = 0x2a5
KEY_MACRO23 KEYCode = 0x2a6
KEY_MACRO24 KEYCode = 0x2a7
KEY_MACRO25 KEYCode = 0x2a8
KEY_MACRO26 KEYCode = 0x2a9
KEY_MACRO27 KEYCode = 0x2aa
KEY_MACRO28 KEYCode = 0x2ab
KEY_MACRO29 KEYCode = 0x2ac
KEY_MACRO30 KEYCode = 0x2ad
KEY_MACRO_RECORD_START KEYCode = 0x2b0
KEY_MACRO_RECORD_STOP KEYCode = 0x2b1
KEY_MACRO_PRESET_CYCLE KEYCode = 0x2b2
KEY_MACRO_PRESET1 KEYCode = 0x2b3
KEY_MACRO_PRESET2 KEYCode = 0x2b4
KEY_MACRO_PRESET3 KEYCode = 0x2b5
KEY_KBD_LCD_MENU1 KEYCode = 0x2b8
KEY_KBD_LCD_MENU2 KEYCode = 0x2b9
KEY_KBD_LCD_MENU3 KEYCode = 0x2ba
KEY_KBD_LCD_MENU4 KEYCode = 0x2bb
KEY_KBD_LCD_MENU5 KEYCode = 0x2bc
KEY_MIN_INTERESTING KEYCode = KEY_MUTE
KEY_MAX KEYCode = 0x2ff
KEY_CNT KEYCode = (KEY_MAX + 1)
)
type LEDCode Code
func (c LEDCode) Code() Code {
return Code(c)
}
func (c LEDCode) String() string {
m := map[LEDCode]string{0x00: "LED_NUML", 0x01: "LED_CAPSL", 0x02: "LED_SCROLLL", 0x03: "LED_COMPOSE", 0x04: "LED_KANA", 0x05: "LED_SLEEP", 0x06: "LED_SUSPEND", 0x07: "LED_MUTE", 0x08: "LED_MISC", 0x09: "LED_MAIL", 0x0a: "LED_CHARGING", 0x0f: "LED_MAX", (LED_MAX + 1): "LED_CNT"}
return m[c]
}
// LED
const (
LED_NUML LEDCode = 0x00
LED_CAPSL LEDCode = 0x01
LED_SCROLLL LEDCode = 0x02
LED_COMPOSE LEDCode = 0x03
LED_KANA LEDCode = 0x04
LED_SLEEP LEDCode = 0x05
LED_SUSPEND LEDCode = 0x06
LED_MUTE LEDCode = 0x07
LED_MISC LEDCode = 0x08
LED_MAIL LEDCode = 0x09
LED_CHARGING LEDCode = 0x0a
LED_MAX LEDCode = 0x0f
LED_CNT LEDCode = (LED_MAX + 1)
)
type MSCCode Code
func (c MSCCode) Code() Code {
return Code(c)
}
func (c MSCCode) String() string {
m := map[MSCCode]string{0x00: "MSC_SERIAL", 0x01: "MSC_PULSELED", 0x02: "MSC_GESTURE", 0x03: "MSC_RAW", 0x04: "MSC_SCAN", 0x05: "MSC_TIMESTAMP", 0x07: "MSC_MAX", (MSC_MAX + 1): "MSC_CNT"}
return m[c]
}
// MSC
const (
MSC_SERIAL MSCCode = 0x00
MSC_PULSELED MSCCode = 0x01
MSC_GESTURE MSCCode = 0x02
MSC_RAW MSCCode = 0x03
MSC_SCAN MSCCode = 0x04
MSC_TIMESTAMP MSCCode = 0x05
MSC_MAX MSCCode = 0x07
MSC_CNT MSCCode = (MSC_MAX + 1)
)
type RELCode Code
func (c RELCode) Code() Code {
return Code(c)
}
func (c RELCode) String() string {
m := map[RELCode]string{0x00: "REL_X", 0x01: "REL_Y", 0x02: "REL_Z", 0x03: "REL_RX", 0x04: "REL_RY", 0x05: "REL_RZ", 0x06: "REL_HWHEEL", 0x07: "REL_DIAL", 0x08: "REL_WHEEL", 0x09: "REL_MISC", 0x0a: "REL_RESERVED", 0x0b: "REL_WHEEL_HI_RES", 0x0c: "REL_HWHEEL_HI_RES", 0x0f: "REL_MAX", (REL_MAX + 1): "REL_CNT"}
return m[c]
}
// REL
const (
REL_X RELCode = 0x00
REL_Y RELCode = 0x01
REL_Z RELCode = 0x02
REL_RX RELCode = 0x03
REL_RY RELCode = 0x04
REL_RZ RELCode = 0x05
REL_HWHEEL RELCode = 0x06
REL_DIAL RELCode = 0x07
REL_WHEEL RELCode = 0x08
REL_MISC RELCode = 0x09
REL_RESERVED RELCode = 0x0a
REL_WHEEL_HI_RES RELCode = 0x0b
REL_HWHEEL_HI_RES RELCode = 0x0c
REL_MAX RELCode = 0x0f
REL_CNT RELCode = (REL_MAX + 1)
)
type REPCode Code
func (c REPCode) Code() Code {
return Code(c)
}
func (c REPCode) String() string {
m := map[REPCode]string{0x00: "REP_DELAY", 0x01: "REP_PERIOD", (REP_MAX + 1): "REP_CNT"}
return m[c]
}
// REP
const (
REP_DELAY REPCode = 0x00
REP_PERIOD REPCode = 0x01
REP_MAX REPCode = 0x01
REP_CNT REPCode = (REP_MAX + 1)
)
type SNDCode Code
func (c SNDCode) Code() Code {
return Code(c)
}
func (c SNDCode) String() string {
m := map[SNDCode]string{0x00: "SND_CLICK", 0x01: "SND_BELL", 0x02: "SND_TONE", 0x07: "SND_MAX", (SND_MAX + 1): "SND_CNT"}
return m[c]
}
// SND
const (
SND_CLICK SNDCode = 0x00
SND_BELL SNDCode = 0x01
SND_TONE SNDCode = 0x02
SND_MAX SNDCode = 0x07
SND_CNT SNDCode = (SND_MAX + 1)
)
type SWCode Code
func (c SWCode) Code() Code {
return Code(c)
}
func (c SWCode) String() string {
m := map[SWCode]string{0x00: "SW_LID", 0x01: "SW_TABLET_MODE", 0x02: "SW_HEADPHONE_INSERT", 0x03: "SW_RFKILL_ALL", 0x04: "SW_MICROPHONE_INSERT", 0x05: "SW_DOCK", 0x06: "SW_LINEOUT_INSERT", 0x07: "SW_JACK_PHYSICAL_INSERT", 0x08: "SW_VIDEOOUT_INSERT", 0x09: "SW_CAMERA_LENS_COVER", 0x0a: "SW_KEYPAD_SLIDE", 0x0b: "SW_FRONT_PROXIMITY", 0x0c: "SW_ROTATE_LOCK", 0x0d: "SW_LINEIN_INSERT", 0x0e: "SW_MUTE_DEVICE", 0x0f: "SW_PEN_INSERTED", 0x10: "SW_MACHINE_COVER", (SW_MAX + 1): "SW_CNT"}
return m[c]
}
// SW
const (
SW_LID SWCode = 0x00
SW_TABLET_MODE SWCode = 0x01
SW_HEADPHONE_INSERT SWCode = 0x02
SW_RFKILL_ALL SWCode = 0x03
SW_RADIO SWCode = SW_RFKILL_ALL
SW_MICROPHONE_INSERT SWCode = 0x04
SW_DOCK SWCode = 0x05
SW_LINEOUT_INSERT SWCode = 0x06
SW_JACK_PHYSICAL_INSERT SWCode = 0x07
SW_VIDEOOUT_INSERT SWCode = 0x08
SW_CAMERA_LENS_COVER SWCode = 0x09
SW_KEYPAD_SLIDE SWCode = 0x0a
SW_FRONT_PROXIMITY SWCode = 0x0b
SW_ROTATE_LOCK SWCode = 0x0c
SW_LINEIN_INSERT SWCode = 0x0d
SW_MUTE_DEVICE SWCode = 0x0e
SW_PEN_INSERTED SWCode = 0x0f
SW_MACHINE_COVER SWCode = 0x10
SW_MAX SWCode = 0x10
SW_CNT SWCode = (SW_MAX + 1)
)
type SYNCode Code
func (c SYNCode) Code() Code {
return Code(c)
}
func (c SYNCode) String() string {
m := map[SYNCode]string{0: "SYN_REPORT", 1: "SYN_CONFIG", 2: "SYN_MT_REPORT", 3: "SYN_DROPPED", 0xf: "SYN_MAX", (SYN_MAX + 1): "SYN_CNT"}
return m[c]
}
// SYN
const (
SYN_REPORT SYNCode = 0
SYN_CONFIG SYNCode = 1
SYN_MT_REPORT SYNCode = 2
SYN_DROPPED SYNCode = 3
SYN_MAX SYNCode = 0xf
SYN_CNT SYNCode = (SYN_MAX + 1)
)