Skip to content

Commit 45065a5

Browse files
Akshai MurariJiri Kosina
authored andcommitted
Input: add keycodes for contextual AI usages (HUTRR119)
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@google.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent 1a2d30a commit 45065a5

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

drivers/hid/hid-debug.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,9 @@ static const struct hid_usage_entry hid_usage_table[] = {
990990
{ 0x0c, 0x01c9, "ALContactSync" },
991991
{ 0x0c, 0x01ca, "ALNavigation" },
992992
{ 0x0c, 0x01cb, "ALContextawareDesktopAssistant" },
993+
{ 0x0c, 0x01cc, "ALActionOnSelection" },
994+
{ 0x0c, 0x01cd, "ALContextualInsertion" },
995+
{ 0x0c, 0x01ce, "ALContextualQuery" },
993996
{ 0x0c, 0x0200, "GenericGUIApplicationControls" },
994997
{ 0x0c, 0x0201, "ACNew" },
995998
{ 0x0c, 0x0202, "ACOpen" },
@@ -3375,6 +3378,9 @@ static const char *keys[KEY_MAX + 1] = {
33753378
[KEY_BRIGHTNESS_MIN] = "BrightnessMin",
33763379
[KEY_BRIGHTNESS_MAX] = "BrightnessMax",
33773380
[KEY_BRIGHTNESS_AUTO] = "BrightnessAuto",
3381+
[KEY_ACTION_ON_SELECTION] = "ActionOnSelection",
3382+
[KEY_CONTEXTUAL_INSERT] = "ContextualInsert",
3383+
[KEY_CONTEXTUAL_QUERY] = "ContextualQuery",
33783384
[KEY_KBDINPUTASSIST_PREV] = "KbdInputAssistPrev",
33793385
[KEY_KBDINPUTASSIST_NEXT] = "KbdInputAssistNext",
33803386
[KEY_KBDINPUTASSIST_PREVGROUP] = "KbdInputAssistPrevGroup",

drivers/hid/hid-input.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
12271227
case 0x1bc: map_key_clear(KEY_MESSENGER); break;
12281228
case 0x1bd: map_key_clear(KEY_INFO); break;
12291229
case 0x1cb: map_key_clear(KEY_ASSISTANT); break;
1230+
case 0x1cc: map_key_clear(KEY_ACTION_ON_SELECTION); break;
1231+
case 0x1cd: map_key_clear(KEY_CONTEXTUAL_INSERT); break;
1232+
case 0x1ce: map_key_clear(KEY_CONTEXTUAL_QUERY); break;
12301233
case 0x201: map_key_clear(KEY_NEW); break;
12311234
case 0x202: map_key_clear(KEY_OPEN); break;
12321235
case 0x203: map_key_clear(KEY_CLOSE); break;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,10 @@
643643
#define KEY_EPRIVACY_SCREEN_ON 0x252
644644
#define KEY_EPRIVACY_SCREEN_OFF 0x253
645645

646+
#define KEY_ACTION_ON_SELECTION 0x254 /* AL Action on Selection (HUTRR119) */
647+
#define KEY_CONTEXTUAL_INSERT 0x255 /* AL Contextual Insertion (HUTRR119) */
648+
#define KEY_CONTEXTUAL_QUERY 0x256 /* AL Contextual Query (HUTRR119) */
649+
646650
#define KEY_KBDINPUTASSIST_PREV 0x260
647651
#define KEY_KBDINPUTASSIST_NEXT 0x261
648652
#define KEY_KBDINPUTASSIST_PREVGROUP 0x262

0 commit comments

Comments
 (0)