]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
input: Add event code for accessibility key
authorAseda Aboagye <aaboagye@chromium.org>
Tue, 4 Jun 2024 23:10:47 +0000 (23:10 +0000)
committerBenjamin Tissoires <bentiss@kernel.org>
Fri, 7 Jun 2024 09:08:07 +0000 (11:08 +0200)
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>
drivers/hid/hid-debug.c
drivers/hid/hid-input.c
include/uapi/linux/input-event-codes.h

index 87a961cae7756be3c55cbd904d3a288e64a52edd..322ed63a98abe69e79ce8d12b8d4c2aa23c8c651 100644 (file)
@@ -3366,6 +3366,7 @@ static const char *keys[KEY_MAX + 1] = {
        [KEY_CAMERA_ACCESS_ENABLE] = "CameraAccessEnable",
        [KEY_CAMERA_ACCESS_DISABLE] = "CameraAccessDisable",
        [KEY_CAMERA_ACCESS_TOGGLE] = "CameraAccessToggle",
+       [KEY_ACCESSIBILITY] = "Accessibility",
        [KEY_DICTATE] = "Dictate",
        [KEY_MICMUTE] = "MicrophoneMute",
        [KEY_BRIGHTNESS_MIN] = "BrightnessMin",
index e03d300d2bac49e02311b63402c1c19f46f71482..d5a6e89c3086e4ac4d5caab0a90d22b974b4e5e1 100644 (file)
@@ -836,6 +836,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
                if ((usage->hid & 0xf0) == 0xa0) {      /* SystemControl */
                        switch (usage->hid & 0xf) {
                        case 0x9: map_key_clear(KEY_MICMUTE); break;
+                       case 0xa: map_key_clear(KEY_ACCESSIBILITY); break;
                        default: goto ignore;
                        }
                        break;
index 03edf2ccdf6c80c52eca377c3f4066819e88555f..39f11ec676fae920c88fa6c25a2508dbcad3d68d 100644 (file)
 #define KEY_CAMERA_ACCESS_ENABLE       0x24b   /* Enables programmatic access to camera devices. (HUTRR72) */
 #define KEY_CAMERA_ACCESS_DISABLE      0x24c   /* Disables programmatic access to camera devices. (HUTRR72) */
 #define KEY_CAMERA_ACCESS_TOGGLE       0x24d   /* Toggles the current state of the camera access control. (HUTRR72) */
+#define KEY_ACCESSIBILITY              0x24e   /* Toggles the system bound accessibility UI/command (HUTRR116) */
 
 #define KEY_BRIGHTNESS_MIN             0x250   /* Set Brightness to Minimum */
 #define KEY_BRIGHTNESS_MAX             0x251   /* Set Brightness to Maximum */