Re: [PATCH v4] HID: input: Add support for Programmable Buttons

From
Jiri Kosina <jikos@kernel.org>
Date
2021-06-24 13:41:40
Also in
lkml
Reply to
Thomas Weißschuh, 2021-06-15
On Tue, 15 Jun 2021, Thomas Weißschuh wrote:
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>
---

---

v1: https://lore.kernel.org/linux-input/20210519160349.609690-1-linux@weissschuh.net/ (local)

v1 -> v2: Only handle the 30 keys known

v2: https://lore.kernel.org/linux-input/20210519174345.614467-1-linux@weissschuh.net/ (local)

v2 -> v3:
 * Use hex constants for consistency
 * Validate that the button is part of a "Programmable Buttons" Named Array.
   Otherwise the condition would also apply to "Function Buttons".
 * Ignore non-"Programmable Buttons" buttons.

v3: https://lore.kernel.org/linux-input/20210520084805.685486-1-linux@weissschuh.net/ (local)

v3 -> v4:
 * Mention new support for HID "Named Array" collections in commit message.
 * Mention new support KEY_MACRO# in hid-debug.
Applied, thank you.

-- 
Jiri Kosina
SUSE Labs
Thread (2 messages) 2 messages, 2 authors, 2021-06-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help