History

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.

Aseda Aboagye committed 2 years ago

Commit 0c7dd001 parent 89e1ee13 files · +3 −0Browse files

Unified · Split

3 files
  1. drivers/hid/hid-debug.c +1 −0
  2. drivers/hid/hid-input.c +1 −0
  3. include/uapi/linux/input-event-codes.h +1 −0
drivers/hid/hid-debug.c+1−0
@@ -3366,6 +3366,7 @@ static const char *keys[KEY_MAX + 1] = { · 3365 unmodified lines
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+1−0
@@ -836,6 +836,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel · 835 unmodified lines
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+1−0
@@ -618,6 +618,7 @@ · 617 unmodified lines
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 */