]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
platform/x86: thinkpad_acpi: Add support for new phone link hotkey
authorIllia Ostapyshyn <illia@yshyn.com>
Thu, 14 Nov 2024 17:39:30 +0000 (18:39 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 15 Jan 2025 14:26:43 +0000 (16:26 +0200)
The F11 key on the new Lenovo Thinkpad T14 Gen 5, T16 Gen 3, and P14s
Gen 5 laptops includes a symbol showing a smartphone and a laptop
chained together.  According to the user manual, it starts the Microsoft
Phone Link software used to connect to Android/iOS devices and relay
messages/calls or sync data.

These laptops send the 0x1320 hkey event when the key is pressed.  Map
this event to the new KEY_LINK_PHONE keycode.

Signed-off-by: Illia Ostapyshyn <illia@yshyn.com>
Link: https://lore.kernel.org/r/20241114173930.44983-3-illia@yshyn.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/thinkpad_acpi.c

index 22f871e9f53cc512df6b3a2235de86c54996c4e9..d99573e7a9832b26c08be40b72b31dc4bb51ce1d 100644 (file)
@@ -3274,6 +3274,7 @@ static const struct key_entry keymap_lenovo[] __initconst = {
         * scancodes to preserve uAPI compatibility, see tpacpi_input_send_key().
         */
        { KE_KEY, 0x131d, { KEY_VENDOR } }, /* System debug info, similar to old ThinkPad key */
+       { KE_KEY, 0x1320, { KEY_LINK_PHONE } },
        { KE_KEY, TP_HKEY_EV_TRACK_DOUBLETAP /* 0x8036 */, { KEY_PROG4 } },
        { KE_END }
 };