-
Notifications
You must be signed in to change notification settings - Fork 0
/
usb_hid_keys
197 lines (195 loc) · 2.82 KB
/
usb_hid_keys
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
#!/bin/bash
# reference: https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
hex_01="ErrorRollOver"
hex_02="PostFail"
hex_03="ErrorUndefined"
hex_04="a A"
hex_05="b B"
hex_06="c C"
hex_07="d D"
hex_08="e E"
hex_09="f F"
hex_0a="g G"
hex_0b="h H"
hex_0c="i I"
hex_0d="j J"
hex_0e="k K"
hex_0f="l L"
hex_10="m M"
hex_11="n N"
hex_12="o O"
hex_13="p P"
hex_14="q Q"
hex_15="r R"
hex_16="s S"
hex_17="t T"
hex_18="u U"
hex_19="v V"
hex_1a="w W"
hex_1b="x X"
hex_1c="y Y"
hex_1d="z Z"
hex_1e="1 !"
hex_1f="2 @"
hex_20="3 #"
hex_21="4 $"
hex_22="5 %"
hex_23="6 ^"
hex_24="7 &"
hex_25="8 *"
hex_26="9 ("
hex_27="0 )"
hex_28="Enter"
hex_29="Esc"
hex_2a="DelBackspace"
hex_2b="Tab"
hex_2c="Space"
hex_2d="- _"
hex_2e="= +"
hex_2f="[ {"
hex_30="] }"
hex_31="\ |"
hex_32="# ~"
hex_33="; :"
hex_34="' doubleQuote" # (' ") need to handle double quote as well
hex_35="graveAccent ~" # (` ~) need to handle ` as well
hex_36=", <"
hex_37=". >"
hex_38="/ ?"
hex_39="CapsLock"
hex_3a="F1"
hex_3b="F2"
hex_3c="F3"
hex_3d="F4"
hex_3e="F5"
hex_3f="F6"
hex_40="F7"
hex_41="F8"
hex_42="F9"
hex_43="F10"
hex_44="F11"
hex_45="F12"
hex_46="PrintScreen"
hex_47="ScrollLock"
hex_48="Pause"
hex_49="Insert"
hex_4a="Home"
hex_4b="PageUp"
hex_4c="DelFoward"
hex_4d="End"
hex_4e="Pagedown"
hex_4f="RightArrow"
hex_50="LeftArrow"
hex_51="DownArrow"
hex_52="UpArrow"
hex_53="NumLock Clear"
hex_54="keypad_/"
hex_55="keypad_*"
hex_56="keypad_-"
hex_57="keypad_+"
hex_58="keypad_Enter"
hex_59="keypad_1 keypad_End"
hex_5a="keypad_2 keypad_DownArrow"
hex_5b="keypad_3 keypad_PageDown"
hex_5c="keypad_4 keypad_LeftArrow"
hex_5d="keypad_5"
hex_5e="keypad_6 keypad_RightArrow"
hex_5f="keypad_7 keypad_Home"
hex_60="keypad_8 keypad_UpArrow"
hex_61="keypad_9 keypad_PageUp"
hex_62="keypad_0 keypad_Insert"
hex_63="keypad_. keypad_Delete"
hex_64="\ |"
hex_65="Application"
hex_66="Power"
hex_67="="
hex_68="F13"
hex_69="F14"
hex_6a="F15"
hex_6b="F16"
hex_6c="F17"
hex_6d="F18"
hex_6e="F19"
hex_6f="F20"
hex_70="F21"
hex_71="F22"
hex_72="F23"
hex_73="F24"
# there are a lot more according to the spec, but not required for my use case atm...
hex_74=""
hex_75=""
hex_76=""
hex_77=""
hex_78=""
hex_79=""
hex_7a=""
hex_7b=""
hex_7c=""
hex_7d=""
hex_7e=""
hex_7f=""
hex_80=""
hex_81=""
hex_82=""
hex_83=""
hex_84=""
hex_85=""
hex_86=""
hex_87=""
hex_88=""
hex_89=""
hex_8a=""
hex_8b=""
hex_8c=""
hex_8d=""
hex_8e=""
hex_8f=""
hex_90=""
hex_91=""
hex_92=""
hex_93=""
hex_94=""
hex_95=""
hex_96=""
hex_97=""
hex_98=""
hex_99=""
hex_9a=""
hex_9b=""
hex_9c=""
hex_9d=""
hex_9e=""
hex_9f=""
hex_a0=""
hex_a1=""
hex_a2=""
hex_a3=""
hex_a4=""
hex_a5=""
hex_a6=""
hex_a7=""
hex_a8=""
hex_a9=""
hex_aa=""
hex_ab=""
hex_ac=""
hex_ad=""
hex_ae=""
hex_af=""
hex_b0=""
hex_b1=""
hex_b2=""
hex_b3=""
hex_b4=""
hex_b5=""
hex_b6=""
hex_b7=""
hex_b8=""
hex_b9=""
hex_ba=""
hex_bb=""
hex_bc=""
hex_bd=""
hex_be=""
hex_bf=""
#keeps going...