libOpenWinControls
Multiplatform open-source library to interact with the dual-mode controller in GPD devices
Loading...
Searching...
No Matches
HIDUsageIDMap.h
Go to the documentation of this file.
1/*
2 * This file is part of libOpenWinControls.
3 * Copyright (C) 2026 kylon
4 *
5 * libOpenWinControls is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * libOpenWinControls is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18#pragma once
19
20#include <map>
21#include <string>
22
26namespace OWC {
31 static const std::map<int, std::string> HIDUsageIDMap = {
32 {0x00, "UNSET"},
33
34 {0x04, "A"},
35 {0x05, "B"},
36 {0x06, "C"},
37 {0x07, "D"},
38 {0x08, "E"},
39 {0x09, "F"},
40 {0x0a, "G"},
41 {0x0b, "H"},
42 {0x0c, "I"},
43 {0x0d, "J"},
44 {0x0e, "K"},
45 {0x0f, "L"},
46 {0x10, "M"},
47 {0x11, "N"},
48 {0x12, "O"},
49 {0x13, "P"},
50 {0x14, "Q"},
51 {0x15, "R"},
52 {0x16, "S"},
53 {0x17, "T"},
54 {0x18, "U"},
55 {0x19, "V"},
56 {0x1a, "W"},
57 {0x1b, "X"},
58 {0x1c, "Y"},
59 {0x1d, "Z"},
60
61 {0x1e, "1"},
62 {0x1f, "2"},
63 {0x20, "3"},
64 {0x21, "4"},
65 {0x22, "5"},
66 {0x23, "6"},
67 {0x24, "7"},
68 {0x25, "8"},
69 {0x26, "9"},
70 {0x27, "0"},
71
72 {0x28, "ENTER"},
73 {0x29, "ESC"},
74 {0x2a, "BACKSPACE"},
75 {0x2b, "TAB"},
76 {0x2c, "SPACE"},
77 {0x2d, "MINUS"},
78 {0x2e, "EQUAL"},
79 {0x2f, "LEFTBRACE"},
80 {0x30, "RIGHTBRACE"},
81 {0x31, "BACKSLASH"},
82 {0x32, "HASHTILDE"},
83 {0x33, "SEMICOLON"},
84 {0x34, "APOSTROPHE"},
85 {0x35, "GRAVE"},
86 {0x36, "COMMA"},
87 {0x37, "DOT"},
88 {0x38, "SLASH"},
89 {0x39, "CAPSLOCK"},
90
91 {0x3a, "F1"},
92 {0x3b, "F2"},
93 {0x3c, "F3"},
94 {0x3d, "F4"},
95 {0x3e, "F5"},
96 {0x3f, "F6"},
97 {0x40, "F7"},
98 {0x41, "F8"},
99 {0x42, "F9"},
100 {0x43, "F10"},
101 {0x44, "F11"},
102 {0x45, "F12"},
103
104 {0x46, "SYSRQ"},
105 {0x47, "SCROLLLOCK"},
106 {0x48, "PAUSE"},
107 {0x49, "INSERT"},
108 {0x4a, "HOME"},
109 {0x4b, "PAGEUP"},
110 {0x4c, "DELETE"},
111 {0x4d, "END"},
112 {0x4e, "PAGEDOWN"},
113 {0x4f, "RIGHT"},
114 {0x50, "LEFT"},
115 {0x51, "DOWN"},
116 {0x52, "UP"},
117
118 {0x53, "NUMLOCK"},
119 {0x54, "KPSLASH"},
120 {0x55, "KPASTERISK"},
121 {0x56, "KPMINUS"},
122 {0x57, "KPPLUS"},
123 {0x58, "KPENTER"},
124 {0x59, "KP1"},
125 {0x5a, "KP2"},
126 {0x5b, "KP3"},
127 {0x5c, "KP4"},
128 {0x5d, "KP5"},
129 {0x5e, "KP6"},
130 {0x5f, "KP7"},
131 {0x60, "KP8"},
132 {0x61, "KP9"},
133 {0x62, "KP0"},
134 {0x63, "KPDOT"},
135
136 {0x64, "102ND"},
137 {0x65, "COMPOSE"},
138 {0x66, "POWER"},
139 {0x67, "KPEQUAL"},
140
141 {0x68, "F13"},
142 {0x69, "F14"},
143 {0x6a, "F15"},
144 {0x6b, "F16"},
145 {0x6c, "F17"},
146 {0x6d, "F18"},
147 {0x6e, "F19"},
148 {0x6f, "F20"},
149 {0x70, "F21"},
150 {0x71, "F22"},
151 {0x72, "F23"},
152 {0x73, "F24"},
153
154 {0x74, "OPEN"},
155 {0x75, "HELP"},
156 {0x76, "PROPS"},
157 {0x77, "FRONT"},
158 {0x78, "STOP"},
159 {0x79, "AGAIN"},
160 {0x7a, "UNDO"},
161 {0x7b, "CUT"},
162 {0x7c, "COPY"},
163 {0x7d, "PASTE"},
164 {0x7e, "FIND"},
165 {0x7f, "MUTE"},
166 {0x80, "VOLUMEUP"},
167 {0x81, "VOLUMEDOWN"},
168
169 {0x85, "KPCOMMA"},
170
171 {0x87, "RO"},
172 {0x88, "KATAKANAHIRAGANA"},
173 {0x89, "YEN"},
174 {0x8a, "HENKAN"},
175 {0x8b, "MUHENKAN"},
176 {0x8c, "KPJPCOMMA"},
177
178 {0x90, "HANGEUL"},
179 {0x91, "HANJA"},
180 {0x92, "KATAKANA"},
181 {0x93, "HIRAGANA"},
182 {0x94, "ZENKAKUHANKAKU"},
183
184 {0xb6, "KPLEFTPAREN"},
185 {0xb7, "KPRIGHTPAREN"},
186
187 {0xe0, "LEFTCTRL"},
188 {0xe1, "LEFTSHIFT"},
189 {0xe2, "LEFTALT"},
190 {0xe3, "LEFTMETA"},
191
192 {0xe4, "RIGHTCTRL"},
193 {0xe5, "RIGHTSHIFT"},
194 {0xe6, "RIGHTALT"},
195 {0xe7, "RIGHTMETA"},
196
197 {0xe8, "MOUSE_WHEELUP"},
198 {0xe9, "MOUSE_WHEELDOWN"},
199 {0xea, "MOUSE_LEFT"},
200 {0xeb, "MOUSE_RIGHT"},
201 {0xec, "MOUSE_MIDDLE"},
202 {0xed, "MOUSE_FAST"},
203 };
204}
static const std::map< int, std::string > HIDUsageIDMap
map of supported keyboard keys and their HID keycode
Definition HIDUsageIDMap.h:31