Skip to content

Commit 0c7dd00

Browse files
Aseda AboagyeBenjamin Tissoires
authored andcommitted
input: Add event code for accessibility key
HUTRR116 added support for a new usage titled "System Accessibility Binding" which toggles a system-wide bound accessibility UI or command. This commit simply adds a new event code for the usage. Signed-off-by: Aseda Aboagye <aaboagye@chromium.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/Zl-e97O9nvudco5z@google.com Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
1 parent 89e1ee1 commit 0c7dd00

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

drivers/hid/hid-debug.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3366,6 +3366,7 @@ static const char *keys[KEY_MAX + 1] = {
33663366
[KEY_CAMERA_ACCESS_ENABLE] = "CameraAccessEnable",
33673367
[KEY_CAMERA_ACCESS_DISABLE] = "CameraAccessDisable",
33683368
[KEY_CAMERA_ACCESS_TOGGLE] = "CameraAccessToggle",
3369+
[KEY_ACCESSIBILITY] = "Accessibility",
33693370
[KEY_DICTATE] = "Dictate",
33703371
[KEY_MICMUTE] = "MicrophoneMute",
33713372
[KEY_BRIGHTNESS_MIN] = "BrightnessMin",

drivers/hid/hid-input.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
836836
if ((usage->hid & 0xf0) == 0xa0) { /* SystemControl */
837837
switch (usage->hid & 0xf) {
838838
case 0x9: map_key_clear(KEY_MICMUTE); break;
839+
case 0xa: map_key_clear(KEY_ACCESSIBILITY); break;
839840
default: goto ignore;
840841
}
841842
break;

include/uapi/linux/input-event-codes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@
618618
#define KEY_CAMERA_ACCESS_ENABLE 0x24b /* Enables programmatic access to camera devices. (HUTRR72) */
619619
#define KEY_CAMERA_ACCESS_DISABLE 0x24c /* Disables programmatic access to camera devices. (HUTRR72) */
620620
#define KEY_CAMERA_ACCESS_TOGGLE 0x24d /* Toggles the current state of the camera access control. (HUTRR72) */
621+
#define KEY_ACCESSIBILITY 0x24e /* Toggles the system bound accessibility UI/command (HUTRR116) */
621622

622623
#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
623624
#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */

0 commit comments

Comments
 (0)