1 /*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 #include "keymap.h"
17 #include <sstream>
18
19 using namespace com::android::car::keventreader;
20
get()21 Keymap& Keymap::get() {
22 static Keymap gKeymap;
23
24 return gKeymap;
25 }
26
Keymap()27 Keymap::Keymap() {
28 fillMap();
29 }
30
getDisplayName(int keycode)31 std::string Keymap::getDisplayName(int keycode) {
32 auto iter = mKeyMap.find(keycode), end = mKeyMap.end();
33 if (iter == end) {
34 std::stringstream ss;
35 ss << "unknown " << keycode;
36 return ss.str();
37 }
38 return iter->second;
39 }
40
fillMap()41 void Keymap::fillMap() {
42 mKeyMap.emplace(0,"RESERVED");
43 mKeyMap.emplace(1,"ESC");
44 mKeyMap.emplace(2,"1");
45 mKeyMap.emplace(3,"2");
46 mKeyMap.emplace(4,"3");
47 mKeyMap.emplace(5,"4");
48 mKeyMap.emplace(6,"5");
49 mKeyMap.emplace(7,"6");
50 mKeyMap.emplace(8,"7");
51 mKeyMap.emplace(9,"8");
52 mKeyMap.emplace(10,"9");
53 mKeyMap.emplace(11,"0");
54 mKeyMap.emplace(12,"MINUS");
55 mKeyMap.emplace(13,"EQUAL");
56 mKeyMap.emplace(14,"BACKSPACE");
57 mKeyMap.emplace(15,"TAB");
58 mKeyMap.emplace(16,"Q");
59 mKeyMap.emplace(17,"W");
60 mKeyMap.emplace(18,"E");
61 mKeyMap.emplace(19,"R");
62 mKeyMap.emplace(20,"T");
63 mKeyMap.emplace(21,"Y");
64 mKeyMap.emplace(22,"U");
65 mKeyMap.emplace(23,"I");
66 mKeyMap.emplace(24,"O");
67 mKeyMap.emplace(25,"P");
68 mKeyMap.emplace(26,"LEFTBRACE");
69 mKeyMap.emplace(27,"RIGHTBRACE");
70 mKeyMap.emplace(28,"ENTER");
71 mKeyMap.emplace(29,"LEFTCTRL");
72 mKeyMap.emplace(30,"A");
73 mKeyMap.emplace(31,"S");
74 mKeyMap.emplace(32,"D");
75 mKeyMap.emplace(33,"F");
76 mKeyMap.emplace(34,"G");
77 mKeyMap.emplace(35,"H");
78 mKeyMap.emplace(36,"J");
79 mKeyMap.emplace(37,"K");
80 mKeyMap.emplace(38,"L");
81 mKeyMap.emplace(39,"SEMICOLON");
82 mKeyMap.emplace(40,"APOSTROPHE");
83 mKeyMap.emplace(41,"GRAVE");
84 mKeyMap.emplace(42,"LEFTSHIFT");
85 mKeyMap.emplace(43,"BACKSLASH");
86 mKeyMap.emplace(44,"Z");
87 mKeyMap.emplace(45,"X");
88 mKeyMap.emplace(46,"C");
89 mKeyMap.emplace(47,"V");
90 mKeyMap.emplace(48,"B");
91 mKeyMap.emplace(49,"N");
92 mKeyMap.emplace(50,"M");
93 mKeyMap.emplace(51,"COMMA");
94 mKeyMap.emplace(52,"DOT");
95 mKeyMap.emplace(53,"SLASH");
96 mKeyMap.emplace(54,"RIGHTSHIFT");
97 mKeyMap.emplace(55,"KPASTERISK");
98 mKeyMap.emplace(56,"LEFTALT");
99 mKeyMap.emplace(57,"SPACE");
100 mKeyMap.emplace(58,"CAPSLOCK");
101 mKeyMap.emplace(59,"F1");
102 mKeyMap.emplace(60,"F2");
103 mKeyMap.emplace(61,"F3");
104 mKeyMap.emplace(62,"F4");
105 mKeyMap.emplace(63,"F5");
106 mKeyMap.emplace(64,"F6");
107 mKeyMap.emplace(65,"F7");
108 mKeyMap.emplace(66,"F8");
109 mKeyMap.emplace(67,"F9");
110 mKeyMap.emplace(68,"F10");
111 mKeyMap.emplace(69,"NUMLOCK");
112 mKeyMap.emplace(70,"SCROLLLOCK");
113 mKeyMap.emplace(71,"KP7");
114 mKeyMap.emplace(72,"KP8");
115 mKeyMap.emplace(73,"KP9");
116 mKeyMap.emplace(74,"KPMINUS");
117 mKeyMap.emplace(75,"KP4");
118 mKeyMap.emplace(76,"KP5");
119 mKeyMap.emplace(77,"KP6");
120 mKeyMap.emplace(78,"KPPLUS");
121 mKeyMap.emplace(79,"KP1");
122 mKeyMap.emplace(80,"KP2");
123 mKeyMap.emplace(81,"KP3");
124 mKeyMap.emplace(82,"KP0");
125 mKeyMap.emplace(83,"KPDOT");
126 mKeyMap.emplace(85,"ZENKAKUHANKAKU");
127 mKeyMap.emplace(86,"102ND");
128 mKeyMap.emplace(87,"F11");
129 mKeyMap.emplace(88,"F12");
130 mKeyMap.emplace(89,"RO");
131 mKeyMap.emplace(90,"KATAKANA");
132 mKeyMap.emplace(91,"HIRAGANA");
133 mKeyMap.emplace(92,"HENKAN");
134 mKeyMap.emplace(93,"KATAKANAHIRAGANA");
135 mKeyMap.emplace(94,"MUHENKAN");
136 mKeyMap.emplace(95,"KPJPCOMMA");
137 mKeyMap.emplace(96,"KPENTER");
138 mKeyMap.emplace(97,"RIGHTCTRL");
139 mKeyMap.emplace(98,"KPSLASH");
140 mKeyMap.emplace(99,"SYSRQ");
141 mKeyMap.emplace(100,"RIGHTALT");
142 mKeyMap.emplace(101,"LINEFEED");
143 mKeyMap.emplace(102,"HOME");
144 mKeyMap.emplace(103,"UP");
145 mKeyMap.emplace(104,"PAGEUP");
146 mKeyMap.emplace(105,"LEFT");
147 mKeyMap.emplace(106,"RIGHT");
148 mKeyMap.emplace(107,"END");
149 mKeyMap.emplace(108,"DOWN");
150 mKeyMap.emplace(109,"PAGEDOWN");
151 mKeyMap.emplace(110,"INSERT");
152 mKeyMap.emplace(111,"DELETE");
153 mKeyMap.emplace(112,"MACRO");
154 mKeyMap.emplace(113,"MUTE");
155 mKeyMap.emplace(114,"VOLUMEDOWN");
156 mKeyMap.emplace(115,"VOLUMEUP");
157 mKeyMap.emplace(116,"POWER");
158 mKeyMap.emplace(117,"KPEQUAL");
159 mKeyMap.emplace(118,"KPPLUSMINUS");
160 mKeyMap.emplace(119,"PAUSE");
161 mKeyMap.emplace(120,"SCALE");
162 mKeyMap.emplace(121,"KPCOMMA");
163 mKeyMap.emplace(122,"HANGEUL");
164 mKeyMap.emplace(123,"HANJA");
165 mKeyMap.emplace(124,"YEN");
166 mKeyMap.emplace(125,"LEFTMETA");
167 mKeyMap.emplace(126,"RIGHTMETA");
168 mKeyMap.emplace(127,"COMPOSE");
169 mKeyMap.emplace(128,"STOP");
170 mKeyMap.emplace(129,"AGAIN");
171 mKeyMap.emplace(130,"PROPS");
172 mKeyMap.emplace(131,"UNDO");
173 mKeyMap.emplace(132,"FRONT");
174 mKeyMap.emplace(133,"COPY");
175 mKeyMap.emplace(134,"OPEN");
176 mKeyMap.emplace(135,"PASTE");
177 mKeyMap.emplace(136,"FIND");
178 mKeyMap.emplace(137,"CUT");
179 mKeyMap.emplace(138,"HELP");
180 mKeyMap.emplace(139,"MENU");
181 mKeyMap.emplace(140,"CALC");
182 mKeyMap.emplace(141,"SETUP");
183 mKeyMap.emplace(142,"SLEEP");
184 mKeyMap.emplace(143,"WAKEUP");
185 mKeyMap.emplace(144,"FILE");
186 mKeyMap.emplace(145,"SENDFILE");
187 mKeyMap.emplace(146,"DELETEFILE");
188 mKeyMap.emplace(147,"XFER");
189 mKeyMap.emplace(148,"PROG1");
190 mKeyMap.emplace(149,"PROG2");
191 mKeyMap.emplace(150,"WWW");
192 mKeyMap.emplace(151,"MSDOS");
193 mKeyMap.emplace(152,"SCREENLOCK");
194 mKeyMap.emplace(153,"ROTATE_DISPLAY");
195 mKeyMap.emplace(154,"CYCLEWINDOWS");
196 mKeyMap.emplace(155,"MAIL");
197 mKeyMap.emplace(156,"BOOKMARKS");
198 mKeyMap.emplace(157,"COMPUTER");
199 mKeyMap.emplace(158,"BACK");
200 mKeyMap.emplace(159,"FORWARD");
201 mKeyMap.emplace(160,"CLOSECD");
202 mKeyMap.emplace(161,"EJECTCD");
203 mKeyMap.emplace(162,"EJECTCLOSECD");
204 mKeyMap.emplace(163,"NEXTSONG");
205 mKeyMap.emplace(164,"PLAYPAUSE");
206 mKeyMap.emplace(165,"PREVIOUSSONG");
207 mKeyMap.emplace(166,"STOPCD");
208 mKeyMap.emplace(167,"RECORD");
209 mKeyMap.emplace(168,"REWIND");
210 mKeyMap.emplace(169,"PHONE");
211 mKeyMap.emplace(170,"ISO");
212 mKeyMap.emplace(171,"CONFIG");
213 mKeyMap.emplace(172,"HOMEPAGE");
214 mKeyMap.emplace(173,"REFRESH");
215 mKeyMap.emplace(174,"EXIT");
216 mKeyMap.emplace(175,"MOVE");
217 mKeyMap.emplace(176,"EDIT");
218 mKeyMap.emplace(177,"SCROLLUP");
219 mKeyMap.emplace(178,"SCROLLDOWN");
220 mKeyMap.emplace(179,"KPLEFTPAREN");
221 mKeyMap.emplace(180,"KPRIGHTPAREN");
222 mKeyMap.emplace(181,"NEW");
223 mKeyMap.emplace(182,"REDO");
224 mKeyMap.emplace(183,"F13");
225 mKeyMap.emplace(184,"F14");
226 mKeyMap.emplace(185,"F15");
227 mKeyMap.emplace(186,"F16");
228 mKeyMap.emplace(187,"F17");
229 mKeyMap.emplace(188,"F18");
230 mKeyMap.emplace(189,"F19");
231 mKeyMap.emplace(190,"F20");
232 mKeyMap.emplace(191,"F21");
233 mKeyMap.emplace(192,"F22");
234 mKeyMap.emplace(193,"F23");
235 mKeyMap.emplace(194,"F24");
236 mKeyMap.emplace(200,"PLAYCD");
237 mKeyMap.emplace(201,"PAUSECD");
238 mKeyMap.emplace(202,"PROG3");
239 mKeyMap.emplace(203,"PROG4");
240 mKeyMap.emplace(204,"DASHBOARD");
241 mKeyMap.emplace(205,"SUSPEND");
242 mKeyMap.emplace(206,"CLOSE");
243 mKeyMap.emplace(207,"PLAY");
244 mKeyMap.emplace(208,"FASTFORWARD");
245 mKeyMap.emplace(209,"BASSBOOST");
246 mKeyMap.emplace(210,"PRINT");
247 mKeyMap.emplace(211,"HP");
248 mKeyMap.emplace(212,"CAMERA");
249 mKeyMap.emplace(213,"SOUND");
250 mKeyMap.emplace(214,"QUESTION");
251 mKeyMap.emplace(215,"EMAIL");
252 mKeyMap.emplace(216,"CHAT");
253 mKeyMap.emplace(217,"SEARCH");
254 mKeyMap.emplace(218,"CONNECT");
255 mKeyMap.emplace(219,"FINANCE");
256 mKeyMap.emplace(220,"SPORT");
257 mKeyMap.emplace(221,"SHOP");
258 mKeyMap.emplace(222,"ALTERASE");
259 mKeyMap.emplace(223,"CANCEL");
260 mKeyMap.emplace(224,"BRIGHTNESSDOWN");
261 mKeyMap.emplace(225,"BRIGHTNESSUP");
262 mKeyMap.emplace(226,"MEDIA");
263 mKeyMap.emplace(227,"SWITCHVIDEOMODE");
264 mKeyMap.emplace(228,"KBDILLUMTOGGLE");
265 mKeyMap.emplace(229,"KBDILLUMDOWN");
266 mKeyMap.emplace(230,"KBDILLUMUP");
267 mKeyMap.emplace(231,"SEND");
268 mKeyMap.emplace(232,"REPLY");
269 mKeyMap.emplace(233,"FORWARDMAIL");
270 mKeyMap.emplace(234,"SAVE");
271 mKeyMap.emplace(235,"DOCUMENTS");
272 mKeyMap.emplace(236,"BATTERY");
273 mKeyMap.emplace(237,"BLUETOOTH");
274 mKeyMap.emplace(238,"WLAN");
275 mKeyMap.emplace(239,"UWB");
276 mKeyMap.emplace(240,"UNKNOWN");
277 mKeyMap.emplace(241,"VIDEO_NEXT");
278 mKeyMap.emplace(242,"VIDEO_PREV");
279 mKeyMap.emplace(243,"BRIGHTNESS_CYCLE");
280 mKeyMap.emplace(244,"BRIGHTNESS_AUTO");
281 mKeyMap.emplace(245,"DISPLAY_OFF");
282 mKeyMap.emplace(246,"WWAN");
283 mKeyMap.emplace(247,"RFKILL");
284 mKeyMap.emplace(248,"MICMUTE");
285 mKeyMap.emplace(0x160,"OK");
286 mKeyMap.emplace(0x161,"SELECT");
287 mKeyMap.emplace(0x162,"GOTO");
288 mKeyMap.emplace(0x163,"CLEAR");
289 mKeyMap.emplace(0x164,"POWER2");
290 mKeyMap.emplace(0x165,"OPTION");
291 mKeyMap.emplace(0x166,"INFO");
292 mKeyMap.emplace(0x167,"TIME");
293 mKeyMap.emplace(0x168,"VENDOR");
294 mKeyMap.emplace(0x169,"ARCHIVE");
295 mKeyMap.emplace(0x16a,"PROGRAM");
296 mKeyMap.emplace(0x16b,"CHANNEL");
297 mKeyMap.emplace(0x16c,"FAVORITES");
298 mKeyMap.emplace(0x16d,"EPG");
299 mKeyMap.emplace(0x16e,"PVR");
300 mKeyMap.emplace(0x16f,"MHP");
301 mKeyMap.emplace(0x170,"LANGUAGE");
302 mKeyMap.emplace(0x171,"TITLE");
303 mKeyMap.emplace(0x172,"SUBTITLE");
304 mKeyMap.emplace(0x173,"ANGLE");
305 mKeyMap.emplace(0x174,"ZOOM");
306 mKeyMap.emplace(0x175,"MODE");
307 mKeyMap.emplace(0x176,"KEYBOARD");
308 mKeyMap.emplace(0x177,"SCREEN");
309 mKeyMap.emplace(0x178,"PC");
310 mKeyMap.emplace(0x179,"TV");
311 mKeyMap.emplace(0x17a,"TV2");
312 mKeyMap.emplace(0x17b,"VCR");
313 mKeyMap.emplace(0x17c,"VCR2");
314 mKeyMap.emplace(0x17d,"SAT");
315 mKeyMap.emplace(0x17e,"SAT2");
316 mKeyMap.emplace(0x17f,"CD");
317 mKeyMap.emplace(0x180,"TAPE");
318 mKeyMap.emplace(0x181,"RADIO");
319 mKeyMap.emplace(0x182,"TUNER");
320 mKeyMap.emplace(0x183,"PLAYER");
321 mKeyMap.emplace(0x184,"TEXT");
322 mKeyMap.emplace(0x185,"DVD");
323 mKeyMap.emplace(0x186,"AUX");
324 mKeyMap.emplace(0x187,"MP3");
325 mKeyMap.emplace(0x188,"AUDIO");
326 mKeyMap.emplace(0x189,"VIDEO");
327 mKeyMap.emplace(0x18a,"DIRECTORY");
328 mKeyMap.emplace(0x18b,"LIST");
329 mKeyMap.emplace(0x18c,"MEMO");
330 mKeyMap.emplace(0x18d,"CALENDAR");
331 mKeyMap.emplace(0x18e,"RED");
332 mKeyMap.emplace(0x18f,"GREEN");
333 mKeyMap.emplace(0x190,"YELLOW");
334 mKeyMap.emplace(0x191,"BLUE");
335 mKeyMap.emplace(0x192,"CHANNELUP");
336 mKeyMap.emplace(0x193,"CHANNELDOWN");
337 mKeyMap.emplace(0x194,"FIRST");
338 mKeyMap.emplace(0x195,"LAST");
339 mKeyMap.emplace(0x196,"AB");
340 mKeyMap.emplace(0x197,"NEXT");
341 mKeyMap.emplace(0x198,"RESTART");
342 mKeyMap.emplace(0x199,"SLOW");
343 mKeyMap.emplace(0x19a,"SHUFFLE");
344 mKeyMap.emplace(0x19b,"BREAK");
345 mKeyMap.emplace(0x19c,"PREVIOUS");
346 mKeyMap.emplace(0x19d,"DIGITS");
347 mKeyMap.emplace(0x19e,"TEEN");
348 mKeyMap.emplace(0x19f,"TWEN");
349 mKeyMap.emplace(0x1a0,"VIDEOPHONE");
350 mKeyMap.emplace(0x1a1,"GAMES");
351 mKeyMap.emplace(0x1a2,"ZOOMIN");
352 mKeyMap.emplace(0x1a3,"ZOOMOUT");
353 mKeyMap.emplace(0x1a4,"ZOOMRESET");
354 mKeyMap.emplace(0x1a5,"WORDPROCESSOR");
355 mKeyMap.emplace(0x1a6,"EDITOR");
356 mKeyMap.emplace(0x1a7,"SPREADSHEET");
357 mKeyMap.emplace(0x1a8,"GRAPHICSEDITOR");
358 mKeyMap.emplace(0x1a9,"PRESENTATION");
359 mKeyMap.emplace(0x1aa,"DATABASE");
360 mKeyMap.emplace(0x1ab,"NEWS");
361 mKeyMap.emplace(0x1ac,"VOICEMAIL");
362 mKeyMap.emplace(0x1ad,"ADDRESSBOOK");
363 mKeyMap.emplace(0x1ae,"MESSENGER");
364 mKeyMap.emplace(0x1af,"DISPLAYTOGGLE");
365 mKeyMap.emplace(0x1b0,"SPELLCHECK");
366 mKeyMap.emplace(0x1b1,"LOGOFF");
367 mKeyMap.emplace(0x1b2,"DOLLAR");
368 mKeyMap.emplace(0x1b3,"EURO");
369 mKeyMap.emplace(0x1b4,"FRAMEBACK");
370 mKeyMap.emplace(0x1b5,"FRAMEFORWARD");
371 mKeyMap.emplace(0x1b6,"CONTEXT_MENU");
372 mKeyMap.emplace(0x1b7,"MEDIA_REPEAT");
373 mKeyMap.emplace(0x1b8,"10CHANNELSUP");
374 mKeyMap.emplace(0x1b9,"10CHANNELSDOWN");
375 mKeyMap.emplace(0x1ba,"IMAGES");
376 mKeyMap.emplace(0x1c0,"DEL_EOL");
377 mKeyMap.emplace(0x1c1,"DEL_EOS");
378 mKeyMap.emplace(0x1c2,"INS_LINE");
379 mKeyMap.emplace(0x1c3,"DEL_LINE");
380 mKeyMap.emplace(0x1d0,"FN");
381 mKeyMap.emplace(0x1d1,"FN_ESC");
382 mKeyMap.emplace(0x1d2,"FN_F1");
383 mKeyMap.emplace(0x1d3,"FN_F2");
384 mKeyMap.emplace(0x1d4,"FN_F3");
385 mKeyMap.emplace(0x1d5,"FN_F4");
386 mKeyMap.emplace(0x1d6,"FN_F5");
387 mKeyMap.emplace(0x1d7,"FN_F6");
388 mKeyMap.emplace(0x1d8,"FN_F7");
389 mKeyMap.emplace(0x1d9,"FN_F8");
390 mKeyMap.emplace(0x1da,"FN_F9");
391 mKeyMap.emplace(0x1db,"FN_F10");
392 mKeyMap.emplace(0x1dc,"FN_F11");
393 mKeyMap.emplace(0x1dd,"FN_F12");
394 mKeyMap.emplace(0x1de,"FN_1");
395 mKeyMap.emplace(0x1df,"FN_2");
396 mKeyMap.emplace(0x1e0,"FN_D");
397 mKeyMap.emplace(0x1e1,"FN_E");
398 mKeyMap.emplace(0x1e2,"FN_F");
399 mKeyMap.emplace(0x1e3,"FN_S");
400 mKeyMap.emplace(0x1e4,"FN_B");
401 mKeyMap.emplace(0x1f1,"BRL_DOT1");
402 mKeyMap.emplace(0x1f2,"BRL_DOT2");
403 mKeyMap.emplace(0x1f3,"BRL_DOT3");
404 mKeyMap.emplace(0x1f4,"BRL_DOT4");
405 mKeyMap.emplace(0x1f5,"BRL_DOT5");
406 mKeyMap.emplace(0x1f6,"BRL_DOT6");
407 mKeyMap.emplace(0x1f7,"BRL_DOT7");
408 mKeyMap.emplace(0x1f8,"BRL_DOT8");
409 mKeyMap.emplace(0x1f9,"BRL_DOT9");
410 mKeyMap.emplace(0x1fa,"BRL_DOT10");
411 mKeyMap.emplace(0x200,"NUMERIC_0");
412 mKeyMap.emplace(0x201,"NUMERIC_1");
413 mKeyMap.emplace(0x202,"NUMERIC_2");
414 mKeyMap.emplace(0x203,"NUMERIC_3");
415 mKeyMap.emplace(0x204,"NUMERIC_4");
416 mKeyMap.emplace(0x205,"NUMERIC_5");
417 mKeyMap.emplace(0x206,"NUMERIC_6");
418 mKeyMap.emplace(0x207,"NUMERIC_7");
419 mKeyMap.emplace(0x208,"NUMERIC_8");
420 mKeyMap.emplace(0x209,"NUMERIC_9");
421 mKeyMap.emplace(0x20a,"NUMERIC_STAR");
422 mKeyMap.emplace(0x20b,"NUMERIC_POUND");
423 mKeyMap.emplace(0x20c,"NUMERIC_A");
424 mKeyMap.emplace(0x20d,"NUMERIC_B");
425 mKeyMap.emplace(0x20e,"NUMERIC_C");
426 mKeyMap.emplace(0x20f,"NUMERIC_D");
427 mKeyMap.emplace(0x210,"CAMERA_FOCUS");
428 mKeyMap.emplace(0x211,"WPS_BUTTON");
429 mKeyMap.emplace(0x212,"TOUCHPAD_TOGGLE");
430 mKeyMap.emplace(0x213,"TOUCHPAD_ON");
431 mKeyMap.emplace(0x214,"TOUCHPAD_OFF");
432 mKeyMap.emplace(0x215,"CAMERA_ZOOMIN");
433 mKeyMap.emplace(0x216,"CAMERA_ZOOMOUT");
434 mKeyMap.emplace(0x217,"CAMERA_UP");
435 mKeyMap.emplace(0x218,"CAMERA_DOWN");
436 mKeyMap.emplace(0x219,"CAMERA_LEFT");
437 mKeyMap.emplace(0x21a,"CAMERA_RIGHT");
438 mKeyMap.emplace(0x21b,"ATTENDANT_ON");
439 mKeyMap.emplace(0x21c,"ATTENDANT_OFF");
440 mKeyMap.emplace(0x21d,"ATTENDANT_TOGGLE");
441 mKeyMap.emplace(0x21e,"LIGHTS_TOGGLE");
442 mKeyMap.emplace(0x230,"ALS_TOGGLE");
443 mKeyMap.emplace(0x240,"BUTTONCONFIG");
444 mKeyMap.emplace(0x241,"TASKMANAGER");
445 mKeyMap.emplace(0x242,"JOURNAL");
446 mKeyMap.emplace(0x243,"CONTROLPANEL");
447 mKeyMap.emplace(0x244,"APPSELECT");
448 mKeyMap.emplace(0x245,"SCREENSAVER");
449 mKeyMap.emplace(0x246,"VOICECOMMAND");
450 mKeyMap.emplace(0x247,"ASSISTANT");
451 mKeyMap.emplace(0x250,"BRIGHTNESS_MIN");
452 mKeyMap.emplace(0x251,"BRIGHTNESS_MAX");
453 mKeyMap.emplace(0x260,"KBDINPUTASSIST_PREV");
454 mKeyMap.emplace(0x261,"KBDINPUTASSIST_NEXT");
455 mKeyMap.emplace(0x262,"KBDINPUTASSIST_PREVGROUP");
456 mKeyMap.emplace(0x263,"KBDINPUTASSIST_NEXTGROUP");
457 mKeyMap.emplace(0x264,"KBDINPUTASSIST_ACCEPT");
458 mKeyMap.emplace(0x265,"KBDINPUTASSIST_CANCEL");
459 mKeyMap.emplace(0x266,"RIGHT_UP");
460 mKeyMap.emplace(0x267,"RIGHT_DOWN");
461 mKeyMap.emplace(0x268,"LEFT_UP");
462 mKeyMap.emplace(0x269,"LEFT_DOWN");
463 mKeyMap.emplace(0x26a,"ROOT_MENU");
464 mKeyMap.emplace(0x26b,"MEDIA_TOP_MENU");
465 mKeyMap.emplace(0x26c,"NUMERIC_11");
466 mKeyMap.emplace(0x26d,"NUMERIC_12");
467 mKeyMap.emplace(0x26e,"AUDIO_DESC");
468 mKeyMap.emplace(0x26f,"3D_MODE");
469 mKeyMap.emplace(0x270,"NEXT_FAVORITE");
470 mKeyMap.emplace(0x271,"STOP_RECORD");
471 mKeyMap.emplace(0x272,"PAUSE_RECORD");
472 mKeyMap.emplace(0x273,"VOD");
473 mKeyMap.emplace(0x274,"UNMUTE");
474 mKeyMap.emplace(0x275,"FASTREVERSE");
475 mKeyMap.emplace(0x276,"SLOWREVERSE");
476 mKeyMap.emplace(0x277,"DATA");
477 mKeyMap.emplace(0x278,"ONSCREEN_KEYBOARD");
478 mKeyMap.emplace(113,"MIN_INTERESTING");
479 mKeyMap.emplace(0x2ff,"MAX");
480 mKeyMap.emplace(0x100,"MISC");
481 mKeyMap.emplace(0x100,"0");
482 mKeyMap.emplace(0x101,"1");
483 mKeyMap.emplace(0x102,"2");
484 mKeyMap.emplace(0x103,"3");
485 mKeyMap.emplace(0x104,"4");
486 mKeyMap.emplace(0x105,"5");
487 mKeyMap.emplace(0x106,"6");
488 mKeyMap.emplace(0x107,"7");
489 mKeyMap.emplace(0x108,"8");
490 mKeyMap.emplace(0x109,"9");
491 mKeyMap.emplace(0x110,"MOUSE");
492 mKeyMap.emplace(0x110,"LEFT");
493 mKeyMap.emplace(0x111,"RIGHT");
494 mKeyMap.emplace(0x112,"MIDDLE");
495 mKeyMap.emplace(0x113,"SIDE");
496 mKeyMap.emplace(0x114,"EXTRA");
497 mKeyMap.emplace(0x115,"FORWARD");
498 mKeyMap.emplace(0x116,"BACK");
499 mKeyMap.emplace(0x117,"TASK");
500 mKeyMap.emplace(0x120,"JOYSTICK");
501 mKeyMap.emplace(0x120,"TRIGGER");
502 mKeyMap.emplace(0x121,"THUMB");
503 mKeyMap.emplace(0x122,"THUMB2");
504 mKeyMap.emplace(0x123,"TOP");
505 mKeyMap.emplace(0x124,"TOP2");
506 mKeyMap.emplace(0x125,"PINKIE");
507 mKeyMap.emplace(0x126,"BASE");
508 mKeyMap.emplace(0x127,"BASE2");
509 mKeyMap.emplace(0x128,"BASE3");
510 mKeyMap.emplace(0x129,"BASE4");
511 mKeyMap.emplace(0x12a,"BASE5");
512 mKeyMap.emplace(0x12b,"BASE6");
513 mKeyMap.emplace(0x12f,"DEAD");
514 mKeyMap.emplace(0x130,"GAMEPAD");
515 mKeyMap.emplace(0x130,"SOUTH");
516 mKeyMap.emplace(0x131,"EAST");
517 mKeyMap.emplace(0x132,"C");
518 mKeyMap.emplace(0x133,"NORTH");
519 mKeyMap.emplace(0x134,"WEST");
520 mKeyMap.emplace(0x135,"Z");
521 mKeyMap.emplace(0x136,"TL");
522 mKeyMap.emplace(0x137,"TR");
523 mKeyMap.emplace(0x138,"TL2");
524 mKeyMap.emplace(0x139,"TR2");
525 mKeyMap.emplace(0x13a,"SELECT");
526 mKeyMap.emplace(0x13b,"START");
527 mKeyMap.emplace(0x13c,"MODE");
528 mKeyMap.emplace(0x13d,"THUMBL");
529 mKeyMap.emplace(0x13e,"THUMBR");
530 mKeyMap.emplace(0x140,"DIGI");
531 mKeyMap.emplace(0x140,"TOOL_PEN");
532 mKeyMap.emplace(0x141,"TOOL_RUBBER");
533 mKeyMap.emplace(0x142,"TOOL_BRUSH");
534 mKeyMap.emplace(0x143,"TOOL_PENCIL");
535 mKeyMap.emplace(0x144,"TOOL_AIRBRUSH");
536 mKeyMap.emplace(0x145,"TOOL_FINGER");
537 mKeyMap.emplace(0x146,"TOOL_MOUSE");
538 mKeyMap.emplace(0x147,"TOOL_LENS");
539 mKeyMap.emplace(0x148,"TOOL_QUINTTAP");
540 mKeyMap.emplace(0x149,"STYLUS3");
541 mKeyMap.emplace(0x14a,"TOUCH");
542 mKeyMap.emplace(0x14b,"STYLUS");
543 mKeyMap.emplace(0x14c,"STYLUS2");
544 mKeyMap.emplace(0x14d,"TOOL_DOUBLETAP");
545 mKeyMap.emplace(0x14e,"TOOL_TRIPLETAP");
546 mKeyMap.emplace(0x14f,"TOOL_QUADTAP");
547 mKeyMap.emplace(0x150,"WHEEL");
548 mKeyMap.emplace(0x150,"GEAR_DOWN");
549 mKeyMap.emplace(0x151,"GEAR_UP");
550 mKeyMap.emplace(0x220,"DPAD_UP");
551 mKeyMap.emplace(0x221,"DPAD_DOWN");
552 mKeyMap.emplace(0x222,"DPAD_LEFT");
553 mKeyMap.emplace(0x223,"DPAD_RIGHT");
554 mKeyMap.emplace(0x2c0,"TRIGGER_HAPPY");
555 mKeyMap.emplace(0x2c0,"TRIGGER_HAPPY1");
556 mKeyMap.emplace(0x2c1,"TRIGGER_HAPPY2");
557 mKeyMap.emplace(0x2c2,"TRIGGER_HAPPY3");
558 mKeyMap.emplace(0x2c3,"TRIGGER_HAPPY4");
559 mKeyMap.emplace(0x2c4,"TRIGGER_HAPPY5");
560 mKeyMap.emplace(0x2c5,"TRIGGER_HAPPY6");
561 mKeyMap.emplace(0x2c6,"TRIGGER_HAPPY7");
562 mKeyMap.emplace(0x2c7,"TRIGGER_HAPPY8");
563 mKeyMap.emplace(0x2c8,"TRIGGER_HAPPY9");
564 mKeyMap.emplace(0x2c9,"TRIGGER_HAPPY10");
565 mKeyMap.emplace(0x2ca,"TRIGGER_HAPPY11");
566 mKeyMap.emplace(0x2cb,"TRIGGER_HAPPY12");
567 mKeyMap.emplace(0x2cc,"TRIGGER_HAPPY13");
568 mKeyMap.emplace(0x2cd,"TRIGGER_HAPPY14");
569 mKeyMap.emplace(0x2ce,"TRIGGER_HAPPY15");
570 mKeyMap.emplace(0x2cf,"TRIGGER_HAPPY16");
571 mKeyMap.emplace(0x2d0,"TRIGGER_HAPPY17");
572 mKeyMap.emplace(0x2d1,"TRIGGER_HAPPY18");
573 mKeyMap.emplace(0x2d2,"TRIGGER_HAPPY19");
574 mKeyMap.emplace(0x2d3,"TRIGGER_HAPPY20");
575 mKeyMap.emplace(0x2d4,"TRIGGER_HAPPY21");
576 mKeyMap.emplace(0x2d5,"TRIGGER_HAPPY22");
577 mKeyMap.emplace(0x2d6,"TRIGGER_HAPPY23");
578 mKeyMap.emplace(0x2d7,"TRIGGER_HAPPY24");
579 mKeyMap.emplace(0x2d8,"TRIGGER_HAPPY25");
580 mKeyMap.emplace(0x2d9,"TRIGGER_HAPPY26");
581 mKeyMap.emplace(0x2da,"TRIGGER_HAPPY27");
582 mKeyMap.emplace(0x2db,"TRIGGER_HAPPY28");
583 mKeyMap.emplace(0x2dc,"TRIGGER_HAPPY29");
584 mKeyMap.emplace(0x2dd,"TRIGGER_HAPPY30");
585 mKeyMap.emplace(0x2de,"TRIGGER_HAPPY31");
586 mKeyMap.emplace(0x2df,"TRIGGER_HAPPY32");
587 mKeyMap.emplace(0x2e0,"TRIGGER_HAPPY33");
588 mKeyMap.emplace(0x2e1,"TRIGGER_HAPPY34");
589 mKeyMap.emplace(0x2e2,"TRIGGER_HAPPY35");
590 mKeyMap.emplace(0x2e3,"TRIGGER_HAPPY36");
591 mKeyMap.emplace(0x2e4,"TRIGGER_HAPPY37");
592 mKeyMap.emplace(0x2e5,"TRIGGER_HAPPY38");
593 mKeyMap.emplace(0x2e6,"TRIGGER_HAPPY39");
594 mKeyMap.emplace(0x2e7,"TRIGGER_HAPPY40");
595 }
596