blob: 5a86ff12d4e529e80d89ba7b10a2693b71d218c4 [file] [log] [blame]
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "keymap.h"
#include <sstream>
using namespace com::android::car::keventreader;
Keymap& Keymap::get() {
static Keymap gKeymap;
return gKeymap;
}
Keymap::Keymap() {
fillMap();
}
std::string Keymap::getDisplayName(int keycode) {
auto iter = mKeyMap.find(keycode), end = mKeyMap.end();
if (iter == end) {
std::stringstream ss;
ss << "unknown " << keycode;
return ss.str();
}
return iter->second;
}
void Keymap::fillMap() {
mKeyMap.emplace(0,"RESERVED");
mKeyMap.emplace(1,"ESC");
mKeyMap.emplace(2,"1");
mKeyMap.emplace(3,"2");
mKeyMap.emplace(4,"3");
mKeyMap.emplace(5,"4");
mKeyMap.emplace(6,"5");
mKeyMap.emplace(7,"6");
mKeyMap.emplace(8,"7");
mKeyMap.emplace(9,"8");
mKeyMap.emplace(10,"9");
mKeyMap.emplace(11,"0");
mKeyMap.emplace(12,"MINUS");
mKeyMap.emplace(13,"EQUAL");
mKeyMap.emplace(14,"BACKSPACE");
mKeyMap.emplace(15,"TAB");
mKeyMap.emplace(16,"Q");
mKeyMap.emplace(17,"W");
mKeyMap.emplace(18,"E");
mKeyMap.emplace(19,"R");
mKeyMap.emplace(20,"T");
mKeyMap.emplace(21,"Y");
mKeyMap.emplace(22,"U");
mKeyMap.emplace(23,"I");
mKeyMap.emplace(24,"O");
mKeyMap.emplace(25,"P");
mKeyMap.emplace(26,"LEFTBRACE");
mKeyMap.emplace(27,"RIGHTBRACE");
mKeyMap.emplace(28,"ENTER");
mKeyMap.emplace(29,"LEFTCTRL");
mKeyMap.emplace(30,"A");
mKeyMap.emplace(31,"S");
mKeyMap.emplace(32,"D");
mKeyMap.emplace(33,"F");
mKeyMap.emplace(34,"G");
mKeyMap.emplace(35,"H");
mKeyMap.emplace(36,"J");
mKeyMap.emplace(37,"K");
mKeyMap.emplace(38,"L");
mKeyMap.emplace(39,"SEMICOLON");
mKeyMap.emplace(40,"APOSTROPHE");
mKeyMap.emplace(41,"GRAVE");
mKeyMap.emplace(42,"LEFTSHIFT");
mKeyMap.emplace(43,"BACKSLASH");
mKeyMap.emplace(44,"Z");
mKeyMap.emplace(45,"X");
mKeyMap.emplace(46,"C");
mKeyMap.emplace(47,"V");
mKeyMap.emplace(48,"B");
mKeyMap.emplace(49,"N");
mKeyMap.emplace(50,"M");
mKeyMap.emplace(51,"COMMA");
mKeyMap.emplace(52,"DOT");
mKeyMap.emplace(53,"SLASH");
mKeyMap.emplace(54,"RIGHTSHIFT");
mKeyMap.emplace(55,"KPASTERISK");
mKeyMap.emplace(56,"LEFTALT");
mKeyMap.emplace(57,"SPACE");
mKeyMap.emplace(58,"CAPSLOCK");
mKeyMap.emplace(59,"F1");
mKeyMap.emplace(60,"F2");
mKeyMap.emplace(61,"F3");
mKeyMap.emplace(62,"F4");
mKeyMap.emplace(63,"F5");
mKeyMap.emplace(64,"F6");
mKeyMap.emplace(65,"F7");
mKeyMap.emplace(66,"F8");
mKeyMap.emplace(67,"F9");
mKeyMap.emplace(68,"F10");
mKeyMap.emplace(69,"NUMLOCK");
mKeyMap.emplace(70,"SCROLLLOCK");
mKeyMap.emplace(71,"KP7");
mKeyMap.emplace(72,"KP8");
mKeyMap.emplace(73,"KP9");
mKeyMap.emplace(74,"KPMINUS");
mKeyMap.emplace(75,"KP4");
mKeyMap.emplace(76,"KP5");
mKeyMap.emplace(77,"KP6");
mKeyMap.emplace(78,"KPPLUS");
mKeyMap.emplace(79,"KP1");
mKeyMap.emplace(80,"KP2");
mKeyMap.emplace(81,"KP3");
mKeyMap.emplace(82,"KP0");
mKeyMap.emplace(83,"KPDOT");
mKeyMap.emplace(85,"ZENKAKUHANKAKU");
mKeyMap.emplace(86,"102ND");
mKeyMap.emplace(87,"F11");
mKeyMap.emplace(88,"F12");
mKeyMap.emplace(89,"RO");
mKeyMap.emplace(90,"KATAKANA");
mKeyMap.emplace(91,"HIRAGANA");
mKeyMap.emplace(92,"HENKAN");
mKeyMap.emplace(93,"KATAKANAHIRAGANA");
mKeyMap.emplace(94,"MUHENKAN");
mKeyMap.emplace(95,"KPJPCOMMA");
mKeyMap.emplace(96,"KPENTER");
mKeyMap.emplace(97,"RIGHTCTRL");
mKeyMap.emplace(98,"KPSLASH");
mKeyMap.emplace(99,"SYSRQ");
mKeyMap.emplace(100,"RIGHTALT");
mKeyMap.emplace(101,"LINEFEED");
mKeyMap.emplace(102,"HOME");
mKeyMap.emplace(103,"UP");
mKeyMap.emplace(104,"PAGEUP");
mKeyMap.emplace(105,"LEFT");
mKeyMap.emplace(106,"RIGHT");
mKeyMap.emplace(107,"END");
mKeyMap.emplace(108,"DOWN");
mKeyMap.emplace(109,"PAGEDOWN");
mKeyMap.emplace(110,"INSERT");
mKeyMap.emplace(111,"DELETE");
mKeyMap.emplace(112,"MACRO");
mKeyMap.emplace(113,"MUTE");
mKeyMap.emplace(114,"VOLUMEDOWN");
mKeyMap.emplace(115,"VOLUMEUP");
mKeyMap.emplace(116,"POWER");
mKeyMap.emplace(117,"KPEQUAL");
mKeyMap.emplace(118,"KPPLUSMINUS");
mKeyMap.emplace(119,"PAUSE");
mKeyMap.emplace(120,"SCALE");
mKeyMap.emplace(121,"KPCOMMA");
mKeyMap.emplace(122,"HANGEUL");
mKeyMap.emplace(123,"HANJA");
mKeyMap.emplace(124,"YEN");
mKeyMap.emplace(125,"LEFTMETA");
mKeyMap.emplace(126,"RIGHTMETA");
mKeyMap.emplace(127,"COMPOSE");
mKeyMap.emplace(128,"STOP");
mKeyMap.emplace(129,"AGAIN");
mKeyMap.emplace(130,"PROPS");
mKeyMap.emplace(131,"UNDO");
mKeyMap.emplace(132,"FRONT");
mKeyMap.emplace(133,"COPY");
mKeyMap.emplace(134,"OPEN");
mKeyMap.emplace(135,"PASTE");
mKeyMap.emplace(136,"FIND");
mKeyMap.emplace(137,"CUT");
mKeyMap.emplace(138,"HELP");
mKeyMap.emplace(139,"MENU");
mKeyMap.emplace(140,"CALC");
mKeyMap.emplace(141,"SETUP");
mKeyMap.emplace(142,"SLEEP");
mKeyMap.emplace(143,"WAKEUP");
mKeyMap.emplace(144,"FILE");
mKeyMap.emplace(145,"SENDFILE");
mKeyMap.emplace(146,"DELETEFILE");
mKeyMap.emplace(147,"XFER");
mKeyMap.emplace(148,"PROG1");
mKeyMap.emplace(149,"PROG2");
mKeyMap.emplace(150,"WWW");
mKeyMap.emplace(151,"MSDOS");
mKeyMap.emplace(152,"SCREENLOCK");
mKeyMap.emplace(153,"ROTATE_DISPLAY");
mKeyMap.emplace(154,"CYCLEWINDOWS");
mKeyMap.emplace(155,"MAIL");
mKeyMap.emplace(156,"BOOKMARKS");
mKeyMap.emplace(157,"COMPUTER");
mKeyMap.emplace(158,"BACK");
mKeyMap.emplace(159,"FORWARD");
mKeyMap.emplace(160,"CLOSECD");
mKeyMap.emplace(161,"EJECTCD");
mKeyMap.emplace(162,"EJECTCLOSECD");
mKeyMap.emplace(163,"NEXTSONG");
mKeyMap.emplace(164,"PLAYPAUSE");
mKeyMap.emplace(165,"PREVIOUSSONG");
mKeyMap.emplace(166,"STOPCD");
mKeyMap.emplace(167,"RECORD");
mKeyMap.emplace(168,"REWIND");
mKeyMap.emplace(169,"PHONE");
mKeyMap.emplace(170,"ISO");
mKeyMap.emplace(171,"CONFIG");
mKeyMap.emplace(172,"HOMEPAGE");
mKeyMap.emplace(173,"REFRESH");
mKeyMap.emplace(174,"EXIT");
mKeyMap.emplace(175,"MOVE");
mKeyMap.emplace(176,"EDIT");
mKeyMap.emplace(177,"SCROLLUP");
mKeyMap.emplace(178,"SCROLLDOWN");
mKeyMap.emplace(179,"KPLEFTPAREN");
mKeyMap.emplace(180,"KPRIGHTPAREN");
mKeyMap.emplace(181,"NEW");
mKeyMap.emplace(182,"REDO");
mKeyMap.emplace(183,"F13");
mKeyMap.emplace(184,"F14");
mKeyMap.emplace(185,"F15");
mKeyMap.emplace(186,"F16");
mKeyMap.emplace(187,"F17");
mKeyMap.emplace(188,"F18");
mKeyMap.emplace(189,"F19");
mKeyMap.emplace(190,"F20");
mKeyMap.emplace(191,"F21");
mKeyMap.emplace(192,"F22");
mKeyMap.emplace(193,"F23");
mKeyMap.emplace(194,"F24");
mKeyMap.emplace(200,"PLAYCD");
mKeyMap.emplace(201,"PAUSECD");
mKeyMap.emplace(202,"PROG3");
mKeyMap.emplace(203,"PROG4");
mKeyMap.emplace(204,"DASHBOARD");
mKeyMap.emplace(205,"SUSPEND");
mKeyMap.emplace(206,"CLOSE");
mKeyMap.emplace(207,"PLAY");
mKeyMap.emplace(208,"FASTFORWARD");
mKeyMap.emplace(209,"BASSBOOST");
mKeyMap.emplace(210,"PRINT");
mKeyMap.emplace(211,"HP");
mKeyMap.emplace(212,"CAMERA");
mKeyMap.emplace(213,"SOUND");
mKeyMap.emplace(214,"QUESTION");
mKeyMap.emplace(215,"EMAIL");
mKeyMap.emplace(216,"CHAT");
mKeyMap.emplace(217,"SEARCH");
mKeyMap.emplace(218,"CONNECT");
mKeyMap.emplace(219,"FINANCE");
mKeyMap.emplace(220,"SPORT");
mKeyMap.emplace(221,"SHOP");
mKeyMap.emplace(222,"ALTERASE");
mKeyMap.emplace(223,"CANCEL");
mKeyMap.emplace(224,"BRIGHTNESSDOWN");
mKeyMap.emplace(225,"BRIGHTNESSUP");
mKeyMap.emplace(226,"MEDIA");
mKeyMap.emplace(227,"SWITCHVIDEOMODE");
mKeyMap.emplace(228,"KBDILLUMTOGGLE");
mKeyMap.emplace(229,"KBDILLUMDOWN");
mKeyMap.emplace(230,"KBDILLUMUP");
mKeyMap.emplace(231,"SEND");
mKeyMap.emplace(232,"REPLY");
mKeyMap.emplace(233,"FORWARDMAIL");
mKeyMap.emplace(234,"SAVE");
mKeyMap.emplace(235,"DOCUMENTS");
mKeyMap.emplace(236,"BATTERY");
mKeyMap.emplace(237,"BLUETOOTH");
mKeyMap.emplace(238,"WLAN");
mKeyMap.emplace(239,"UWB");
mKeyMap.emplace(240,"UNKNOWN");
mKeyMap.emplace(241,"VIDEO_NEXT");
mKeyMap.emplace(242,"VIDEO_PREV");
mKeyMap.emplace(243,"BRIGHTNESS_CYCLE");
mKeyMap.emplace(244,"BRIGHTNESS_AUTO");
mKeyMap.emplace(245,"DISPLAY_OFF");
mKeyMap.emplace(246,"WWAN");
mKeyMap.emplace(247,"RFKILL");
mKeyMap.emplace(248,"MICMUTE");
mKeyMap.emplace(0x160,"OK");
mKeyMap.emplace(0x161,"SELECT");
mKeyMap.emplace(0x162,"GOTO");
mKeyMap.emplace(0x163,"CLEAR");
mKeyMap.emplace(0x164,"POWER2");
mKeyMap.emplace(0x165,"OPTION");
mKeyMap.emplace(0x166,"INFO");
mKeyMap.emplace(0x167,"TIME");
mKeyMap.emplace(0x168,"VENDOR");
mKeyMap.emplace(0x169,"ARCHIVE");
mKeyMap.emplace(0x16a,"PROGRAM");
mKeyMap.emplace(0x16b,"CHANNEL");
mKeyMap.emplace(0x16c,"FAVORITES");
mKeyMap.emplace(0x16d,"EPG");
mKeyMap.emplace(0x16e,"PVR");
mKeyMap.emplace(0x16f,"MHP");
mKeyMap.emplace(0x170,"LANGUAGE");
mKeyMap.emplace(0x171,"TITLE");
mKeyMap.emplace(0x172,"SUBTITLE");
mKeyMap.emplace(0x173,"ANGLE");
mKeyMap.emplace(0x174,"ZOOM");
mKeyMap.emplace(0x175,"MODE");
mKeyMap.emplace(0x176,"KEYBOARD");
mKeyMap.emplace(0x177,"SCREEN");
mKeyMap.emplace(0x178,"PC");
mKeyMap.emplace(0x179,"TV");
mKeyMap.emplace(0x17a,"TV2");
mKeyMap.emplace(0x17b,"VCR");
mKeyMap.emplace(0x17c,"VCR2");
mKeyMap.emplace(0x17d,"SAT");
mKeyMap.emplace(0x17e,"SAT2");
mKeyMap.emplace(0x17f,"CD");
mKeyMap.emplace(0x180,"TAPE");
mKeyMap.emplace(0x181,"RADIO");
mKeyMap.emplace(0x182,"TUNER");
mKeyMap.emplace(0x183,"PLAYER");
mKeyMap.emplace(0x184,"TEXT");
mKeyMap.emplace(0x185,"DVD");
mKeyMap.emplace(0x186,"AUX");
mKeyMap.emplace(0x187,"MP3");
mKeyMap.emplace(0x188,"AUDIO");
mKeyMap.emplace(0x189,"VIDEO");
mKeyMap.emplace(0x18a,"DIRECTORY");
mKeyMap.emplace(0x18b,"LIST");
mKeyMap.emplace(0x18c,"MEMO");
mKeyMap.emplace(0x18d,"CALENDAR");
mKeyMap.emplace(0x18e,"RED");
mKeyMap.emplace(0x18f,"GREEN");
mKeyMap.emplace(0x190,"YELLOW");
mKeyMap.emplace(0x191,"BLUE");
mKeyMap.emplace(0x192,"CHANNELUP");
mKeyMap.emplace(0x193,"CHANNELDOWN");
mKeyMap.emplace(0x194,"FIRST");
mKeyMap.emplace(0x195,"LAST");
mKeyMap.emplace(0x196,"AB");
mKeyMap.emplace(0x197,"NEXT");
mKeyMap.emplace(0x198,"RESTART");
mKeyMap.emplace(0x199,"SLOW");
mKeyMap.emplace(0x19a,"SHUFFLE");
mKeyMap.emplace(0x19b,"BREAK");
mKeyMap.emplace(0x19c,"PREVIOUS");
mKeyMap.emplace(0x19d,"DIGITS");
mKeyMap.emplace(0x19e,"TEEN");
mKeyMap.emplace(0x19f,"TWEN");
mKeyMap.emplace(0x1a0,"VIDEOPHONE");
mKeyMap.emplace(0x1a1,"GAMES");
mKeyMap.emplace(0x1a2,"ZOOMIN");
mKeyMap.emplace(0x1a3,"ZOOMOUT");
mKeyMap.emplace(0x1a4,"ZOOMRESET");
mKeyMap.emplace(0x1a5,"WORDPROCESSOR");
mKeyMap.emplace(0x1a6,"EDITOR");
mKeyMap.emplace(0x1a7,"SPREADSHEET");
mKeyMap.emplace(0x1a8,"GRAPHICSEDITOR");
mKeyMap.emplace(0x1a9,"PRESENTATION");
mKeyMap.emplace(0x1aa,"DATABASE");
mKeyMap.emplace(0x1ab,"NEWS");
mKeyMap.emplace(0x1ac,"VOICEMAIL");
mKeyMap.emplace(0x1ad,"ADDRESSBOOK");
mKeyMap.emplace(0x1ae,"MESSENGER");
mKeyMap.emplace(0x1af,"DISPLAYTOGGLE");
mKeyMap.emplace(0x1b0,"SPELLCHECK");
mKeyMap.emplace(0x1b1,"LOGOFF");
mKeyMap.emplace(0x1b2,"DOLLAR");
mKeyMap.emplace(0x1b3,"EURO");
mKeyMap.emplace(0x1b4,"FRAMEBACK");
mKeyMap.emplace(0x1b5,"FRAMEFORWARD");
mKeyMap.emplace(0x1b6,"CONTEXT_MENU");
mKeyMap.emplace(0x1b7,"MEDIA_REPEAT");
mKeyMap.emplace(0x1b8,"10CHANNELSUP");
mKeyMap.emplace(0x1b9,"10CHANNELSDOWN");
mKeyMap.emplace(0x1ba,"IMAGES");
mKeyMap.emplace(0x1c0,"DEL_EOL");
mKeyMap.emplace(0x1c1,"DEL_EOS");
mKeyMap.emplace(0x1c2,"INS_LINE");
mKeyMap.emplace(0x1c3,"DEL_LINE");
mKeyMap.emplace(0x1d0,"FN");
mKeyMap.emplace(0x1d1,"FN_ESC");
mKeyMap.emplace(0x1d2,"FN_F1");
mKeyMap.emplace(0x1d3,"FN_F2");
mKeyMap.emplace(0x1d4,"FN_F3");
mKeyMap.emplace(0x1d5,"FN_F4");
mKeyMap.emplace(0x1d6,"FN_F5");
mKeyMap.emplace(0x1d7,"FN_F6");
mKeyMap.emplace(0x1d8,"FN_F7");
mKeyMap.emplace(0x1d9,"FN_F8");
mKeyMap.emplace(0x1da,"FN_F9");
mKeyMap.emplace(0x1db,"FN_F10");
mKeyMap.emplace(0x1dc,"FN_F11");
mKeyMap.emplace(0x1dd,"FN_F12");
mKeyMap.emplace(0x1de,"FN_1");
mKeyMap.emplace(0x1df,"FN_2");
mKeyMap.emplace(0x1e0,"FN_D");
mKeyMap.emplace(0x1e1,"FN_E");
mKeyMap.emplace(0x1e2,"FN_F");
mKeyMap.emplace(0x1e3,"FN_S");
mKeyMap.emplace(0x1e4,"FN_B");
mKeyMap.emplace(0x1f1,"BRL_DOT1");
mKeyMap.emplace(0x1f2,"BRL_DOT2");
mKeyMap.emplace(0x1f3,"BRL_DOT3");
mKeyMap.emplace(0x1f4,"BRL_DOT4");
mKeyMap.emplace(0x1f5,"BRL_DOT5");
mKeyMap.emplace(0x1f6,"BRL_DOT6");
mKeyMap.emplace(0x1f7,"BRL_DOT7");
mKeyMap.emplace(0x1f8,"BRL_DOT8");
mKeyMap.emplace(0x1f9,"BRL_DOT9");
mKeyMap.emplace(0x1fa,"BRL_DOT10");
mKeyMap.emplace(0x200,"NUMERIC_0");
mKeyMap.emplace(0x201,"NUMERIC_1");
mKeyMap.emplace(0x202,"NUMERIC_2");
mKeyMap.emplace(0x203,"NUMERIC_3");
mKeyMap.emplace(0x204,"NUMERIC_4");
mKeyMap.emplace(0x205,"NUMERIC_5");
mKeyMap.emplace(0x206,"NUMERIC_6");
mKeyMap.emplace(0x207,"NUMERIC_7");
mKeyMap.emplace(0x208,"NUMERIC_8");
mKeyMap.emplace(0x209,"NUMERIC_9");
mKeyMap.emplace(0x20a,"NUMERIC_STAR");
mKeyMap.emplace(0x20b,"NUMERIC_POUND");
mKeyMap.emplace(0x20c,"NUMERIC_A");
mKeyMap.emplace(0x20d,"NUMERIC_B");
mKeyMap.emplace(0x20e,"NUMERIC_C");
mKeyMap.emplace(0x20f,"NUMERIC_D");
mKeyMap.emplace(0x210,"CAMERA_FOCUS");
mKeyMap.emplace(0x211,"WPS_BUTTON");
mKeyMap.emplace(0x212,"TOUCHPAD_TOGGLE");
mKeyMap.emplace(0x213,"TOUCHPAD_ON");
mKeyMap.emplace(0x214,"TOUCHPAD_OFF");
mKeyMap.emplace(0x215,"CAMERA_ZOOMIN");
mKeyMap.emplace(0x216,"CAMERA_ZOOMOUT");
mKeyMap.emplace(0x217,"CAMERA_UP");
mKeyMap.emplace(0x218,"CAMERA_DOWN");
mKeyMap.emplace(0x219,"CAMERA_LEFT");
mKeyMap.emplace(0x21a,"CAMERA_RIGHT");
mKeyMap.emplace(0x21b,"ATTENDANT_ON");
mKeyMap.emplace(0x21c,"ATTENDANT_OFF");
mKeyMap.emplace(0x21d,"ATTENDANT_TOGGLE");
mKeyMap.emplace(0x21e,"LIGHTS_TOGGLE");
mKeyMap.emplace(0x230,"ALS_TOGGLE");
mKeyMap.emplace(0x240,"BUTTONCONFIG");
mKeyMap.emplace(0x241,"TASKMANAGER");
mKeyMap.emplace(0x242,"JOURNAL");
mKeyMap.emplace(0x243,"CONTROLPANEL");
mKeyMap.emplace(0x244,"APPSELECT");
mKeyMap.emplace(0x245,"SCREENSAVER");
mKeyMap.emplace(0x246,"VOICECOMMAND");
mKeyMap.emplace(0x247,"ASSISTANT");
mKeyMap.emplace(0x250,"BRIGHTNESS_MIN");
mKeyMap.emplace(0x251,"BRIGHTNESS_MAX");
mKeyMap.emplace(0x260,"KBDINPUTASSIST_PREV");
mKeyMap.emplace(0x261,"KBDINPUTASSIST_NEXT");
mKeyMap.emplace(0x262,"KBDINPUTASSIST_PREVGROUP");
mKeyMap.emplace(0x263,"KBDINPUTASSIST_NEXTGROUP");
mKeyMap.emplace(0x264,"KBDINPUTASSIST_ACCEPT");
mKeyMap.emplace(0x265,"KBDINPUTASSIST_CANCEL");
mKeyMap.emplace(0x266,"RIGHT_UP");
mKeyMap.emplace(0x267,"RIGHT_DOWN");
mKeyMap.emplace(0x268,"LEFT_UP");
mKeyMap.emplace(0x269,"LEFT_DOWN");
mKeyMap.emplace(0x26a,"ROOT_MENU");
mKeyMap.emplace(0x26b,"MEDIA_TOP_MENU");
mKeyMap.emplace(0x26c,"NUMERIC_11");
mKeyMap.emplace(0x26d,"NUMERIC_12");
mKeyMap.emplace(0x26e,"AUDIO_DESC");
mKeyMap.emplace(0x26f,"3D_MODE");
mKeyMap.emplace(0x270,"NEXT_FAVORITE");
mKeyMap.emplace(0x271,"STOP_RECORD");
mKeyMap.emplace(0x272,"PAUSE_RECORD");
mKeyMap.emplace(0x273,"VOD");
mKeyMap.emplace(0x274,"UNMUTE");
mKeyMap.emplace(0x275,"FASTREVERSE");
mKeyMap.emplace(0x276,"SLOWREVERSE");
mKeyMap.emplace(0x277,"DATA");
mKeyMap.emplace(0x278,"ONSCREEN_KEYBOARD");
mKeyMap.emplace(113,"MIN_INTERESTING");
mKeyMap.emplace(0x2ff,"MAX");
mKeyMap.emplace(0x100,"MISC");
mKeyMap.emplace(0x100,"0");
mKeyMap.emplace(0x101,"1");
mKeyMap.emplace(0x102,"2");
mKeyMap.emplace(0x103,"3");
mKeyMap.emplace(0x104,"4");
mKeyMap.emplace(0x105,"5");
mKeyMap.emplace(0x106,"6");
mKeyMap.emplace(0x107,"7");
mKeyMap.emplace(0x108,"8");
mKeyMap.emplace(0x109,"9");
mKeyMap.emplace(0x110,"MOUSE");
mKeyMap.emplace(0x110,"LEFT");
mKeyMap.emplace(0x111,"RIGHT");
mKeyMap.emplace(0x112,"MIDDLE");
mKeyMap.emplace(0x113,"SIDE");
mKeyMap.emplace(0x114,"EXTRA");
mKeyMap.emplace(0x115,"FORWARD");
mKeyMap.emplace(0x116,"BACK");
mKeyMap.emplace(0x117,"TASK");
mKeyMap.emplace(0x120,"JOYSTICK");
mKeyMap.emplace(0x120,"TRIGGER");
mKeyMap.emplace(0x121,"THUMB");
mKeyMap.emplace(0x122,"THUMB2");
mKeyMap.emplace(0x123,"TOP");
mKeyMap.emplace(0x124,"TOP2");
mKeyMap.emplace(0x125,"PINKIE");
mKeyMap.emplace(0x126,"BASE");
mKeyMap.emplace(0x127,"BASE2");
mKeyMap.emplace(0x128,"BASE3");
mKeyMap.emplace(0x129,"BASE4");
mKeyMap.emplace(0x12a,"BASE5");
mKeyMap.emplace(0x12b,"BASE6");
mKeyMap.emplace(0x12f,"DEAD");
mKeyMap.emplace(0x130,"GAMEPAD");
mKeyMap.emplace(0x130,"SOUTH");
mKeyMap.emplace(0x131,"EAST");
mKeyMap.emplace(0x132,"C");
mKeyMap.emplace(0x133,"NORTH");
mKeyMap.emplace(0x134,"WEST");
mKeyMap.emplace(0x135,"Z");
mKeyMap.emplace(0x136,"TL");
mKeyMap.emplace(0x137,"TR");
mKeyMap.emplace(0x138,"TL2");
mKeyMap.emplace(0x139,"TR2");
mKeyMap.emplace(0x13a,"SELECT");
mKeyMap.emplace(0x13b,"START");
mKeyMap.emplace(0x13c,"MODE");
mKeyMap.emplace(0x13d,"THUMBL");
mKeyMap.emplace(0x13e,"THUMBR");
mKeyMap.emplace(0x140,"DIGI");
mKeyMap.emplace(0x140,"TOOL_PEN");
mKeyMap.emplace(0x141,"TOOL_RUBBER");
mKeyMap.emplace(0x142,"TOOL_BRUSH");
mKeyMap.emplace(0x143,"TOOL_PENCIL");
mKeyMap.emplace(0x144,"TOOL_AIRBRUSH");
mKeyMap.emplace(0x145,"TOOL_FINGER");
mKeyMap.emplace(0x146,"TOOL_MOUSE");
mKeyMap.emplace(0x147,"TOOL_LENS");
mKeyMap.emplace(0x148,"TOOL_QUINTTAP");
mKeyMap.emplace(0x149,"STYLUS3");
mKeyMap.emplace(0x14a,"TOUCH");
mKeyMap.emplace(0x14b,"STYLUS");
mKeyMap.emplace(0x14c,"STYLUS2");
mKeyMap.emplace(0x14d,"TOOL_DOUBLETAP");
mKeyMap.emplace(0x14e,"TOOL_TRIPLETAP");
mKeyMap.emplace(0x14f,"TOOL_QUADTAP");
mKeyMap.emplace(0x150,"WHEEL");
mKeyMap.emplace(0x150,"GEAR_DOWN");
mKeyMap.emplace(0x151,"GEAR_UP");
mKeyMap.emplace(0x220,"DPAD_UP");
mKeyMap.emplace(0x221,"DPAD_DOWN");
mKeyMap.emplace(0x222,"DPAD_LEFT");
mKeyMap.emplace(0x223,"DPAD_RIGHT");
mKeyMap.emplace(0x2c0,"TRIGGER_HAPPY");
mKeyMap.emplace(0x2c0,"TRIGGER_HAPPY1");
mKeyMap.emplace(0x2c1,"TRIGGER_HAPPY2");
mKeyMap.emplace(0x2c2,"TRIGGER_HAPPY3");
mKeyMap.emplace(0x2c3,"TRIGGER_HAPPY4");
mKeyMap.emplace(0x2c4,"TRIGGER_HAPPY5");
mKeyMap.emplace(0x2c5,"TRIGGER_HAPPY6");
mKeyMap.emplace(0x2c6,"TRIGGER_HAPPY7");
mKeyMap.emplace(0x2c7,"TRIGGER_HAPPY8");
mKeyMap.emplace(0x2c8,"TRIGGER_HAPPY9");
mKeyMap.emplace(0x2c9,"TRIGGER_HAPPY10");
mKeyMap.emplace(0x2ca,"TRIGGER_HAPPY11");
mKeyMap.emplace(0x2cb,"TRIGGER_HAPPY12");
mKeyMap.emplace(0x2cc,"TRIGGER_HAPPY13");
mKeyMap.emplace(0x2cd,"TRIGGER_HAPPY14");
mKeyMap.emplace(0x2ce,"TRIGGER_HAPPY15");
mKeyMap.emplace(0x2cf,"TRIGGER_HAPPY16");
mKeyMap.emplace(0x2d0,"TRIGGER_HAPPY17");
mKeyMap.emplace(0x2d1,"TRIGGER_HAPPY18");
mKeyMap.emplace(0x2d2,"TRIGGER_HAPPY19");
mKeyMap.emplace(0x2d3,"TRIGGER_HAPPY20");
mKeyMap.emplace(0x2d4,"TRIGGER_HAPPY21");
mKeyMap.emplace(0x2d5,"TRIGGER_HAPPY22");
mKeyMap.emplace(0x2d6,"TRIGGER_HAPPY23");
mKeyMap.emplace(0x2d7,"TRIGGER_HAPPY24");
mKeyMap.emplace(0x2d8,"TRIGGER_HAPPY25");
mKeyMap.emplace(0x2d9,"TRIGGER_HAPPY26");
mKeyMap.emplace(0x2da,"TRIGGER_HAPPY27");
mKeyMap.emplace(0x2db,"TRIGGER_HAPPY28");
mKeyMap.emplace(0x2dc,"TRIGGER_HAPPY29");
mKeyMap.emplace(0x2dd,"TRIGGER_HAPPY30");
mKeyMap.emplace(0x2de,"TRIGGER_HAPPY31");
mKeyMap.emplace(0x2df,"TRIGGER_HAPPY32");
mKeyMap.emplace(0x2e0,"TRIGGER_HAPPY33");
mKeyMap.emplace(0x2e1,"TRIGGER_HAPPY34");
mKeyMap.emplace(0x2e2,"TRIGGER_HAPPY35");
mKeyMap.emplace(0x2e3,"TRIGGER_HAPPY36");
mKeyMap.emplace(0x2e4,"TRIGGER_HAPPY37");
mKeyMap.emplace(0x2e5,"TRIGGER_HAPPY38");
mKeyMap.emplace(0x2e6,"TRIGGER_HAPPY39");
mKeyMap.emplace(0x2e7,"TRIGGER_HAPPY40");
}