mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
HID: fix broken Logitech S510 keyboard report descriptor; make extra keys work
This patch makes extra keys (F1-F12 in special mode, zooming, rotate, shuffle) on Logitech S510 keyboard work. Logitech S510 keyboard sends in report no. 3 keys which are far above the logical maximum described in descriptor for given report. This patch introduces a HID quirk for this wireless USB receiver/keyboard in order to fix the report descriptor before it's being parsed - the logical maximum and the number of usages is bumped up to 0x104d). The values are in the "Reserved" area of consumer HUT, so HID_MAX_USAGE had to be changed too. In addition to proper extracting of the values from report descriptor, proper HID-input mapping is introduced for them. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
776c0e96ed
commit
b55fd23ccd
3 changed files with 46 additions and 4 deletions
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* Copyright (c) 1999 Andreas Gal
|
||||
* Copyright (c) 2000-2001 Vojtech Pavlik
|
||||
* Copyright (c) 2006 Jiri Kosina
|
||||
* Copyright (c) 2006-2007 Jiri Kosina
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -267,6 +267,7 @@ struct hid_item {
|
|||
#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000
|
||||
#define HID_QUIRK_IGNORE_MOUSE 0x00040000
|
||||
#define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000
|
||||
#define HID_QUIRK_LOGITECH_S510_DESCRIPTOR 0x00100000
|
||||
|
||||
/*
|
||||
* This is the global environment of the parser. This information is
|
||||
|
@ -292,7 +293,7 @@ struct hid_global {
|
|||
*/
|
||||
|
||||
#define HID_MAX_DESCRIPTOR_SIZE 4096
|
||||
#define HID_MAX_USAGES 1024
|
||||
#define HID_MAX_USAGES 8192
|
||||
#define HID_DEFAULT_NUM_COLLECTIONS 16
|
||||
|
||||
struct hid_local {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue