All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Jiri Kosina <jkosina@suse.cz>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.4 03/28] HID: hid-input: add mapping for emoji picker key
Date: Wed, 16 Jun 2021 17:33:14 +0200	[thread overview]
Message-ID: <20210616152834.264989719@linuxfoundation.org> (raw)
In-Reply-To: <20210616152834.149064097@linuxfoundation.org>

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

[ Upstream commit 7b229b13d78d112e2c5d4a60a3c6f602289959fa ]

HUTRR101 added a new usage code for a key that is supposed to invoke and
dismiss an emoji picker widget to assist users to locate and enter emojis.

This patch adds a new key definition KEY_EMOJI_PICKER and maps 0x0c/0x0d9
usage code to this new keycode. Additionally hid-debug is adjusted to
recognize this new usage code as well.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/hid-debug.c                | 1 +
 drivers/hid/hid-input.c                | 3 +++
 include/uapi/linux/input-event-codes.h | 1 +
 3 files changed, 5 insertions(+)

diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 9453147d020d..01135713e8f9 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -929,6 +929,7 @@ static const char *keys[KEY_MAX + 1] = {
 	[KEY_APPSELECT] = "AppSelect",
 	[KEY_SCREENSAVER] = "ScreenSaver",
 	[KEY_VOICECOMMAND] = "VoiceCommand",
+	[KEY_EMOJI_PICKER] = "EmojiPicker",
 	[KEY_BRIGHTNESS_MIN] = "BrightnessMin",
 	[KEY_BRIGHTNESS_MAX] = "BrightnessMax",
 	[KEY_BRIGHTNESS_AUTO] = "BrightnessAuto",
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index ec08895e7b1d..6d551ae251c0 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -957,6 +957,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 
 		case 0x0cd: map_key_clear(KEY_PLAYPAUSE);	break;
 		case 0x0cf: map_key_clear(KEY_VOICECOMMAND);	break;
+
+		case 0x0d9: map_key_clear(KEY_EMOJI_PICKER);	break;
+
 		case 0x0e0: map_abs_clear(ABS_VOLUME);		break;
 		case 0x0e2: map_key_clear(KEY_MUTE);		break;
 		case 0x0e5: map_key_clear(KEY_BASSBOOST);	break;
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 472cd5bc5567..311a57f3e01a 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -607,6 +607,7 @@
 #define KEY_VOICECOMMAND		0x246	/* Listening Voice Command */
 #define KEY_ASSISTANT		0x247	/* AL Context-aware desktop assistant */
 #define KEY_KBD_LAYOUT_NEXT	0x248	/* AC Next Keyboard Layout Select */
+#define KEY_EMOJI_PICKER	0x249	/* Show/hide emoji picker (HUTRR101) */
 
 #define KEY_BRIGHTNESS_MIN		0x250	/* Set Brightness to Minimum */
 #define KEY_BRIGHTNESS_MAX		0x251	/* Set Brightness to Maximum */
-- 
2.30.2




  parent reply	other threads:[~2021-06-16 15:35 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 15:33 [PATCH 5.4 00/28] 5.4.127-rc1 review Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 01/28] net: ieee802154: fix null deref in parse dev addr Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 02/28] HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65 Greg Kroah-Hartman
2021-06-16 15:33 ` Greg Kroah-Hartman [this message]
2021-06-16 15:33 ` [PATCH 5.4 04/28] HID: hid-sensor-hub: Return error for hid_set_field() failure Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 05/28] HID: quirks: Add quirk for Lenovo optical mouse Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 06/28] HID: multitouch: set Stylus suffix for Stylus-application devices, too Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 07/28] HID: Add BUS_VIRTUAL to hid_connect logging Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 08/28] HID: usbhid: fix info leak in hid_submit_ctrl Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 09/28] drm/tegra: sor: Do not leak runtime PM reference Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 10/28] ARM: OMAP2+: Fix build warning when mmc_omap is not built Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 11/28] gfs2: Prevent direct-I/O write fallback errors from getting lost Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 12/28] HID: gt683r: add missing MODULE_DEVICE_TABLE Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 13/28] riscv: Use -mno-relax when using lld linker Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 14/28] gfs2: Fix use-after-free in gfs2_glock_shrink_scan Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 15/28] scsi: target: core: Fix warning on realtime kernels Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 16/28] ethernet: myri10ge: Fix missing error code in myri10ge_probe() Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 17/28] scsi: qedf: Do not put host in qedf_vport_create() unconditionally Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 18/28] scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 19/28] nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues() Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 20/28] nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 21/28] nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue() Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 22/28] net: ipconfig: Dont override command-line hostnames or domains Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 23/28] drm/amd/display: Allow bandwidth validation for 0 streams Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 24/28] drm/amd/display: Fix overlay validation by considering cursors Greg Kroah-Hartman
2021-06-16 15:59   ` Harry Wentland
2021-06-16 16:25     ` Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 25/28] rtnetlink: Fix missing error code in rtnl_bridge_notify() Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 26/28] net/x25: Return the correct errno code Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 27/28] net: " Greg Kroah-Hartman
2021-06-16 15:33 ` [PATCH 5.4 28/28] fib: " Greg Kroah-Hartman
2021-06-16 18:49 ` [PATCH 5.4 00/28] 5.4.127-rc1 review Jon Hunter
2021-06-16 22:37 ` Florian Fainelli
2021-06-17 10:42 ` Naresh Kamboju
2021-06-17 10:59 ` Sudip Mukherjee
2021-06-17 21:39 ` Guenter Roeck
2021-06-18  0:35 ` Samuel Zou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210616152834.264989719@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.