[PATCH v3 1/2] platform/x86: ideapad-laptop: Ignore keyboard backlight hotkeys
From: Ciro Pedrini via B4 Relay
Date: Thu Nov 26 2026 - 20:11:51 EST
From: Ciro Pedrini <ciro.pedrini@xxxxxxxxx>
On the Legion Pro 7 16IAX10H, Fn+Space (backlight effect), Fn+Up and
Fn+Down (backlight brightness) emit WMI fn-key events 0x21, 0x1a and
0x19, which the keymap does not cover, so they reach userspace as
KEY_UNKNOWN. The keyboard's USB controller handles these keys itself: it
switches the effect or changes the brightness, and reports the new level
on its own HID interface. Ignore the three events, as is already done for
FnLock and Esc, rather than mapping them to KEY_KBDILLUM*, which would
make userspace change the brightness a second time.
Tested on the 16IAX10H with 7.2: with the change, evtest shows no events
for the three keys, and the keyboard still switches the effect and the
brightness.
Acked-by: Rong Zhang <i@xxxxxxxx>
Signed-off-by: Ciro Pedrini <ciro.pedrini@xxxxxxxxx>
---
Prepared with Claude Code (Claude Opus 5.5) from evtest on the laptop's
"Ideapad extra buttons" device; I reviewed and tested it.
---
drivers/platform/x86/lenovo/ideapad-laptop.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index d2344dcd6945..dbb54d2c7c40 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -1384,6 +1384,10 @@ static const struct key_entry ideapad_keymap[] = {
{ KE_IGNORE, 0x02 | IDEAPAD_WMI_KEY },
/* Esc (handled by the firmware) */
{ KE_IGNORE, 0x03 | IDEAPAD_WMI_KEY },
+ /* Keyboard backlight down, up and effect (handled by the keyboard) */
+ { KE_IGNORE, 0x19 | IDEAPAD_WMI_KEY },
+ { KE_IGNORE, 0x1a | IDEAPAD_WMI_KEY },
+ { KE_IGNORE, 0x21 | IDEAPAD_WMI_KEY },
/* Customizable Lenovo Hotkey ("star" with 'S' inside) */
{ KE_KEY, 0x01 | IDEAPAD_WMI_KEY, { KEY_FAVORITES } },
{ KE_KEY, 0x04 | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
--
2.56.0