mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: lg-laptop: Fix input of super key
@ 2026-11-03 18:07 Armin Wolf
  2026-11-17 22:32 ` Armin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Armin Wolf @ 2026-11-03 18:07 UTC (permalink / raw)
  To: matan
  Cc: hansg, ilpo.jarvinen, platform-driver-x86, linux-kernel, helian.caumeil

From: Helian Caumeil <helian.caumeil@clever.cloud>

Some devices emit special event codes when the super key is pressed.
Mapping those events onto KEY_UNKNOWN by the sparse keymap seems to
confuse userspace, causing duplicated super key input events.

Prevent this by ignoring those event codes.

Signed-off-by: Helian Caumeil <helian.caumeil@clever.cloud>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222161
Co-developed-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/platform/x86/lg-laptop.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c
index 36ad1e269443..49e3029d4b95 100644
--- a/drivers/platform/x86/lg-laptop.c
+++ b/drivers/platform/x86/lg-laptop.c
@@ -138,6 +138,10 @@ static const struct key_entry wmi_keymap[] = {
 	{ KE_IGNORE,	0x30010001,	{ KEY_UNKNOWN }},
 	/* Change fan mode */
 	{ KE_KEY,	0x30010051,	{ KEY_PERFORMANCE }},
+	/* Super key pressed */
+	{ KE_IGNORE,    0x30020000,     { KEY_LEFTMETA }},
+	/* Super key released */
+	{ KE_IGNORE,    0x30020001,     { KEY_LEFTMETA }},
 	/* Disable camera */
 	{ KE_KEY,	0x40020000,	{ KEY_CAMERA_ACCESS_TOGGLE }},
 	/* Mute microphone */
-- 
2.56.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-17 22:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 18:07 [PATCH] platform/x86: lg-laptop: Fix input of super key Armin Wolf
2026-11-17 22:32 ` Armin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®