mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: ideapad-laptop: Add PrintScreen key on ThinkBook 14 G8+ IPH
@ 2026-09-29 15:40 Zekai Xie
  2026-09-29 16:58 ` Marco Giunta
  0 siblings, 1 reply; 2+ messages in thread
From: Zekai Xie @ 2026-09-29 15:40 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: mpearson-lenovo, ikepanhc, hansg, ilpo.jarvinen, derekjohn.clark,
	linux-kernel, Zekai Xie

The Fn+F11 (PrintScreen) key on the Lenovo ThinkBook 14 G8+ IPH
(21VG) reports WMI scancode 0x48 (0x148 with the WMI key bit set),
which has no entry in ideapad_keymap[], so userspace only receives
KEY_UNKNOWN:

  Event: type 4 (EV_MSC), code 4 (MSC_SCAN), value 148
  Event: type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 1

Map it to KEY_SYSRQ so the key produces the Print keysym as labelled.

Assisted-by: LLM
Signed-off-by: Zekai Xie <zekaixie37@gmail.com>
---
 drivers/platform/x86/lenovo/ideapad-laptop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index 8213524..4cae65c 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -1364,6 +1364,8 @@ static const struct key_entry ideapad_keymap[] = {
 	{ KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
 	{ KE_KEY,   0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
 	{ KE_KEY,   0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
+	/* PrintScreen (Fn+F11) on ThinkBook 14 G8+ IPH (21VG) */
+	{ KE_KEY,   0x48 | IDEAPAD_WMI_KEY, { KEY_SYSRQ } },
 
 	{ KE_END },
 };
-- 
2.55.0


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

* Re: [PATCH] platform/x86: ideapad-laptop: Add PrintScreen key on ThinkBook 14 G8+ IPH
  2026-09-29 15:40 [PATCH] platform/x86: ideapad-laptop: Add PrintScreen key on ThinkBook 14 G8+ IPH Zekai Xie
@ 2026-09-29 16:58 ` Marco Giunta
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Giunta @ 2026-09-29 16:58 UTC (permalink / raw)
  To: zekaixie37
  Cc: derekjohn.clark, hansg, ikepanhc, ilpo.jarvinen, linux-kernel,
	mpearson-lenovo, platform-driver-x86

Hi Zekai,

Note that scancode 0x148 is already mapped in mainline: see commit
bc39af8c2c43 ("platform/x86: ideapad-laptop: Map Smart Connect hotkey to
KEY_LINK_PHONE"). Your patch seems to be based on an older tree.

That commit came from my two 2025 machines, a Yoga Pro 7 14ASP10 and a
Legion Pro 7 16AFR10H. On both, the F11 key shows a symbol with a laptop,
a tablet and a smartphone, and the user manual says it starts the Lenovo
Smart Connect app, so the event is mapped to KEY_LINK_PHONE.

I had a look at the ThinkBook 14 G8 user guide (I could not find the G8+
IPH variant specifically, though), and there F10 is the screenshot
selection tool, while F11 carries the same laptop/tablet/smartphone symbol
as on my machines.
Since your commit message describes the key as Fn+F11, I suspect
the event you recorded actually comes from the Smart Connect key rather
than from the screenshot selection tool key, in which case KEY_LINK_PHONE
is already what mainline reports for it.

In any case, if you do end up mapping a PrintScreen key in this driver,
note that KEY_SYSRQ is the magic SysRq key rather than a screenshot key;
KEY_PRINT, or KEY_SELECTIVE_SCREENSHOT as used for 0x04 and 0x2d if the
key opens a snipping tool, would seem more appropriate.

Best regards,
Marco

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

end of thread, other threads:[~2026-09-29 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 15:40 [PATCH] platform/x86: ideapad-laptop: Add PrintScreen key on ThinkBook 14 G8+ IPH Zekai Xie
2026-09-29 16:58 ` Marco Giunta

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®