HID: lenovo: add support for the X9 mouse side button
Subsystems (2)
PATCH 1/1 HID: lenovo: add support for the X9 mouse side button
Lenovo Multi-Device Wireless Mouse (X9 Edition) has one side button which sends events in vendor-specific reports that hid-generic does not map to input events.
The USB receiver and Bluetooth connection use different report formats. In both formats, the button state field has different values for short and long presses.
Decode both formats and report short presses as BTN_SIDE and long presses as BTN_EXTRA.
--- drivers/hid/Kconfig | 2 + drivers/hid/hid-ids.h | 2 + drivers/hid/hid-lenovo.c | 116 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+)
drivers/hid/Kconfig +2 -0
@@ -630,6 +630,8 @@ config HID_LENOVO - ThinkPad Compact Bluetooth Keyboard with TrackPoint (supports Fn keys) - ThinkPad Compact USB Keyboard with TrackPoint (supports Fn keys) + This also supports the side button on the Lenovo X9 Edition mouse. + config HID_LENOVO_GO tristate "HID Driver for Lenovo Legion Go Series Controllers" depends on USB_HID
drivers/hid/hid-ids.h +2 -0
@@ -913,6 +913,8 @@#define USB_DEVICE_ID_LENOVO_LEGION_GO2_DINPUT 0x61ec#define USB_DEVICE_ID_LENOVO_LEGION_GO2_DUAL_DINPUT 0x61ed#define USB_DEVICE_ID_LENOVO_LEGION_GO2_FPS 0x61ee +#define USB_DEVICE_ID_LENOVO_X9_MOUSE_RECEIVER 0x6207 +#define USB_DEVICE_ID_LENOVO_X9_MOUSE_BT 0x61cf#define USB_VENDOR_ID_LETSKETCH 0x6161#define USB_DEVICE_ID_WP9620N 0x4d15
drivers/hid/hid-lenovo.c +116 -0
155 lines not on this page · raw message
Signature · 1 line
2.56.1
Quoted 11 lines · Stefan Strogin
Lenovo Multi-Device Wireless Mouse (X9 Edition) has one side button which sends events in vendor-specific reports that hid-generic does not map to input events.
The USB receiver and Bluetooth connection use different report formats. In both formats, the button state field has different values for short and long presses.Decode both formats and report short presses as
BTN_SIDEand long presses asBTN_EXTRA.Signed-off-by Stefan Strogin <[email protected]>
Applied to hid.git#for-7.5/lenovo, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs