From e016c6d6ab95a98a5f36f5f69877dcdaa36fc46b Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 4 Apr 2019 22:39:24 +0200 Subject: [PATCH 01/10] hwdb: Add generic key mapping for Logitech 27 MHz keyboards The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and mice by there wireless-PID, rather then using the PID of the receiver which is the same for all 27MHz Logitech devices. This will allow us to add per model keymappings for the special keys on these keyboards, which may differ per model. This commit adds a default / fallback mapping, assigning the most common meaning of the custom Logitech c10XX keycodes. --- hwdb/60-keyboard.hwdb | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index 4762c68a1b..f55f2766cb 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -837,6 +837,42 @@ evdev:input:b0003v04B3p301B* # Logitech ########################################################### +# 27MHz wireless keyboards, these all have a PID of 00?? and all send c10xx +# logitech custom consumer usage-page codes. The mappings below are the most +# common, but some mapping may differ, especially the Fn F1-F12 mappings +evdev:input:b0003v046Dp00* + KEYBOARD_KEY_c0183=media # HUT:config, kbd:Media/Music player button + KEYBOARD_KEY_c1001=chat # Messenger button + KEYBOARD_KEY_c1003=audio # Music Browser button + KEYBOARD_KEY_c1004=video # Video Browser button + KEYBOARD_KEY_c1005=images # Image Browser button + KEYBOARD_KEY_c100a=documents # Document Browser button + KEYBOARD_KEY_c1013=camera # Webcam button + KEYBOARD_KEY_c1014=coffee # Status button + KEYBOARD_KEY_c1015=record # Record symbol button + KEYBOARD_KEY_c1016=sound # Flame/CD burning → sound → XF86AudioPreset + KEYBOARD_KEY_c1017=ejectcd # Eject button + KEYBOARD_KEY_c1018=config # Remote-control ico + KEYBOARD_KEY_c101c=cyclewindows # 2 overlapping windows icon + KEYBOARD_KEY_c101f=zoomout # zoom - button / - side of zoomrocker + KEYBOARD_KEY_c1020=zoomin # zoom + button / + side off zoom rocker + KEYBOARD_KEY_c1021=zoomreset # 100% symbol on kbd left side + KEYBOARD_KEY_c1023=close # [x] symbol on kbd left side + KEYBOARD_KEY_c1029=shuffle # Shuffle button + KEYBOARD_KEY_c102d=www # www text + magnifierglass icon + KEYBOARD_KEY_c1041=help # Help text or icon (Fn + F1) + KEYBOARD_KEY_c1042=wordprocessor # Word icon (Fn + F2) + KEYBOARD_KEY_c1043=spreadsheet # Excel icon (Fn + F3) + KEYBOARD_KEY_c1044=presentation # Presentation icon (Fn + F4) + KEYBOARD_KEY_c1045=undo # Undo Icon (Fn + F5) + KEYBOARD_KEY_c1046=redo # Redo Icon (Fn + F6) + KEYBOARD_KEY_c1047=print # Printer Icon (Fn + F7) + KEYBOARD_KEY_c1048=save # Floppy Icon (Fn + F8) + KEYBOARD_KEY_c1049=prog1 # Smartkey A (Fn + F9) → XF86Launch1 + KEYBOARD_KEY_c104a=prog2 # Smartkey B (Fn + F10) → XF86Launch2 + KEYBOARD_KEY_c104b=prog3 # Smartkey C (Fn + F11) → XF86Launch3 + KEYBOARD_KEY_c104c=prog4 # Smartkey D (Fn + F12) → XF86Launch4 + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From bd9133c67e1edc217fc7d5a0ca86ce2b2ed4155d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 22 Mar 2019 22:10:32 +0100 Subject: [PATCH 02/10] hwdb: Add key mappings for Logitech 27 MHz "Cordless Access Keyboard" The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and mice by there wireless-PID, rather then using the PID of the receiver which is the same for all 27MHz Logitech devices. This allows us to add per model keymappings for the special keys on these keyboards. This commit adds such mappings for the "Logitech Cordless Access Keyboard" (modelnumber Y-RH35). --- hwdb/60-keyboard.hwdb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index f55f2766cb..5c316863f3 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -873,6 +873,22 @@ evdev:input:b0003v046Dp00* KEYBOARD_KEY_c104b=prog3 # Smartkey C (Fn + F11) → XF86Launch3 KEYBOARD_KEY_c104c=prog4 # Smartkey D (Fn + F12) → XF86Launch4 +# Cordless Access Keyboard (27 MHz, modelnumber Y-RH35) +evdev:input:b0003v046Dp0042* + KEYBOARD_KEY_c1002=camera + KEYBOARD_KEY_c1041=new + KEYBOARD_KEY_c1042=reply + KEYBOARD_KEY_c1043=forward + KEYBOARD_KEY_c1044=send + KEYBOARD_KEY_c1045=previoussong + KEYBOARD_KEY_c1046=nextsong + KEYBOARD_KEY_c1047=playpause + KEYBOARD_KEY_c1048=stopcd + KEYBOARD_KEY_c1049=file + KEYBOARD_KEY_c104a=documents + KEYBOARD_KEY_c104b=images + KEYBOARD_KEY_c104c=audio + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From 465a319307e842e12b5844bec880d92a814c7e4c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 29 Mar 2019 23:42:56 +0100 Subject: [PATCH 03/10] hwdb: Add key mappings for Logitech 27 MHz "Cordless Rechargeable Desktop" keyboard The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and mice by there wireless-PID, rather then using the PID of the receiver which is the same for all 27MHz Logitech devices. This allows us to add per model keymappings for the special keys on these keyboards. This commit adds such mappings for the "Logitech Rechargeable Desktop" keyboard (modelnumber Y-RK49). --- hwdb/60-keyboard.hwdb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index 5c316863f3..b681107cd4 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -889,6 +889,17 @@ evdev:input:b0003v046Dp0042* KEYBOARD_KEY_c104b=images KEYBOARD_KEY_c104c=audio +# "Cordless Rechargeable Desktop" keyboard (27 MHz, modelnumber Y-RK49) +evdev:input:b0003v046Dp0045* + KEYBOARD_KEY_c1041=new + KEYBOARD_KEY_c1042=reply + KEYBOARD_KEY_c1043=forward + KEYBOARD_KEY_c1044=send + KEYBOARD_KEY_c1049=file + KEYBOARD_KEY_c104a=documents + KEYBOARD_KEY_c104b=images + KEYBOARD_KEY_c104c=audio + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From 3008f07e026da6c175746502797d824670330aea Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 3 Apr 2019 22:52:06 +0200 Subject: [PATCH 04/10] hwdb: Add key mappings for Logitech 27 MHz MX3000 keyboard The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and mice by there wireless-PID, rather then using the PID of the receiver which is the same for all 27MHz Logitech devices. This allows us to add per model keymappings for the special keys on these keyboards. This commit adds such mappings for the MX3000 keyboard (modelnumber Y-RAM74). --- hwdb/60-keyboard.hwdb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index b681107cd4..1c9f03f432 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -900,6 +900,25 @@ evdev:input:b0003v046Dp0045* KEYBOARD_KEY_c104b=images KEYBOARD_KEY_c104c=audio +# MX3000 keyboard (27 MHz, modelnumber Y-RAM74) +# We ignore the scroll up / down keypress events since these buttons also +# generate scroll-wheel events and we do not want to generate duplicate events +# Note if the "Special Button Function" in the HID++ features register gets +# cleared then the scroll-wheel events for these buttons go away and then +# tilting the scrollwheel left/right starts sending c1022 / c1024 events +evdev:input:b0003v046Dp0057* + KEYBOARD_KEY_c1011=channeldown # Playlist back button + KEYBOARD_KEY_c1012=channelup # Playlist advance button + KEYBOARD_KEY_c1019=f14 # Preset 1 → f14 → XF86Launch5 + KEYBOARD_KEY_c101a=f15 # Preset 2 → f15 → XF86Launch6 + KEYBOARD_KEY_c101b=f16 # Preset 3 → f16 → XF86Launch7 + KEYBOARD_KEY_c1041=battery # Battery icon (Fn + F1) + +#KEYBOARD_KEY_c101d=scrolldown # Button below scrollwheel (see note above) +#KEYBOARD_KEY_c101e=scrollup # Button above scrollwheel (see note above) +#KEYBOARD_KEY_c1022=scrollleft # Left click on scroll-wheel (see note above) +#KEYBOARD_KEY_c1024=scrollright # Right click on scroll-wheel (see note above) + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From 0eca2867161536f90ba187ff7e6b826dd3dc5811 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 5 Apr 2019 00:40:40 +0200 Subject: [PATCH 05/10] hwdb: Add key mappings for Logitech 27 MHz MX3200 keyboard The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and mice by there wireless-PID, rather then using the PID of the receiver which is the same for all 27MHz Logitech devices. This allows us to add per model keymappings for the special keys on these keyboards. This commit adds such mappings for the MX3200 keyboard (modelnumber Y-RAV80). --- hwdb/60-keyboard.hwdb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index 1c9f03f432..6a25c4d7c2 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -919,6 +919,23 @@ evdev:input:b0003v046Dp0057* #KEYBOARD_KEY_c1022=scrollleft # Left click on scroll-wheel (see note above) #KEYBOARD_KEY_c1024=scrollright # Right click on scroll-wheel (see note above) +# MX3200 keyboard (27 MHz, modelnumber Y-RAV80) +evdev:input:b0003v046Dp005C* + KEYBOARD_KEY_c1001=phone # VOIP button + KEYBOARD_KEY_c100f=f14 # Track 1 button → f14 → XF86Launch5 + KEYBOARD_KEY_c1010=f15 # Track 2 button → f15 → XF86Launch6 + KEYBOARD_KEY_c1016=record # Record button + KEYBOARD_KEY_c1031=connect # Pickup phone button → connect → XF86Go + KEYBOARD_KEY_c1032=cancel # Hangup phone button → cancel → Cancel + KEYBOARD_KEY_c1041=wordprocessor # Word icon (Fn + F1) + KEYBOARD_KEY_c1042=spreadsheet # Excel icon (Fn + F2) + KEYBOARD_KEY_c1043=calendar # Calendar icon (Fn + F3) + KEYBOARD_KEY_c1044=documents # My Documents icon (Fn + F4) + KEYBOARD_KEY_c1045=prog1 # Smartkey A (Fn + F5) → XF86Launch1 + KEYBOARD_KEY_c1046=prog2 # Smartkey B (Fn + F6) → XF86Launch2 + KEYBOARD_KEY_c1047=prog3 # Smartkey C (Fn + F7) → XF86Launch3 + KEYBOARD_KEY_c1048=prog4 # Smartkey D (Fn + F8) → XF86Launch4 + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From c23bc35f9bea7cd1b1949436939bf8f1ccd90e98 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 5 Apr 2019 16:18:03 +0200 Subject: [PATCH 06/10] hwdb: Add key mappings for Logitech 27 MHz EX100 keyboard The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and mice by there wireless-PID, rather then using the PID of the receiver which is the same for all 27MHz Logitech devices. This allows us to add per model keymappings for the special keys on these keyboards. This commit adds such mappings for the EX100 keyboard (modelnumber Y-RBH94). --- hwdb/60-keyboard.hwdb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index 6a25c4d7c2..b8ea8b66b2 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -936,6 +936,11 @@ evdev:input:b0003v046Dp005C* KEYBOARD_KEY_c1047=prog3 # Smartkey C (Fn + F7) → XF86Launch3 KEYBOARD_KEY_c1048=prog4 # Smartkey D (Fn + F8) → XF86Launch4 +# EX100 keyboard (27 MHz, modelnumber Y-RBH94) +evdev:input:b0003v046Dp0065* + KEYBOARD_KEY_c104b=battery # Battery icon (Fn + F11) + KEYBOARD_KEY_c104c=ejectcd # Eject icon (Fn + F12) + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From 9e2e65678d2f79e767cabbd7f9e4558daa9f0a3d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 5 Apr 2019 14:47:04 +0200 Subject: [PATCH 07/10] hwdb: Add key mappings for Logitech 27 MHz S520 keyboard The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and mice by there wireless-PID, rather then using the PID of the receiver which is the same for all 27MHz Logitech devices. This allows us to add per model keymappings for the special keys on these keyboards. This commit adds such mappings for the S520 keyboard (modelnumber Y-RBA97). --- hwdb/60-keyboard.hwdb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index b8ea8b66b2..b328d341e9 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -941,6 +941,23 @@ evdev:input:b0003v046Dp0065* KEYBOARD_KEY_c104b=battery # Battery icon (Fn + F11) KEYBOARD_KEY_c104c=ejectcd # Eject icon (Fn + F12) +# S520 keyboard (27 MHz, modelnumber Y-RBA97) +# Note this one uses non-standard codes for FN + F9 - Fn + F12? +evdev:input:b0003v046Dp0066* + KEYBOARD_KEY_c100e=prog4 # Smartkey D (Fn + F12) → XF86Launch4 + KEYBOARD_KEY_c1019=prog1 # Smartkey A (Fn + F9) → XF86Launch1 + KEYBOARD_KEY_c101a=prog2 # Smartkey B (Fn + F10) → XF86Launch2 + KEYBOARD_KEY_c101b=prog3 # Smartkey C (Fn + F11) → XF86Launch3 + KEYBOARD_KEY_c1041=wordprocessor # Word icon (Fn + F1) + KEYBOARD_KEY_c1042=spreadsheet # Excel icon (Fn + F2) + KEYBOARD_KEY_c1043=presentation # Presentation icon (Fn + F3) + KEYBOARD_KEY_c1044=calendar # Calendar icon (Fn + F4) + KEYBOARD_KEY_c1045=homepage # Home icon (Fn + F5) + KEYBOARD_KEY_c1046=email # Letter icon (Fn + F6) + KEYBOARD_KEY_c1047=search # Magnifying glass icon (Fn + F7) + KEYBOARD_KEY_c1048=config # Window with gear icon (Fn + F8) + KEYBOARD_KEY_c106f=battery # Battery icon + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From 673635731016606ce20dab4266af434509ebeffe Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 2 Apr 2019 17:23:12 +0200 Subject: [PATCH 08/10] hwdb: Add key mappings for Logitech MX5000 keyboard Add support for various custom key-codes emitted by the Logitech MX5000 keyboard, both when attached through its Bluetooth-receiver in USB-HID proxy mode; and when connected as a Bluetooth device. --- hwdb/60-keyboard.hwdb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index b328d341e9..93cf4aa998 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -958,6 +958,22 @@ evdev:input:b0003v046Dp0066* KEYBOARD_KEY_c1048=config # Window with gear icon (Fn + F8) KEYBOARD_KEY_c106f=battery # Battery icon +# 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_c1038=prog1 # Smartkey A → XF86Launch1 + KEYBOARD_KEY_c1039=prog2 # Smartkey B → XF86Launch2 + KEYBOARD_KEY_c103a=prog3 # Smartkey C → XF86Launch3 + KEYBOARD_KEY_c103b=prog4 # Smartkey D → XF86Launch4 + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From 29516b08cbc8725cce9c66bcd4d833be58dd5842 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 28 Apr 2019 21:21:00 +0200 Subject: [PATCH 09/10] hwdb: Add key mappings for Logitech MX5500 keyboard Add support for various custom key-codes emitted by the Logitech MX5500 keyboard, both when attached through its Bluetooth-receiver in USB-HID proxy mode; and when connected as a Bluetooth device. --- hwdb/60-keyboard.hwdb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index 93cf4aa998..4f1b42bd04 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -974,6 +974,17 @@ evdev:input:b0005v046DpB305* KEYBOARD_KEY_c103a=prog3 # Smartkey C → XF86Launch3 KEYBOARD_KEY_c103b=prog4 # Smartkey D → XF86Launch4 +# MX5500 keyboard (HID proxy mode and bluetooth matches) +evdev:input:b0003v046DpB30B* +evdev:input:b0005v046DpB30B* + KEYBOARD_KEY_c0183=media # HUT says consumer control configuration, kbd says Media Center + KEYBOARD_KEY_c100e=images # Camera icon, "Photo Gallery" + KEYBOARD_KEY_c100f=config # Window with gear icon + KEYBOARD_KEY_c1038=prog1 # Smartkey A → XF86Launch1 + KEYBOARD_KEY_c1039=prog2 # Smartkey B → XF86Launch2 + KEYBOARD_KEY_c103a=prog3 # Smartkey C → XF86Launch3 + KEYBOARD_KEY_c103b=prog4 # Smartkey D → XF86Launch4 + # iTouch evdev:input:b0003v046DpC308* KEYBOARD_KEY_90001=shop # Shopping From e38fd76e5fa993e8ad1033c8f43d2426d7d2a3e2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 22 Apr 2019 09:15:40 +0200 Subject: [PATCH 10/10] hwdb: Fix F12 mapping on the Logitech Internet Navigator Many Logitech keyboards have the following special functions on F9-F12: F9: file-browser F10: document-browser F11: image-browser F12: music-browser. These should be bound to: #define KEY_FILE 144 /* AL Local Machine Browser */ #define KEY_DOCUMENTS 235 #define KEY_IMAGES 0x1ba /* AL Image Browser */ #define KEY_AUDIO 0x188 /* AL Audio Browser */ This commit fixes the wrong binding of F12 to KEY_SOUND (which translates to XF86AudioPreset) and removes the ?? comments from both F11 and F12. --- hwdb/60-keyboard.hwdb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index 4f1b42bd04..851b62bb5c 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -1071,8 +1071,8 @@ evdev:input:b0003v046DpC309* KEYBOARD_KEY_c0207=save # Save (F8) KEYBOARD_KEY_c0194=file # My Computer (F9) KEYBOARD_KEY_c01a7=documents # My Documents (F10) - KEYBOARD_KEY_c01b6=images # My Pictures (F11) ?? - KEYBOARD_KEY_c01b7=sound # My Music (F12) ?? + KEYBOARD_KEY_c01b6=images # My Pictures (F11) + KEYBOARD_KEY_c01b7=audio # My Music (F12) ###########################################################