Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Aseda Aboagye and committed by
Benjamin Tissoires
0c7dd00d 89e1ee11

+3
+1
drivers/hid/hid-debug.c
··· 3366 3366 [KEY_CAMERA_ACCESS_ENABLE] = "CameraAccessEnable", 3367 3367 [KEY_CAMERA_ACCESS_DISABLE] = "CameraAccessDisable", 3368 3368 [KEY_CAMERA_ACCESS_TOGGLE] = "CameraAccessToggle", 3369 + [KEY_ACCESSIBILITY] = "Accessibility", 3369 3370 [KEY_DICTATE] = "Dictate", 3370 3371 [KEY_MICMUTE] = "MicrophoneMute", 3371 3372 [KEY_BRIGHTNESS_MIN] = "BrightnessMin",
+1
drivers/hid/hid-input.c
··· 836 836 if ((usage->hid & 0xf0) == 0xa0) { /* SystemControl */ 837 837 switch (usage->hid & 0xf) { 838 838 case 0x9: map_key_clear(KEY_MICMUTE); break; 839 + case 0xa: map_key_clear(KEY_ACCESSIBILITY); break; 839 840 default: goto ignore; 840 841 } 841 842 break;
+1
include/uapi/linux/input-event-codes.h
··· 618 618 #define KEY_CAMERA_ACCESS_ENABLE 0x24b /* Enables programmatic access to camera devices. (HUTRR72) */ 619 619 #define KEY_CAMERA_ACCESS_DISABLE 0x24c /* Disables programmatic access to camera devices. (HUTRR72) */ 620 620 #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) */ 621 622 622 623 #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ 623 624 #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */