1 From a260f7d726fde52c0278bd3fa085a758639bcee2 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= <git@apitzsch.eu>
3 Date: Sat, 19 Aug 2023 09:12:15 +0200
4 Subject: platform/x86: ideapad-laptop: Add support for new hotkeys found on ThinkBook 14s Yoga ITL
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 From: André Apitzsch <git@apitzsch.eu>
11 commit a260f7d726fde52c0278bd3fa085a758639bcee2 upstream.
13 The Lenovo Thinkbook 14s Yoga ITL has 4 new symbols/shortcuts on their
14 F9-F11 and PrtSc keys:
16 F9: Has a symbol of a head with a headset, the manual says "Service key"
17 F10: Has a symbol of a telephone horn which has been picked up from the
18 receiver, the manual says: "Answer incoming calls"
19 F11: Has a symbol of a telephone horn which is resting on the receiver,
20 the manual says: "Reject incoming calls"
21 PrtSc: Has a symbol of a siccor and a dashed ellipse, the manual says:
22 "Open the Windows 'Snipping' Tool app"
24 This commit adds support for these 4 new hkey events.
26 Signed-off-by: André Apitzsch <git@apitzsch.eu>
27 Link: https://lore.kernel.org/r/20230819-lenovo_keys-v1-1-9d34eac88e0a@apitzsch.eu
28 Reviewed-by: Hans de Goede <hdegoede@redhat.com>
29 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32 drivers/platform/x86/ideapad-laptop.c | 5 +++++
33 1 file changed, 5 insertions(+)
35 --- a/drivers/platform/x86/ideapad-laptop.c
36 +++ b/drivers/platform/x86/ideapad-laptop.c
37 @@ -1176,6 +1176,11 @@ static const struct key_entry ideapad_ke
38 { KE_IGNORE, 0x03 | IDEAPAD_WMI_KEY },
39 /* Customizable Lenovo Hotkey ("star" with 'S' inside) */
40 { KE_KEY, 0x01 | IDEAPAD_WMI_KEY, { KEY_FAVORITES } },
41 + { KE_KEY, 0x04 | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
42 + /* Lenovo Support */
43 + { KE_KEY, 0x07 | IDEAPAD_WMI_KEY, { KEY_HELP } },
44 + { KE_KEY, 0x0e | IDEAPAD_WMI_KEY, { KEY_PICKUP_PHONE } },
45 + { KE_KEY, 0x0f | IDEAPAD_WMI_KEY, { KEY_HANGUP_PHONE } },
46 /* Dark mode toggle */
47 { KE_KEY, 0x13 | IDEAPAD_WMI_KEY, { KEY_PROG1 } },
48 /* Sound profile switch */