platform/x86: lg-laptop: Fix input of super key
Subsystems (2)
PATCH 1/1 platform/x86: lg-laptop: Fix input of super key
From: Helian Caumeil <[email protected]>
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.
--- drivers/platform/x86/lg-laptop.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/platform/x86/lg-laptop.c +4 -0
@@ -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 */
Signature · 1 line
2.56.0
Am 03.11.26 um 19:07 schrieb Armin Wolf:
Quoted 7 lines
From: Helian Caumeil <[email protected]>
Some devices emit special event codes when the super key is pressed. Mapping those events onto
KEY_UNKNOWNby the sparse keymap seems to confuse userspace, causing duplicated super key input events.Prevent this by ignoring those event codes.
Any updates on this? More users have reported the same issue.
Thanks,
Armin Wolf
Quoted 23 lines
Signed-off-by Helian Caumeil <[email protected]>Co-developed-by Armin Wolf <[email protected]>Signed-off-by Armin Wolf <[email protected]>--- drivers/platform/x86/lg-laptop.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/platform/x86/lg-laptop.c +4
-0@@ -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 */
Ilpo Järvinen
maintainerQuoted 8 lines · Armin Wolf
Some devices emit special event codes when the super key is pressed. Mapping those events onto
KEY_UNKNOWNby the sparse keymap seems to confuse userspace, causing duplicated super key input events.Prevent this by ignoring those event codes.
[...]
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also fixes are mostly routed through for-next unless the fix is for a commit introduced in the most recent cycle or is clearly a regression fix.
The list of commits applied:
[1/1] platform/x86: lg-laptop: Fix input of super key
commit: 9e60bf3fb734f8de4eda159fe7d0bac465cb32d6
--
i.
Am 01.12.26 um 15:50 schrieb Ilpo Järvinen:
Quoted 16 lines · Armin Wolf
Quoted 9 lines
Some devices emit special event codes when the super key is pressed. Mapping those events onto
KEY_UNKNOWNby the sparse keymap seems to confuse userspace, causing duplicated super key input events.Prevent this by ignoring those event codes.
[...]
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
Quoted 4 lines
FYI [if applicable to your patch], as per Linus' policy change, also fixes are mostly routed through for-next unless the fix is for a commit introduced in the most recent cycle or is clearly a regression fix.
Thank you :)
Could you please route this commit thru the fixes branch? I think this would be justified in this case because the underlying error causes a regression in functionality (super key issues) on existing devices.
Thanks,
Armin Wolf
Quoted 8 lines
The list of commits applied:
[1/1] platform/x86: lg-laptop: Fix input of super keycommit: 9e60bf3fb734f8de4eda159fe7d0bac465cb32d6--
i.
Ilpo Järvinen
maintainerQuoted 22 lines · Armin Wolf
Am 01.12.26 um 15:50 schrieb Ilpo Järvinen:
Quoted 16 lines · Armin Wolf
Quoted 9 lines
Some devices emit special event codes when the super key is pressed. Mapping those events onto
KEY_UNKNOWNby the sparse keymap seems to confuse userspace, causing duplicated super key input events.Prevent this by ignoring those event codes.
[...]
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
Quoted 4 lines
FYI [if applicable to your patch], as per Linus' policy change, also fixes are mostly routed through for-next unless the fix is for a commit introduced in the most recent cycle or is clearly a regression fix.
Quoted 5 lines
Thank you :)
Could you please route this commit thru the fixes branch? I think this would be justified in this case because the underlying error causes a regression in functionality (super key issues) on existing devices.
Hi,
We're now at -rc5, so that would win approx 2 weeks depending on how slow LKP is, doesn't seem a big difference.
Signature · 1 line
i.
Am 01.12.26 um 22:30 schrieb Ilpo Järvinen:
Quoted 26 lines · Armin Wolf
Quoted 25 lines
Am 01.12.26 um 15:50 schrieb Ilpo Järvinen:
Quoted 16 lines · Armin Wolf
Quoted 9 lines
Some devices emit special event codes when the super key is pressed. Mapping those events onto
KEY_UNKNOWNby the sparse keymap seems to confuse userspace, causing duplicated super key input events.Prevent this by ignoring those event codes.
[...]
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
Quoted 4 lines
FYI [if applicable to your patch], as per Linus' policy change, also fixes are mostly routed through for-next unless the fix is for a commit introduced in the most recent cycle or is clearly a regression fix.
Thank you :)
Quoted 9 lines
Quoted 3 lines
Could you please route this commit thru the fixes branch? I think this would be justified in this case because the underlying error causes a regression in functionality (super key issues) on existing devices.
Hi,
We're now at -rc5, so that would win approx 2 weeks depending on how slow LKP is, doesn't seem a big difference.
Alright, then you can keep it in for-next.
Thanks,
Armin Wolf