HID: input: Add support for Programmable Buttons

Map them to KEY_MACRO# event codes.

These buttons are defined by HID as follows:
"The user defines the function of these buttons to control software applications or GUI objects."

This matches the semantics of the KEY_MACRO# input event codes that Linux supports.

Also add support for HID "Named Array" collections.
Also add hid-debug support for KEY_MACRO#.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Thomas Weißschuh
2021-06-15 23:41:03 +02:00
committed by Jiri Kosina
parent b15b253c90
commit bcfa8d1457
3 changed files with 34 additions and 0 deletions

View File

@@ -102,6 +102,7 @@ struct hid_item {
#define HID_COLLECTION_PHYSICAL 0
#define HID_COLLECTION_APPLICATION 1
#define HID_COLLECTION_LOGICAL 2
#define HID_COLLECTION_NAMED_ARRAY 4
/*
* HID report descriptor global item tags