Skip to content

Commit 327b89f

Browse files
William Mahondtor
authored andcommitted
HID: add mapping for KEY_ALL_APPLICATIONS
This patch adds a new key definition for KEY_ALL_APPLICATIONS and aliases KEY_DASHBOARD to it. It also maps the 0x0c/0x2a2 usage code to KEY_ALL_APPLICATIONS. Signed-off-by: William Mahon <wmahon@chromium.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20220303035618.1.I3a7746ad05d270161a18334ae06e3b6db1a1d339@changeid Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent bfa26ba commit 327b89f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

drivers/hid/hid-debug.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,9 @@ static const char *keys[KEY_MAX + 1] = {
860860
[KEY_F22] = "F22", [KEY_F23] = "F23",
861861
[KEY_F24] = "F24", [KEY_PLAYCD] = "PlayCD",
862862
[KEY_PAUSECD] = "PauseCD", [KEY_PROG3] = "Prog3",
863-
[KEY_PROG4] = "Prog4", [KEY_SUSPEND] = "Suspend",
863+
[KEY_PROG4] = "Prog4",
864+
[KEY_ALL_APPLICATIONS] = "AllApplications",
865+
[KEY_SUSPEND] = "Suspend",
864866
[KEY_CLOSE] = "Close", [KEY_PLAY] = "Play",
865867
[KEY_FASTFORWARD] = "FastForward", [KEY_BASSBOOST] = "BassBoost",
866868
[KEY_PRINT] = "Print", [KEY_HP] = "HP",

drivers/hid/hid-input.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
10841084

10851085
case 0x29d: map_key_clear(KEY_KBD_LAYOUT_NEXT); break;
10861086

1087+
case 0x2a2: map_key_clear(KEY_ALL_APPLICATIONS); break;
1088+
10871089
case 0x2c7: map_key_clear(KEY_KBDINPUTASSIST_PREV); break;
10881090
case 0x2c8: map_key_clear(KEY_KBDINPUTASSIST_NEXT); break;
10891091
case 0x2c9: map_key_clear(KEY_KBDINPUTASSIST_PREVGROUP); break;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@
278278
#define KEY_PAUSECD 201
279279
#define KEY_PROG3 202
280280
#define KEY_PROG4 203
281-
#define KEY_DASHBOARD 204 /* AL Dashboard */
281+
#define KEY_ALL_APPLICATIONS 204 /* AC Desktop Show All Applications */
282+
#define KEY_DASHBOARD KEY_ALL_APPLICATIONS
282283
#define KEY_SUSPEND 205
283284
#define KEY_CLOSE 206 /* AC Close */
284285
#define KEY_PLAY 207

0 commit comments

Comments
 (0)