diff --git a/config/keyboard/Readme.md b/config/keyboard/Readme.md index d830d2ed..7e35dee5 100644 --- a/config/keyboard/Readme.md +++ b/config/keyboard/Readme.md @@ -1,11 +1,543 @@ - - - -0 = key up -1 = key down -2 = key hold - -dict_items([(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_ -'), (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_MIN_INTERESTING', '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', 'KEY_HANGUEL']), (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', 'KEY_SCREENLOCK']), (153, ['KEY_DIRECTION', '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', 'KEY_BRIGHTNESS_ZERO']), (245, 'KEY_DISPLAY_OFF'), (246, ['KEY_WIMAX', 'KEY_WWAN']), (247, 'KEY_RFKILL'), (248, 'KEY_MICMUTE'), (256, ['BTN_0', 'BTN_MISC']), (257, 'BTN_1'), (258, 'BTN_2'), (259, 'BTN_3'), (260, 'BTN_4'), (261, 'BTN_5'), (262, 'BTN_6'), (263, 'BTN_7'), (264, 'BTN_8'), (265, 'BTN_9'), (272, ['BTN_LEFT', 'BTN_MOUSE']), (273, 'BTN_RIGHT'), (274, 'BTN_MIDDLE'), (275, 'BTN_SIDE'), (276, 'BTN_EXTRA'), (277, 'BTN_FORWARD'), (278, 'BTN_BACK'), (279, 'BTN_TASK'), (288, ['BTN_JOYSTICK', 'BTN_TRIGGER']), (289, 'BTN_THUMB'), (290, 'BTN_THUMB2'), (291, 'BTN_TOP'), (292, 'BTN_TOP2'), (293, 'BTN_PINKIE'), (294, 'BTN_BASE'), (295, 'BTN_BASE2'), (296, 'BTN_BASE3'), (297, 'BTN_BASE4'), (298, 'BTN_BASE5'), (299, 'BTN_BASE6'), (303, 'BTN_DEAD'), (304, ['BTN_A', 'BTN_GAMEPAD', 'BTN_SOUTH']), (305, ['BTN_B', 'BTN_EAST']), (306, 'BTN_C'), (307, ['BTN_NORTH', 'BTN_X']), (308, ['BTN_WEST', 'BTN_Y']), (309, 'BTN_Z'), (310, 'BTN_TL'), (311, 'BTN_TR'), (312, 'BTN_TL2'), (313, 'BTN_TR2'), (314, 'BTN_SELECT'), (315, 'BTN_START'), (316, 'BTN_MODE'), (317, 'BTN_THUMBL'), (318, 'BTN_THUMBR'), (320, ['BTN_DIGI', 'BTN_TOOL_PEN']), (321, 'BTN_TOOL_RUBBER'), (322, 'BTN_TOOL_BRUSH'), (323, 'BTN_TOOL_PENCIL'), (324, 'BTN_TOOL_AIRBRUSH'), (325, 'BTN_TOOL_FINGER'), (326, 'BTN_TOOL_MOUSE'), (327, 'BTN_TOOL_LENS'), (328, 'BTN_TOOL_QUINTTAP'), (330, 'BTN_TOUCH'), (331, 'BTN_STYLUS'), (332, 'BTN_STYLUS2'), (333, 'BTN_TOOL_DOUBLETAP'), (334, 'BTN_TOOL_TRIPLETAP'), (335, 'BTN_TOOL_QUADTAP'), (336, ['BTN_GEAR_DOWN', 'BTN_WHEEL']), (337, 'BTN_GEAR_UP'), (352, 'KEY_OK'), (353, 'KEY_SELECT'), (354, 'KEY_GOTO'), (355, 'KEY_CLEAR'), (356, 'KEY_POWER2'), (357, 'KEY_OPTION'), (358, 'KEY_INFO'), (359, 'KEY_TIME'), (360, 'KEY_VENDOR'), (361, 'KEY_ARCHIVE'), (362, 'KEY_PROGRAM'), (363, 'KEY_CHANNEL'), (364, 'KEY_FAVORITES'), (365, 'KEY_EPG'), (366, 'KEY_PVR'), (367, 'KEY_MHP'), (368, 'KEY_LANGUAGE'), (369, 'KEY_TITLE'), (370, 'KEY_SUBTITLE'), (371, 'KEY_ANGLE'), (372, 'KEY_ZOOM'), (373, 'KEY_MODE'), (374, 'KEY_KEYBOARD'), (375, 'KEY_SCREEN'), (376, 'KEY_PC'), (377, 'KEY_TV'), (378, 'KEY_TV2'), (379, 'KEY_VCR'), (380, 'KEY_VCR2'), (381, 'KEY_SAT'), (382, 'KEY_SAT2'), (383, 'KEY_CD'), (384, 'KEY_TAPE'), (385, 'KEY_RADIO'), (386, 'KEY_TUNER'), (387, 'KEY_PLAYER'), (388, 'KEY_TEXT'), (389, 'KEY_DVD'), (390, 'KEY_AUX'), (391, 'KEY_MP3'), (392, 'KEY_AUDIO'), (393, 'KEY_VIDEO'), (394, 'KEY_DIRECTORY'), (395, 'KEY_LIST'), (396, 'KEY_MEMO'), (397, 'KEY_CALENDAR'), (398, 'KEY_RED'), (399, 'KEY_GREEN'), (400, 'KEY_YELLOW'), (401, 'KEY_BLUE'), (402, 'KEY_CHANNELUP'), (403, 'KEY_CHANNELDOWN'), (404, 'KEY_FIRST'), (405, 'KEY_LAST'), (406, 'KEY_AB'), (407, 'KEY_NEXT'), (408, 'KEY_RESTART'), (409, 'KEY_SLOW'), (410, 'KEY_SHUFFLE'), (411, 'KEY_BREAK'), (412, 'KEY_PREVIOUS'), (413, 'KEY_DIGITS'), (414, 'KEY_TEEN'), (415, 'KEY_TWEN'), (416, 'KEY_VIDEOPHONE'), (417, 'KEY_GAMES'), (418, 'KEY_ZOOMIN'), (419, 'KEY_ZOOMOUT'), (420, 'KEY_ZOOMRESET'), (421, 'KEY_WORDPROCESSOR'), (422, 'KEY_EDITOR'), (423, 'KEY_SPREADSHEET'), (424, 'KEY_GRAPHICSEDITOR'), (425, 'KEY_PRESENTATION'), (426, 'KEY_DATABASE'), (427, 'KEY_NEWS'), (428, 'KEY_VOICEMAIL'), (429, 'KEY_ADDRESSBOOK'), (430, 'KEY_MESSENGER'), (431, ['KEY_BRIGHTNESS_TOGGLE', 'KEY_DISPLAYTOGGLE']), (432, 'KEY_SPELLCHECK'), (433, 'KEY_LOGOFF'), (434, 'KEY_DOLLAR'), (435, 'KEY_EURO'), (436, 'KEY_FRAMEBACK'), (437, 'KEY_FRAMEFORWARD'), (438, 'KEY_CONTEXT_MENU'), (439, 'KEY_MEDIA_REPEAT'), (440, 'KEY_10CHANNELSUP'), (441, 'KEY_10CHANNELSDOWN'), (442, 'KEY_IMAGES'), (448, 'KEY_DEL_EOL'), (449, 'KEY_DEL_EOS'), (450, 'KEY_INS_LINE'), (451, 'KEY_DEL_LINE'), (464, 'KEY_FN'), (465, 'KEY_FN_ESC'), (466, 'KEY_FN_F1'), (467, 'KEY_FN_F2'), (468, 'KEY_FN_F3'), (469, 'KEY_FN_F4'), (470, 'KEY_FN_F5'), (471, 'KEY_FN_F6'), (472, 'KEY_FN_F7'), (473, 'KEY_FN_F8'), (474, 'KEY_FN_F9'), (475, 'KEY_FN_F10'), (476, 'KEY_FN_F11'), (477, 'KEY_FN_F12'), (478, 'KEY_FN_1'), (479, 'KEY_FN_2'), (480, 'KEY_FN_D'), (481, 'KEY_FN_E'), (482, 'KEY_FN_F'), (483, 'KEY_FN_S'), (484, 'KEY_FN_B'), (497, 'KEY_BRL_DOT1'), (498, 'KEY_BRL_DOT2'), (499, 'KEY_BRL_DOT3'), (500, 'KEY_BRL_DOT4'), (501, 'KEY_BRL_DOT5'), (502, 'KEY_BRL_DOT6'), (503, 'KEY_BRL_DOT7'), (504, 'KEY_BRL_DOT8'), (505, 'KEY_BRL_DOT9'), (506, 'KEY_BRL_DOT10'), (512, 'KEY_NUMERIC_0'), (513, 'KEY_NUMERIC_1'), (514, 'KEY_NUMERIC_2'), (515, 'KEY_NUMERIC_3'), (516, 'KEY_NUMERIC_4'), (517, 'KEY_NUMERIC_5'), (518, 'KEY_NUMERIC_6'), (519, 'KEY_NUMERIC_7'), (520, 'KEY_NUMERIC_8'), (521, 'KEY_NUMERIC_9'), (522, 'KEY_NUMERIC_STAR'), (523, 'KEY_NUMERIC_POUND'), (524, 'KEY_NUMERIC_A'), (525, 'KEY_NUMERIC_B'), (526, 'KEY_NUMERIC_C'), (527, 'KEY_NUMERIC_D'), (528, 'KEY_CAMERA_FOCUS'), (529, 'KEY_WPS_BUTTON'), (530, 'KEY_TOUCHPAD_TOGGLE'), (531, 'KEY_TOUCHPAD_ON'), (532, 'KEY_TOUCHPAD_OFF'), (533, 'KEY_CAMERA_ZOOMIN'), (534, 'KEY_CAMERA_ZOOMOUT'), (535, 'KEY_CAMERA_UP'), (536, 'KEY_CAMERA_DOWN'), (537, 'KEY_CAMERA_LEFT'), (538, 'KEY_CAMERA_RIGHT'), (539, 'KEY_ATTENDANT_ON'), (540, 'KEY_ATTENDANT_OFF'), (541, 'KEY_ATTENDANT_TOGGLE'), (542, 'KEY_LIGHTS_TOGGLE'), (544, 'BTN_DPAD_UP'), (545, 'BTN_DPAD_DOWN'), (546, 'BTN_DPAD_LEFT'), (547, 'BTN_DPAD_RIGHT'), (560, 'KEY_ALS_TOGGLE'), (576, 'KEY_BUTTONCONFIG'), (577, 'KEY_TASKMANAGER'), (578, 'KEY_JOURNAL'), (579, 'KEY_CONTROLPANEL'), (580, 'KEY_APPSELECT'), (581, 'KEY_SCREENSAVER'), (582, 'KEY_VOICECOMMAND'), (592, 'KEY_BRIGHTNESS_MIN'), (593, 'KEY_BRIGHTNESS_MAX'), (608, 'KEY_KBDINPUTASSIST_PREV'), (609, 'KEY_KBDINPUTASSIST_NEXT'), (610, 'KEY_KBDINPUTASSIST_PREVGROUP'), (611, 'KEY_KBDINPUTASSIST_NEXTGROUP'), (612, 'KEY_KBDINPUTASSIST_ACCEPT'), (613, 'KEY_KBDINPUTASSIST_CANCEL'), (704, ['BTN_TRIGGER_HAPPY', 'BTN_TRIGGER_HAPPY1']), (705, 'BTN_TRIGGER_HAPPY2'), (706, 'BTN_TRIGGER_HAPPY3'), (707, 'BTN_TRIGGER_HAPPY4'), (708, 'BTN_TRIGGER_HAPPY5'), (709, 'BTN_TRIGGER_HAPPY6'), (710, 'BTN_TRIGGER_HAPPY7'), (711, 'BTN_TRIGGER_HAPPY8'), (712, 'BTN_TRIGGER_HAPPY9'), (713, 'BTN_TRIGGER_HAPPY10'), (714, 'BTN_TRIGGER_HAPPY11'), (715, 'BTN_TRIGGER_HAPPY12'), (716, 'BTN_TRIGGER_HAPPY13'), (717, 'BTN_TRIGGER_HAPPY14'), (718, 'BTN_TRIGGER_HAPPY15'), (719, 'BTN_TRIGGER_HAPPY16'), (720, 'BTN_TRIGGER_HAPPY17'), (721, 'BTN_TRIGGER_HAPPY18'), (722, 'BTN_TRIGGER_HAPPY19'), (723, 'BTN_TRIGGER_HAPPY20'), (724, 'BTN_TRIGGER_HAPPY21'), (725, 'BTN_TRIGGER_HAPPY22'), (726, 'BTN_TRIGGER_HAPPY23'), (727, 'BTN_TRIGGER_HAPPY24'), (728, 'BTN_TRIGGER_HAPPY25'), (729, 'BTN_TRIGGER_HAPPY26'), (730, 'BTN_TRIGGER_HAPPY27'), (731, 'BTN_TRIGGER_HAPPY28'), (732, 'BTN_TRIGGER_HAPPY29'), (733, 'BTN_TRIGGER_HAPPY30'), (734, 'BTN_TRIGGER_HAPPY31'), (735, 'BTN_TRIGGER_HAPPY32'), (736, 'BTN_TRIGGER_HAPPY33'), (737, 'BTN_TRIGGER_HAPPY34'), (738, 'BTN_TRIGGER_HAPPY35'), (739, 'BTN_TRIGGER_HAPPY36'), (740, 'BTN_TRIGGER_HAPPY37'), (741, 'BTN_TRIGGER_HAPPY38'), (742, 'BTN_TRIGGER_HAPPY39'), (743, 'BTN_TRIGGER_HAPPY40')]) +Keymap for fenrir +KEY_RESERVED +KEY_ESC +KEY_1 +KEY_2 +KEY_3 +KEY_4 +KEY_5 +KEY_6 +KEY_7 +KEY_8 +KEY_9 +KEY_0 +KEY_MINUS +KEY_EQUAL +KEY_BACKSPACE +KEY_TAB +KEY_Q +KEY_W +KEY_E +KEY_R +KEY_T +KEY_Y +KEY_U +KEY_I +KEY_O +KEY_P +KEY_LEFTBRACE +KEY_RIGHTBRACE +KEY_ENTER +KEY_LEFTCTRL +KEY_A +KEY_S +KEY_D +KEY_F +KEY_G +KEY_H +KEY_J +KEY_K +KEY_L +KEY_SEMICOLON +KEY_APOSTROPHE +KEY_GRAVE +KEY_LEFTSHIFT +KEY_BACKSLASH +KEY_Z +KEY_X +KEY_C +KEY_V +KEY_B +KEY_N +KEY_M +KEY_COMMA +KEY_DOT +KEY_SLASH +KEY_RIGHTSHIFT +KEY_KPASTERISK +KEY_LEFTALT +KEY_SPACE +KEY_CAPSLOCK +KEY_F1 +KEY_F2 +KEY_F3 +KEY_F4 +KEY_F5 +KEY_F6 +KEY_F7 +KEY_F8 +KEY_F9 +KEY_F10 +KEY_NUMLOCK +KEY_SCROLLLOCK +KEY_KP7 +KEY_KP8 +KEY_KP9 +KEY_KPMINUS +KEY_KP4 +KEY_KP5 +KEY_KP6 +KEY_KPPLUS +KEY_KP1 +KEY_KP2 +KEY_KP3 +KEY_KP0 +KEY_KPDOT +KEY_ZENKAKUHANKAKU +KEY_102ND +KEY_F11 +KEY_F12 +KEY_RO +KEY_KATAKANA +KEY_HIRAGANA +KEY_HENKAN +KEY_KATAKANAHIRAGANA +KEY_MUHENKAN +KEY_KPJPCOMMA +KEY_KPENTER +KEY_RIGHTCTRL +KEY_KPSLASH +KEY_SYSRQ +KEY_RIGHTALT +KEY_LINEFEED +KEY_HOME +KEY_UP +KEY_PAGEUP +KEY_LEFT +KEY_RIGHT +KEY_END +KEY_DOWN +KEY_PAGEDOWN +KEY_INSERT +KEY_DELETE +KEY_MACRO +['KEY_MIN_INTERESTING', 'KEY_MUTE'] +KEY_VOLUMEDOWN +KEY_VOLUMEUP +KEY_POWER +KEY_KPEQUAL +KEY_KPPLUSMINUS +KEY_PAUSE +KEY_SCALE +KEY_KPCOMMA +['KEY_HANGEUL', 'KEY_HANGUEL'] +KEY_HANJA +KEY_YEN +KEY_LEFTMETA +KEY_RIGHTMETA +KEY_COMPOSE +KEY_STOP +KEY_AGAIN +KEY_PROPS +KEY_UNDO +KEY_FRONT +KEY_COPY +KEY_OPEN +KEY_PASTE +KEY_FIND +KEY_CUT +KEY_HELP +KEY_MENU +KEY_CALC +KEY_SETUP +KEY_SLEEP +KEY_WAKEUP +KEY_FILE +KEY_SENDFILE +KEY_DELETEFILE +KEY_XFER +KEY_PROG1 +KEY_PROG2 +KEY_WWW +KEY_MSDOS +['KEY_COFFEE', 'KEY_SCREENLOCK'] +['KEY_DIRECTION', 'KEY_ROTATE_DISPLAY'] +KEY_CYCLEWINDOWS +KEY_MAIL +KEY_BOOKMARKS +KEY_COMPUTER +KEY_BACK +KEY_FORWARD +KEY_CLOSECD +KEY_EJECTCD +KEY_EJECTCLOSECD +KEY_NEXTSONG +KEY_PLAYPAUSE +KEY_PREVIOUSSONG +KEY_STOPCD +KEY_RECORD +KEY_REWIND +KEY_PHONE +KEY_ISO +KEY_CONFIG +KEY_HOMEPAGE +KEY_REFRESH +KEY_EXIT +KEY_MOVE +KEY_EDIT +KEY_SCROLLUP +KEY_SCROLLDOWN +KEY_KPLEFTPAREN +KEY_KPRIGHTPAREN +KEY_NEW +KEY_REDO +KEY_F13 +KEY_F14 +KEY_F15 +KEY_F16 +KEY_F17 +KEY_F18 +KEY_F19 +KEY_F20 +KEY_F21 +KEY_F22 +KEY_F23 +KEY_F24 +KEY_PLAYCD +KEY_PAUSECD +KEY_PROG3 +KEY_PROG4 +KEY_DASHBOARD +KEY_SUSPEND +KEY_CLOSE +KEY_PLAY +KEY_FASTFORWARD +KEY_BASSBOOST +KEY_PRINT +KEY_HP +KEY_CAMERA +KEY_SOUND +KEY_QUESTION +KEY_EMAIL +KEY_CHAT +KEY_SEARCH +KEY_CONNECT +KEY_FINANCE +KEY_SPORT +KEY_SHOP +KEY_ALTERASE +KEY_CANCEL +KEY_BRIGHTNESSDOWN +KEY_BRIGHTNESSUP +KEY_MEDIA +KEY_SWITCHVIDEOMODE +KEY_KBDILLUMTOGGLE +KEY_KBDILLUMDOWN +KEY_KBDILLUMUP +KEY_SEND +KEY_REPLY +KEY_FORWARDMAIL +KEY_SAVE +KEY_DOCUMENTS +KEY_BATTERY +KEY_BLUETOOTH +KEY_WLAN +KEY_UWB +KEY_UNKNOWN +KEY_VIDEO_NEXT +KEY_VIDEO_PREV +KEY_BRIGHTNESS_CYCLE +['KEY_BRIGHTNESS_AUTO', 'KEY_BRIGHTNESS_ZERO'] +KEY_DISPLAY_OFF +['KEY_WIMAX', 'KEY_WWAN'] +KEY_RFKILL +KEY_MICMUTE +['BTN_0', 'BTN_MISC'] +BTN_1 +BTN_2 +BTN_3 +BTN_4 +BTN_5 +BTN_6 +BTN_7 +BTN_8 +BTN_9 +['BTN_LEFT', 'BTN_MOUSE'] +BTN_RIGHT +BTN_MIDDLE +BTN_SIDE +BTN_EXTRA +BTN_FORWARD +BTN_BACK +BTN_TASK +['BTN_JOYSTICK', 'BTN_TRIGGER'] +BTN_THUMB +BTN_THUMB2 +BTN_TOP +BTN_TOP2 +BTN_PINKIE +BTN_BASE +BTN_BASE2 +BTN_BASE3 +BTN_BASE4 +BTN_BASE5 +BTN_BASE6 +BTN_DEAD +['BTN_A', 'BTN_GAMEPAD', 'BTN_SOUTH'] +['BTN_B', 'BTN_EAST'] +BTN_C +['BTN_NORTH', 'BTN_X'] +['BTN_WEST', 'BTN_Y'] +BTN_Z +BTN_TL +BTN_TR +BTN_TL2 +BTN_TR2 +BTN_SELECT +BTN_START +BTN_MODE +BTN_THUMBL +BTN_THUMBR +['BTN_DIGI', 'BTN_TOOL_PEN'] +BTN_TOOL_RUBBER +BTN_TOOL_BRUSH +BTN_TOOL_PENCIL +BTN_TOOL_AIRBRUSH +BTN_TOOL_FINGER +BTN_TOOL_MOUSE +BTN_TOOL_LENS +BTN_TOOL_QUINTTAP +BTN_TOUCH +BTN_STYLUS +BTN_STYLUS2 +BTN_TOOL_DOUBLETAP +BTN_TOOL_TRIPLETAP +BTN_TOOL_QUADTAP +['BTN_GEAR_DOWN', 'BTN_WHEEL'] +BTN_GEAR_UP +KEY_OK +KEY_SELECT +KEY_GOTO +KEY_CLEAR +KEY_POWER2 +KEY_OPTION +KEY_INFO +KEY_TIME +KEY_VENDOR +KEY_ARCHIVE +KEY_PROGRAM +KEY_CHANNEL +KEY_FAVORITES +KEY_EPG +KEY_PVR +KEY_MHP +KEY_LANGUAGE +KEY_TITLE +KEY_SUBTITLE +KEY_ANGLE +KEY_ZOOM +KEY_MODE +KEY_KEYBOARD +KEY_SCREEN +KEY_PC +KEY_TV +KEY_TV2 +KEY_VCR +KEY_VCR2 +KEY_SAT +KEY_SAT2 +KEY_CD +KEY_TAPE +KEY_RADIO +KEY_TUNER +KEY_PLAYER +KEY_TEXT +KEY_DVD +KEY_AUX +KEY_MP3 +KEY_AUDIO +KEY_VIDEO +KEY_DIRECTORY +KEY_LIST +KEY_MEMO +KEY_CALENDAR +KEY_RED +KEY_GREEN +KEY_YELLOW +KEY_BLUE +KEY_CHANNELUP +KEY_CHANNELDOWN +KEY_FIRST +KEY_LAST +KEY_AB +KEY_NEXT +KEY_RESTART +KEY_SLOW +KEY_SHUFFLE +KEY_BREAK +KEY_PREVIOUS +KEY_DIGITS +KEY_TEEN +KEY_TWEN +KEY_VIDEOPHONE +KEY_GAMES +KEY_ZOOMIN +KEY_ZOOMOUT +KEY_ZOOMRESET +KEY_WORDPROCESSOR +KEY_EDITOR +KEY_SPREADSHEET +KEY_GRAPHICSEDITOR +KEY_PRESENTATION +KEY_DATABASE +KEY_NEWS +KEY_VOICEMAIL +KEY_ADDRESSBOOK +KEY_MESSENGER +['KEY_BRIGHTNESS_TOGGLE', 'KEY_DISPLAYTOGGLE'] +KEY_SPELLCHECK +KEY_LOGOFF +KEY_DOLLAR +KEY_EURO +KEY_FRAMEBACK +KEY_FRAMEFORWARD +KEY_CONTEXT_MENU +KEY_MEDIA_REPEAT +KEY_10CHANNELSUP +KEY_10CHANNELSDOWN +KEY_IMAGES +KEY_DEL_EOL +KEY_DEL_EOS +KEY_INS_LINE +KEY_DEL_LINE +KEY_FN +KEY_FN_ESC +KEY_FN_F1 +KEY_FN_F2 +KEY_FN_F3 +KEY_FN_F4 +KEY_FN_F5 +KEY_FN_F6 +KEY_FN_F7 +KEY_FN_F8 +KEY_FN_F9 +KEY_FN_F10 +KEY_FN_F11 +KEY_FN_F12 +KEY_FN_1 +KEY_FN_2 +KEY_FN_D +KEY_FN_E +KEY_FN_F +KEY_FN_S +KEY_FN_B +KEY_BRL_DOT1 +KEY_BRL_DOT2 +KEY_BRL_DOT3 +KEY_BRL_DOT4 +KEY_BRL_DOT5 +KEY_BRL_DOT6 +KEY_BRL_DOT7 +KEY_BRL_DOT8 +KEY_BRL_DOT9 +KEY_BRL_DOT10 +KEY_NUMERIC_0 +KEY_NUMERIC_1 +KEY_NUMERIC_2 +KEY_NUMERIC_3 +KEY_NUMERIC_4 +KEY_NUMERIC_5 +KEY_NUMERIC_6 +KEY_NUMERIC_7 +KEY_NUMERIC_8 +KEY_NUMERIC_9 +KEY_NUMERIC_STAR +KEY_NUMERIC_POUND +KEY_NUMERIC_A +KEY_NUMERIC_B +KEY_NUMERIC_C +KEY_NUMERIC_D +KEY_CAMERA_FOCUS +KEY_WPS_BUTTON +KEY_TOUCHPAD_TOGGLE +KEY_TOUCHPAD_ON +KEY_TOUCHPAD_OFF +KEY_CAMERA_ZOOMIN +KEY_CAMERA_ZOOMOUT +KEY_CAMERA_UP +KEY_CAMERA_DOWN +KEY_CAMERA_LEFT +KEY_CAMERA_RIGHT +KEY_ATTENDANT_ON +KEY_ATTENDANT_OFF +KEY_ATTENDANT_TOGGLE +KEY_LIGHTS_TOGGLE +BTN_DPAD_UP +BTN_DPAD_DOWN +BTN_DPAD_LEFT +BTN_DPAD_RIGHT +KEY_ALS_TOGGLE +KEY_BUTTONCONFIG +KEY_TASKMANAGER +KEY_JOURNAL +KEY_CONTROLPANEL +KEY_APPSELECT +KEY_SCREENSAVER +KEY_VOICECOMMAND +KEY_BRIGHTNESS_MIN +KEY_BRIGHTNESS_MAX +KEY_KBDINPUTASSIST_PREV +KEY_KBDINPUTASSIST_NEXT +KEY_KBDINPUTASSIST_PREVGROUP +KEY_KBDINPUTASSIST_NEXTGROUP +KEY_KBDINPUTASSIST_ACCEPT +KEY_KBDINPUTASSIST_CANCEL +KEY_RIGHT_UP +KEY_RIGHT_DOWN +KEY_LEFT_UP +KEY_LEFT_DOWN +KEY_ROOT_MENU +KEY_MEDIA_TOP_MENU +KEY_NUMERIC_11 +KEY_NUMERIC_12 +KEY_AUDIO_DESC +KEY_3D_MODE +KEY_NEXT_FAVORITE +KEY_STOP_RECORD +KEY_PAUSE_RECORD +KEY_VOD +KEY_UNMUTE +['KEY_DATA', 'KEY_FASTREVERSE'] +KEY_SLOWREVERSE +['BTN_TRIGGER_HAPPY', 'BTN_TRIGGER_HAPPY1'] +BTN_TRIGGER_HAPPY2 +BTN_TRIGGER_HAPPY3 +BTN_TRIGGER_HAPPY4 +BTN_TRIGGER_HAPPY5 +BTN_TRIGGER_HAPPY6 +BTN_TRIGGER_HAPPY7 +BTN_TRIGGER_HAPPY8 +BTN_TRIGGER_HAPPY9 +BTN_TRIGGER_HAPPY10 +BTN_TRIGGER_HAPPY11 +BTN_TRIGGER_HAPPY12 +BTN_TRIGGER_HAPPY13 +BTN_TRIGGER_HAPPY14 +BTN_TRIGGER_HAPPY15 +BTN_TRIGGER_HAPPY16 +BTN_TRIGGER_HAPPY17 +BTN_TRIGGER_HAPPY18 +BTN_TRIGGER_HAPPY19 +BTN_TRIGGER_HAPPY20 +BTN_TRIGGER_HAPPY21 +BTN_TRIGGER_HAPPY22 +BTN_TRIGGER_HAPPY23 +BTN_TRIGGER_HAPPY24 +BTN_TRIGGER_HAPPY25 +BTN_TRIGGER_HAPPY26 +BTN_TRIGGER_HAPPY27 +BTN_TRIGGER_HAPPY28 +BTN_TRIGGER_HAPPY29 +BTN_TRIGGER_HAPPY30 +BTN_TRIGGER_HAPPY31 +BTN_TRIGGER_HAPPY32 +BTN_TRIGGER_HAPPY33 +BTN_TRIGGER_HAPPY34 +BTN_TRIGGER_HAPPY35 +BTN_TRIGGER_HAPPY36 +BTN_TRIGGER_HAPPY37 +BTN_TRIGGER_HAPPY38 +BTN_TRIGGER_HAPPY39 +BTN_TRIGGER_HAPPY40 diff --git a/src/fenrir/core/commandManager.py b/src/fenrir/core/commandManager.py index dda0753a..f27bdd61 100644 --- a/src/fenrir/core/commandManager.py +++ b/src/fenrir/core/commandManager.py @@ -66,6 +66,7 @@ class commandManager(): commandList = glob.glob(self.env['runtime']['settingsManager'].getSetting('general', 'scriptPath')+'/*') subCommand = os.path.dirname(os.path.realpath(__main__.__file__)) + '/commands/commands/subprocess.py' for command in commandList: + invalid = False try: fileName, fileExtension = os.path.splitext(command) fileName = fileName.split('/')[-1] @@ -89,7 +90,13 @@ class commandManager(): shortcutKeys = [] shortcut = [] for key in keys: + if not self.env['runtime']['settingsManager'].isValidKey(key.upper()): + self.env['runtime']['debug'].writeDebugOut("invalid key : "+ key.upper() + ' command:' +commandName ,debug.debugLevel.WARNING) + invalid = True + break shortcutKeys.append(key.upper()) + if invalid: + continue if not 'KEY_SCRIPT' in shortcutKeys: shortcutKeys.append('KEY_SCRIPT') shortcut.append(1) diff --git a/src/fenrir/core/inputEvent.py b/src/fenrir/core/inputEvent.py index 8226b741..c01b48f8 100644 --- a/src/fenrir/core/inputEvent.py +++ b/src/fenrir/core/inputEvent.py @@ -31,3 +31,7 @@ inputEvent = { 'EventUsec': 0, 'EventState': 0, } + + +keyNames = ['KEY_RESERVED', 'KEY_ESC', 'KEY_1', 'KEY_2', 'KEY_3', 'KEY_4', 'KEY_5', 'KEY_6', 'KEY_7', 'KEY_8', 'KEY_9', 'KEY_0', 'KEY_MINUS', 'KEY_EQUAL', 'KEY_BACKSPACE', 'KEY_TAB', 'KEY_Q', 'KEY_W', 'KEY_E', 'KEY_R', 'KEY_T', 'KEY_Y', 'KEY_U', 'KEY_I', 'KEY_O', 'KEY_P', 'KEY_LEFTBRACE', 'KEY_RIGHTBRACE', 'KEY_ENTER', 'KEY_LEFTCTRL', 'KEY_A', 'KEY_S', 'KEY_D', 'KEY_F', 'KEY_G', 'KEY_H', 'KEY_J', 'KEY_K', 'KEY_L', 'KEY_SEMICOLON', 'KEY_APOSTROPHE', 'KEY_GRAVE', 'KEY_LEFTSHIFT', 'KEY_BACKSLASH', 'KEY_Z', 'KEY_X', 'KEY_C', 'KEY_V', 'KEY_B', 'KEY_N', 'KEY_M', 'KEY_COMMA', 'KEY_DOT', 'KEY_SLASH', 'KEY_RIGHTSHIFT', 'KEY_KPASTERISK', 'KEY_LEFTALT', 'KEY_SPACE', 'KEY_CAPSLOCK', 'KEY_F1', 'KEY_F2', 'KEY_F3', 'KEY_F4', 'KEY_F5', 'KEY_F6', 'KEY_F7', 'KEY_F8', 'KEY_F9', 'KEY_F10', 'KEY_NUMLOCK', 'KEY_SCROLLLOCK', 'KEY_KP7', 'KEY_KP8', 'KEY_KP9', 'KEY_KPMINUS', 'KEY_KP4', 'KEY_KP5', 'KEY_KP6', 'KEY_KPPLUS', 'KEY_KP1', 'KEY_KP2', 'KEY_KP3', 'KEY_KP0', 'KEY_KPDOT', 'KEY_ZENKAKUHANKAKU', 'KEY_102ND', 'KEY_F11', 'KEY_F12', 'KEY_RO', 'KEY_KATAKANA', 'KEY_HIRAGANA', 'KEY_HENKAN', 'KEY_KATAKANAHIRAGANA', 'KEY_MUHENKAN', 'KEY_KPJPCOMMA', 'KEY_KPENTER', 'KEY_RIGHTCTRL', 'KEY_KPSLASH', 'KEY_SYSRQ', 'KEY_RIGHTALT', 'KEY_LINEFEED', 'KEY_HOME', 'KEY_UP', 'KEY_PAGEUP', 'KEY_LEFT', 'KEY_RIGHT', 'KEY_END', 'KEY_DOWN', 'KEY_PAGEDOWN', 'KEY_INSERT', 'KEY_DELETE', 'KEY_MACRO', 'KEY_MIN_INTERESTING', 'KEY_MUTE', 'KEY_VOLUMEDOWN', 'KEY_VOLUMEUP', 'KEY_POWER', 'KEY_KPEQUAL', 'KEY_KPPLUSMINUS', 'KEY_PAUSE', 'KEY_SCALE', 'KEY_KPCOMMA', 'KEY_HANGEUL', 'KEY_HANGUEL', 'KEY_HANJA', 'KEY_YEN', 'KEY_LEFTMETA', 'KEY_RIGHTMETA', 'KEY_COMPOSE', 'KEY_STOP', 'KEY_AGAIN', 'KEY_PROPS', 'KEY_UNDO', 'KEY_FRONT', 'KEY_COPY', 'KEY_OPEN', 'KEY_PASTE', 'KEY_FIND', 'KEY_CUT', 'KEY_HELP', 'KEY_MENU', 'KEY_CALC', 'KEY_SETUP', 'KEY_SLEEP', 'KEY_WAKEUP', 'KEY_FILE', 'KEY_SENDFILE', 'KEY_DELETEFILE', 'KEY_XFER', 'KEY_PROG1', 'KEY_PROG2', 'KEY_WWW', 'KEY_MSDOS', 'KEY_COFFEE', 'KEY_SCREENLOCK', 'KEY_DIRECTION', 'KEY_ROTATE_DISPLAY', 'KEY_CYCLEWINDOWS', 'KEY_MAIL', 'KEY_BOOKMARKS', 'KEY_COMPUTER', 'KEY_BACK', 'KEY_FORWARD', 'KEY_CLOSECD', 'KEY_EJECTCD', 'KEY_EJECTCLOSECD', 'KEY_NEXTSONG', 'KEY_PLAYPAUSE', 'KEY_PREVIOUSSONG', 'KEY_STOPCD', 'KEY_RECORD', 'KEY_REWIND', 'KEY_PHONE', 'KEY_ISO', 'KEY_CONFIG', 'KEY_HOMEPAGE', 'KEY_REFRESH', 'KEY_EXIT', 'KEY_MOVE', 'KEY_EDIT', 'KEY_SCROLLUP', 'KEY_SCROLLDOWN', 'KEY_KPLEFTPAREN', 'KEY_KPRIGHTPAREN', 'KEY_NEW', 'KEY_REDO', 'KEY_F13', 'KEY_F14', 'KEY_F15', 'KEY_F16', 'KEY_F17', 'KEY_F18', 'KEY_F19', 'KEY_F20', 'KEY_F21', 'KEY_F22', 'KEY_F23', 'KEY_F24', 'KEY_PLAYCD', 'KEY_PAUSECD', 'KEY_PROG3', 'KEY_PROG4', 'KEY_DASHBOARD', 'KEY_SUSPEND', 'KEY_CLOSE', 'KEY_PLAY', 'KEY_FASTFORWARD', 'KEY_BASSBOOST', 'KEY_PRINT', 'KEY_HP', 'KEY_CAMERA', 'KEY_SOUND', 'KEY_QUESTION', 'KEY_EMAIL', 'KEY_CHAT', 'KEY_SEARCH', 'KEY_CONNECT', 'KEY_FINANCE', 'KEY_SPORT', 'KEY_SHOP', 'KEY_ALTERASE', 'KEY_CANCEL', 'KEY_BRIGHTNESSDOWN', 'KEY_BRIGHTNESSUP', 'KEY_MEDIA', 'KEY_SWITCHVIDEOMODE', 'KEY_KBDILLUMTOGGLE', 'KEY_KBDILLUMDOWN', 'KEY_KBDILLUMUP', 'KEY_SEND', 'KEY_REPLY', 'KEY_FORWARDMAIL', 'KEY_SAVE', 'KEY_DOCUMENTS', 'KEY_BATTERY', 'KEY_BLUETOOTH', 'KEY_WLAN', 'KEY_UWB', 'KEY_UNKNOWN', 'KEY_VIDEO_NEXT', 'KEY_VIDEO_PREV', 'KEY_BRIGHTNESS_CYCLE', 'KEY_BRIGHTNESS_AUTO', 'KEY_BRIGHTNESS_ZERO', 'KEY_DISPLAY_OFF', 'KEY_WIMAX', 'KEY_WWAN', 'KEY_RFKILL', 'KEY_MICMUTE', 'BTN_0', 'BTN_MISC', 'BTN_1', 'BTN_2', 'BTN_3', 'BTN_4', 'BTN_5', 'BTN_6', 'BTN_7', 'BTN_8', 'BTN_9', 'BTN_LEFT', 'BTN_MOUSE', 'BTN_RIGHT', 'BTN_MIDDLE', 'BTN_SIDE', 'BTN_EXTRA', 'BTN_FORWARD', 'BTN_BACK', 'BTN_TASK', 'BTN_JOYSTICK', 'BTN_TRIGGER', 'BTN_THUMB', 'BTN_THUMB2', 'BTN_TOP', 'BTN_TOP2', 'BTN_PINKIE', 'BTN_BASE', 'BTN_BASE2', 'BTN_BASE3', 'BTN_BASE4', 'BTN_BASE5', 'BTN_BASE6', 'BTN_DEAD', 'BTN_A', 'BTN_GAMEPAD', 'BTN_SOUTH', 'BTN_B', 'BTN_EAST', 'BTN_C', 'BTN_NORTH', 'BTN_X', 'BTN_WEST', 'BTN_Y', 'BTN_Z', 'BTN_TL', 'BTN_TR', 'BTN_TL2', 'BTN_TR2', 'BTN_SELECT', 'BTN_START', 'BTN_MODE', 'BTN_THUMBL', 'BTN_THUMBR', 'BTN_DIGI', 'BTN_TOOL_PEN', 'BTN_TOOL_RUBBER', 'BTN_TOOL_BRUSH', 'BTN_TOOL_PENCIL', 'BTN_TOOL_AIRBRUSH', 'BTN_TOOL_FINGER', 'BTN_TOOL_MOUSE', 'BTN_TOOL_LENS', 'BTN_TOOL_QUINTTAP', 'BTN_TOUCH', 'BTN_STYLUS', 'BTN_STYLUS2', 'BTN_TOOL_DOUBLETAP', 'BTN_TOOL_TRIPLETAP', 'BTN_TOOL_QUADTAP', 'BTN_GEAR_DOWN', 'BTN_WHEEL', 'BTN_GEAR_UP', 'KEY_OK', 'KEY_SELECT', 'KEY_GOTO', 'KEY_CLEAR', 'KEY_POWER2', 'KEY_OPTION', 'KEY_INFO', 'KEY_TIME', 'KEY_VENDOR', 'KEY_ARCHIVE', 'KEY_PROGRAM', 'KEY_CHANNEL', 'KEY_FAVORITES', 'KEY_EPG', 'KEY_PVR', 'KEY_MHP', 'KEY_LANGUAGE', 'KEY_TITLE', 'KEY_SUBTITLE', 'KEY_ANGLE', 'KEY_ZOOM', 'KEY_MODE', 'KEY_KEYBOARD', 'KEY_SCREEN', 'KEY_PC', 'KEY_TV', 'KEY_TV2', 'KEY_VCR', 'KEY_VCR2', 'KEY_SAT', 'KEY_SAT2', 'KEY_CD', 'KEY_TAPE', 'KEY_RADIO', 'KEY_TUNER', 'KEY_PLAYER', 'KEY_TEXT', 'KEY_DVD', 'KEY_AUX', 'KEY_MP3', 'KEY_AUDIO', 'KEY_VIDEO', 'KEY_DIRECTORY', 'KEY_LIST', 'KEY_MEMO', 'KEY_CALENDAR', 'KEY_RED', 'KEY_GREEN', 'KEY_YELLOW', 'KEY_BLUE', 'KEY_CHANNELUP', 'KEY_CHANNELDOWN', 'KEY_FIRST', 'KEY_LAST', 'KEY_AB', 'KEY_NEXT', 'KEY_RESTART', 'KEY_SLOW', 'KEY_SHUFFLE', 'KEY_BREAK', 'KEY_PREVIOUS', 'KEY_DIGITS', 'KEY_TEEN', 'KEY_TWEN', 'KEY_VIDEOPHONE', 'KEY_GAMES', 'KEY_ZOOMIN', 'KEY_ZOOMOUT', 'KEY_ZOOMRESET', 'KEY_WORDPROCESSOR', 'KEY_EDITOR', 'KEY_SPREADSHEET', 'KEY_GRAPHICSEDITOR', 'KEY_PRESENTATION', 'KEY_DATABASE', 'KEY_NEWS', 'KEY_VOICEMAIL', 'KEY_ADDRESSBOOK', 'KEY_MESSENGER', 'KEY_BRIGHTNESS_TOGGLE', 'KEY_DISPLAYTOGGLE', 'KEY_SPELLCHECK', 'KEY_LOGOFF', 'KEY_DOLLAR', 'KEY_EURO', 'KEY_FRAMEBACK', 'KEY_FRAMEFORWARD', 'KEY_CONTEXT_MENU', 'KEY_MEDIA_REPEAT', 'KEY_10CHANNELSUP', 'KEY_10CHANNELSDOWN', 'KEY_IMAGES', 'KEY_DEL_EOL', 'KEY_DEL_EOS', 'KEY_INS_LINE', 'KEY_DEL_LINE', 'KEY_FN', 'KEY_FN_ESC', 'KEY_FN_F1', 'KEY_FN_F2', 'KEY_FN_F3', 'KEY_FN_F4', 'KEY_FN_F5', 'KEY_FN_F6', 'KEY_FN_F7', 'KEY_FN_F8', 'KEY_FN_F9', 'KEY_FN_F10', 'KEY_FN_F11', 'KEY_FN_F12', 'KEY_FN_1', 'KEY_FN_2', 'KEY_FN_D', 'KEY_FN_E', 'KEY_FN_F', 'KEY_FN_S', 'KEY_FN_B', 'KEY_BRL_DOT1', 'KEY_BRL_DOT2', 'KEY_BRL_DOT3', 'KEY_BRL_DOT4', 'KEY_BRL_DOT5', 'KEY_BRL_DOT6', 'KEY_BRL_DOT7', 'KEY_BRL_DOT8', 'KEY_BRL_DOT9', 'KEY_BRL_DOT10', 'KEY_NUMERIC_0', 'KEY_NUMERIC_1', 'KEY_NUMERIC_2', 'KEY_NUMERIC_3', 'KEY_NUMERIC_4', 'KEY_NUMERIC_5', 'KEY_NUMERIC_6', 'KEY_NUMERIC_7', 'KEY_NUMERIC_8', 'KEY_NUMERIC_9', 'KEY_NUMERIC_STAR', 'KEY_NUMERIC_POUND', 'KEY_NUMERIC_A', 'KEY_NUMERIC_B', 'KEY_NUMERIC_C', 'KEY_NUMERIC_D', 'KEY_CAMERA_FOCUS', 'KEY_WPS_BUTTON', 'KEY_TOUCHPAD_TOGGLE', 'KEY_TOUCHPAD_ON', 'KEY_TOUCHPAD_OFF', 'KEY_CAMERA_ZOOMIN', 'KEY_CAMERA_ZOOMOUT', 'KEY_CAMERA_UP', 'KEY_CAMERA_DOWN', 'KEY_CAMERA_LEFT', 'KEY_CAMERA_RIGHT', 'KEY_ATTENDANT_ON', 'KEY_ATTENDANT_OFF', 'KEY_ATTENDANT_TOGGLE', 'KEY_LIGHTS_TOGGLE', 'BTN_DPAD_UP', 'BTN_DPAD_DOWN', 'BTN_DPAD_LEFT', 'BTN_DPAD_RIGHT', 'KEY_ALS_TOGGLE', 'KEY_BUTTONCONFIG', 'KEY_TASKMANAGER', 'KEY_JOURNAL', 'KEY_CONTROLPANEL', 'KEY_APPSELECT', 'KEY_SCREENSAVER', 'KEY_VOICECOMMAND', 'KEY_BRIGHTNESS_MIN', 'KEY_BRIGHTNESS_MAX', 'KEY_KBDINPUTASSIST_PREV', 'KEY_KBDINPUTASSIST_NEXT', 'KEY_KBDINPUTASSIST_PREVGROUP', 'KEY_KBDINPUTASSIST_NEXTGROUP', 'KEY_KBDINPUTASSIST_ACCEPT', 'KEY_KBDINPUTASSIST_CANCEL', 'KEY_RIGHT_UP', 'KEY_RIGHT_DOWN', 'KEY_LEFT_UP', 'KEY_LEFT_DOWN', 'KEY_ROOT_MENU', 'KEY_MEDIA_TOP_MENU', 'KEY_NUMERIC_11', 'KEY_NUMERIC_12', 'KEY_AUDIO_DESC', 'KEY_3D_MODE', 'KEY_NEXT_FAVORITE', 'KEY_STOP_RECORD', 'KEY_PAUSE_RECORD', 'KEY_VOD', 'KEY_UNMUTE', 'KEY_DATA', 'KEY_FASTREVERSE', 'KEY_SLOWREVERSE', 'BTN_TRIGGER_HAPPY', 'BTN_TRIGGER_HAPPY1', 'BTN_TRIGGER_HAPPY2', 'BTN_TRIGGER_HAPPY3', 'BTN_TRIGGER_HAPPY4', 'BTN_TRIGGER_HAPPY5', 'BTN_TRIGGER_HAPPY6', 'BTN_TRIGGER_HAPPY7', 'BTN_TRIGGER_HAPPY8', 'BTN_TRIGGER_HAPPY9', 'BTN_TRIGGER_HAPPY10', 'BTN_TRIGGER_HAPPY11', 'BTN_TRIGGER_HAPPY12', 'BTN_TRIGGER_HAPPY13', 'BTN_TRIGGER_HAPPY14', 'BTN_TRIGGER_HAPPY15', 'BTN_TRIGGER_HAPPY16', 'BTN_TRIGGER_HAPPY17', 'BTN_TRIGGER_HAPPY18', 'BTN_TRIGGER_HAPPY19', 'BTN_TRIGGER_HAPPY20', 'BTN_TRIGGER_HAPPY21', 'BTN_TRIGGER_HAPPY22', 'BTN_TRIGGER_HAPPY23', 'BTN_TRIGGER_HAPPY24', 'BTN_TRIGGER_HAPPY25', 'BTN_TRIGGER_HAPPY26', 'BTN_TRIGGER_HAPPY27', 'BTN_TRIGGER_HAPPY28', 'BTN_TRIGGER_HAPPY29', 'BTN_TRIGGER_HAPPY30', 'BTN_TRIGGER_HAPPY31', 'BTN_TRIGGER_HAPPY32', 'BTN_TRIGGER_HAPPY33', 'BTN_TRIGGER_HAPPY34', 'BTN_TRIGGER_HAPPY35', 'BTN_TRIGGER_HAPPY36', 'BTN_TRIGGER_HAPPY37', 'BTN_TRIGGER_HAPPY38', 'BTN_TRIGGER_HAPPY39', 'BTN_TRIGGER_HAPPY40', 'KEY_FENRIR', 'KEY_SCRIPT', 'KEY_ALT', 'KEY_CTRL', 'KEY_META', 'KEY_SHIFT'] + diff --git a/src/fenrir/core/inputManager.py b/src/fenrir/core/inputManager.py index ef526cd5..15a1340a 100644 --- a/src/fenrir/core/inputManager.py +++ b/src/fenrir/core/inputManager.py @@ -108,7 +108,7 @@ class inputManager(): if self.isScriptKey(eventName): eventName = 'KEY_SCRIPT' return eventName - + def isConsumeInput(self): return self.env['runtime']['commandManager'].isCommandQueued() and \ not self.env['input']['keyForeward'] diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index 9656d357..34dec645 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -16,6 +16,7 @@ from core import punctuationManager from core import cursorManager from core import applicationManager from core import environment +from core import inputEvent from core.settings import settings from core import debug @@ -29,6 +30,7 @@ class settingsManager(): def loadShortcuts(self, kbConfigPath=os.path.dirname(os.path.realpath(__main__.__file__)) + '/../../config/keyboard/desktop.conf'): kbConfig = open(kbConfigPath,"r") while(True): + invalid = False line = kbConfig.readline() if not line: break @@ -52,7 +54,13 @@ class settingsManager(): try: shortcutRepeat = int(key) except: + if not self.isValidKey(key.upper()): + self.env['runtime']['debug'].writeDebugOut("invalid key : "+ key.upper() + ' command:' +commandName ,debug.debugLevel.WARNING) + invalid = True + break shortcutKeys.append(key.upper()) + if invalid: + continue shortcut.append(shortcutRepeat) shortcut.append(sorted(shortcutKeys)) if len(shortcutKeys) != 1 and not 'KEY_FENRIR' in shortcutKeys: @@ -90,7 +98,9 @@ class settingsManager(): self.env['soundIcons'][soundIcon] = soundIconFile self.env['runtime']['debug'].writeDebugOut("SoundIcon: " + soundIcon + '.' + soundIconFile, debug.debugLevel.INFO, onAnyLevel=True) siConfig.close() - + def isValidKey(self, key): + return key in inputEvent.keyNames + def loadDicts(self, dictConfigPath=os.path.dirname(os.path.realpath(__main__.__file__)) + '/../../config/punctuation/default.conf'): dictConfig = open(dictConfigPath,"r") currDictName = '' diff --git a/tools/traceEvdev.py b/tools/traceEvdev.py index 434190d2..b0001182 100755 --- a/tools/traceEvdev.py +++ b/tools/traceEvdev.py @@ -6,11 +6,14 @@ import time devices = map(evdev.InputDevice, (evdev.list_devices())) devices = {dev.fd: dev for dev in devices} +for fd in devices: + print('Devicename:'+ devices[fd].name + ' Devicepath:' + devices[fd].fn ) -while True: - r, w, x = select(devices, [], []) - if r != []: - for fd in r: - for event in devices[fd].read(): - print('Devicename:'+ devices[fd].name + ' Devicepath:' + devices[fd].fn + ' Events:' + str(devices[fd].active_keys(verbose=True)) + ' Value:' + str(event.value)) +#--- log events--- +#while True: +# r, w, x = select(devices, [], []) +# if r != []: +# for fd in r: +# for event in devices[fd].read(): +# print('Devicename:'+ devices[fd].name + ' Devicepath:' + devices[fd].fn + ' Events:' + str(devices[fd].active_keys(verbose=True)) + ' Value:' + str(event.value))