[PATCH] Input: add keycodes for contextual AI usages (HUTRR119)

From: Akshai Murari

Date: Fri Mar 27 2026 - 03:07:47 EST


HUTRR119 introduces new usages for keys intended to invoke AI agents
based on the current context. These are useful with the increasing
number of operating systems with integrated Large Language Models

Add new key definitions for KEY_ACTION_ON_SELECTION,
KEY_CONTEXTUAL_INSERT and KEY_CONTEXTUAL_QUERY

Signed-off-by: Akshai Murari <akshaim@xxxxxxxxxx>
---
drivers/hid/hid-debug.c | 6 ++++++
drivers/hid/hid-input.c | 3 +++
include/uapi/linux/input-event-codes.h | 4 ++++
3 files changed, 13 insertions(+)

diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index f20dc46fd8eb..f44e6e708404 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -990,6 +990,9 @@ static const struct hid_usage_entry hid_usage_table[] = {
{ 0x0c, 0x01c9, "ALContactSync" },
{ 0x0c, 0x01ca, "ALNavigation" },
{ 0x0c, 0x01cb, "ALContextawareDesktopAssistant" },
+ { 0x0c, 0x01cc, "ALActionOnSelection" },
+ { 0x0c, 0x01cd, "ALContextualInsertion" },
+ { 0x0c, 0x01ce, "ALContextualQuery" },
{ 0x0c, 0x0200, "GenericGUIApplicationControls" },
{ 0x0c, 0x0201, "ACNew" },
{ 0x0c, 0x0202, "ACOpen" },
@@ -3375,6 +3378,9 @@ static const char *keys[KEY_MAX + 1] = {
[KEY_BRIGHTNESS_MIN] = "BrightnessMin",
[KEY_BRIGHTNESS_MAX] = "BrightnessMax",
[KEY_BRIGHTNESS_AUTO] = "BrightnessAuto",
+ [KEY_ACTION_ON_SELECTION] = "ActionOnSelection",
+ [KEY_CONTEXTUAL_INSERT] = "ContextualInsert",
+ [KEY_CONTEXTUAL_QUERY] = "ContextualQuery",
[KEY_KBDINPUTASSIST_PREV] = "KbdInputAssistPrev",
[KEY_KBDINPUTASSIST_NEXT] = "KbdInputAssistNext",
[KEY_KBDINPUTASSIST_PREVGROUP] = "KbdInputAssistPrevGroup",
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9475b7e9da43..e824c793f669 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1227,6 +1227,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case 0x1bc: map_key_clear(KEY_MESSENGER); break;
case 0x1bd: map_key_clear(KEY_INFO); break;
case 0x1cb: map_key_clear(KEY_ASSISTANT); break;
+ case 0x1cc: map_key_clear(KEY_ACTION_ON_SELECTION); break;
+ case 0x1cd: map_key_clear(KEY_CONTEXTUAL_INSERT); break;
+ case 0x1ce: map_key_clear(KEY_CONTEXTUAL_QUERY); break;
case 0x201: map_key_clear(KEY_NEW); break;
case 0x202: map_key_clear(KEY_OPEN); break;
case 0x203: map_key_clear(KEY_CLOSE); break;
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 4bdb6a165987..3528168f7c6d 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -643,6 +643,10 @@
#define KEY_EPRIVACY_SCREEN_ON 0x252
#define KEY_EPRIVACY_SCREEN_OFF 0x253

+#define KEY_ACTION_ON_SELECTION 0x254 /* AL Action on Selection (HUTRR119) */
+#define KEY_CONTEXTUAL_INSERT 0x255 /* AL Contextual Insertion (HUTRR119) */
+#define KEY_CONTEXTUAL_QUERY 0x256 /* AL Contextual Query (HUTRR119) */
+
#define KEY_KBDINPUTASSIST_PREV 0x260
#define KEY_KBDINPUTASSIST_NEXT 0x261
#define KEY_KBDINPUTASSIST_PREVGROUP 0x262
--
2.53.0.1018.g2bb0e51243-goog