From 419a8a2dabb4184080d06f583f9539780ec10ec6 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 9 Jun 2019 19:40:32 +0200 Subject: [PATCH 1/2] hwdb: Add LCD menu key mappings for the Logitech MX5000 and MX5500 keyboards The kernel now has proper evdev codes for the menu buttons below the small LCD-s builtin to some keyboards. Add mappings for these buttons on the Logitech MX5000 and MX5500 keyboards. --- hwdb.d/60-keyboard.hwdb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hwdb.d/60-keyboard.hwdb b/hwdb.d/60-keyboard.hwdb index 1f6a8f0533..1474a860b3 100644 --- a/hwdb.d/60-keyboard.hwdb +++ b/hwdb.d/60-keyboard.hwdb @@ -973,16 +973,16 @@ evdev:input:b0003v046Dp00FE* KEYBOARD_KEY_c1018=media # Media button # MX5000 keyboard (HID proxy mode and bluetooth matches) -# The 4 buttons below the LCD send codes 0xc100c - 0xc100f. They only send -# these codes when the LCD is displaying text send to it. These codes are -# directly consumed by recent versions of lcdproc when it is driving the LCD, -# so these codes should not be mapped evdev:input:b0003v046DpB305* evdev:input:b0005v046DpB305* KEYBOARD_KEY_c0230=zoomreset # HUT says fullscreen, kbd says 100% KEYBOARD_KEY_c1004=send # Send and receive / sync button KEYBOARD_KEY_c1006=coffee # Status (online/away) button KEYBOARD_KEY_c1007=camera # Webcam button + KEYBOARD_KEY_c100c=kbd_lcd_menu1 # 1st button below the builtin LCD + KEYBOARD_KEY_c100d=kbd_lcd_menu4 # 4th button below the builtin LCD + KEYBOARD_KEY_c100e=kbd_lcd_menu2 # 2nd button below the builtin LCD + KEYBOARD_KEY_c100f=kbd_lcd_menu3 # 3th button below the builtin LCD KEYBOARD_KEY_c1038=prog1 # Smartkey A → XF86Launch1 KEYBOARD_KEY_c1039=prog2 # Smartkey B → XF86Launch2 KEYBOARD_KEY_c103a=prog3 # Smartkey C → XF86Launch3 From 12c7d4d65e4fbc95b2f76853bdcf4fdc554d5c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 19 Dec 2019 11:48:46 +0100 Subject: [PATCH 2/2] hwdb: ignore keys added in kernel 5.5 python-evdev needs to be rebuilt with new kernel headers. Before that happens, our test would reject those keys as unknown. --- hwdb.d/parse_hwdb.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py index 9a933b82b2..b5395b11fe 100755 --- a/hwdb.d/parse_hwdb.py +++ b/hwdb.d/parse_hwdb.py @@ -196,10 +196,11 @@ def check_one_mount_matrix(prop, value): def check_one_keycode(prop, value): if value != '!' and ecodes is not None: key = 'KEY_' + value.upper() - if key not in ecodes: - key = value.upper() - if key not in ecodes: - error('Keycode {} unknown', key) + if not (key in ecodes or + value.upper() in ecodes or + # new keys added in kernel 5.5 + 'KBD_LCD_MENU' in key): + error('Keycode {} unknown', key) def check_properties(groups): grammar = property_grammar()