[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ebbb200-1f2c-450b-8fae-e5e2dd9b6be9@t-8ch.de>
Date: Tue, 18 May 2021 15:21:40 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: linux-input@...r.kernel.org, linux-usb@...r.kernel.org,
Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Hans de Goede <hdegoede@...hat.com>
Cc: linux-kernel@...r.kernel.org
Subject: Handling of USB "Programmable button" controls as KEY_MACRO# events
Hi everybody,
Would it make sense to map the "Programmable Buttons" control from the
USB HID Consumer page [0] to the linux event codes KEY_MACRO1 ... KEY_MACRO# ?
Those controls are documented in the USB spec as:
"The user defines the function of these
buttons to control software applications or GUI objects."
The KEY_MACRO event codes are documented with:
"Some keyboards have keys which do not have a defined meaning, these keys
are intended to be programmed / bound to macros by the user."
My usecase is the passing of custom keycodes from a programmable keypad
(via QMK[1]) to Linux.
(This would also need new functionality in QMK itself)
Alternatives:
* Send Raw HID from QMK
* Con: needs a dedicated, nonstandard driver on the host
* Use F-Keys
* Con: only F13-F19 are usable (F1-F12 are used by normal keyboards, F20-F23
are repurposed with other keys for X11 compat)
Possible problems:
* There are 65k programmable keys defined by USB but only 30 macro keys are
supported by Linux.
Thanks,
Thomas
[0] https://www.usb.org/sites/default/files/hut1_22.pdf#section.15.14
[1] https://qmk.fm/
Powered by blists - more mailing lists