Add support for the new phone link hotkey on ThinkPads
Subsystems (3)
cover Add support for the new phone link hotkey on ThinkPads
The Lenovo Thinkpad T14 Gen 5, T16 Gen 3, and P14s Gen 5 laptops feature a new hotkey on F11 showing a smartphone and a laptop chained together. According to the user manual [1], it launches the Microsoft Phone Link software used to connect to Android/iOS devices and relay messages/calls or sync data.
This new keycode can be interpreted by desktop environments to lauch free Phone Link alternatives like KDE Connect or GSConnect.
[1] https://download.lenovo.com/pccbbs/mobiles_pdf/t14g5_t16g3_p14sg5_ug_en.pdf
Illia Ostapyshyn (2):
Input: allocate keycode for phone linking
platform/x86: thinkpad_acpi: Add support for new phone link hotkey
drivers/platform/x86/thinkpad_acpi.c | 1 + include/uapi/linux/input-event-codes.h | 1 + 2 files changed, 2 insertions(+)
Signature · 1 line
2.47.0
PATCH 1/2 Input: allocate keycode for phone linking
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.
As there are no suitable keycodes for this action, introduce a new one.
--- include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+)
include/uapi/linux/input-event-codes.h +1 -0
@@ -519,6 +519,7 @@#define KEY_NOTIFICATION_CENTER 0x1bc/* Show/hide the notification center */ #define KEY_PICKUP_PHONE 0x1bd/* Answer incoming call */ #define KEY_HANGUP_PHONE 0x1be/* Decline incoming call */ +#define KEY_LINK_PHONE 0x1bf/* AL Phone Syncing */ #define KEY_DEL_EOL 0x1c0#define KEY_DEL_EOS 0x1c1
Signature · 1 line
2.47.0
Ilpo Järvinen
maintainerRe: [PATCH 1/2] Input: allocate keycode for phone linking
Quoted 18 lines · Illia Ostapyshyn
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.
As there are no suitable keycodes for this action, introduce a new one.
Signed-off-by Illia Ostapyshyn <[email protected]>--- include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+)include/uapi/linux/input-event-codes.h +0
-0
include/uapi/linux/input-event-codes.h line 522
Quoted 4 lines
include/uapi/linux/input-event-codes.h +1
-0@@ -519,6 +519,7 @@#define KEY_NOTIFICATION_CENTER 0x1bc/* Show/hide the notification center */ #define KEY_PICKUP_PHONE 0x1bd/* Answer incoming call */ #define KEY_HANGUP_PHONE 0x1be/* Decline incoming call */ +#define KEY_LINK_PHONE 0x1bf/* AL Phone Syncing */
Any thoughts about this Dmitry?
Signature · 1 line
i.
Ilpo Järvinen
maintainerRe: [PATCH 1/2] Input: allocate keycode for phone linking
Quoted 15 lines · Ilpo Järvinen
Quoted 13 lines · Illia Ostapyshyn
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.
As there are no suitable keycodes for this action, introduce a new one.
Signed-off-by Illia Ostapyshyn <[email protected]>--- include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+)
Quoted 11 lines
include/uapi/linux/input-event-codes.h line 522
Quoted 9 lines
include/uapi/linux/input-event-codes.h +1
-0@@ -519,6 +519,7 @@#define KEY_NOTIFICATION_CENTER 0x1bc/* Show/hide the notification center */ #define KEY_PICKUP_PHONE 0x1bd/* Answer incoming call */ #define KEY_HANGUP_PHONE 0x1be/* Decline incoming call */ +#define KEY_LINK_PHONE 0x1bf/* AL Phone Syncing */ Any thoughts about this Dmitry?
Ping?
Signature · 1 line
i.
Re: [PATCH 1/2] Input: allocate keycode for phone linking
In reply to Illia OstapyshynQuoted 9 lines · Illia Ostapyshyn
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.
As there are no suitable keycodes for this action, introduce a new one.
Signed-off-by Illia Ostapyshyn <[email protected]>
Please feel free to merge with the corresponding driver change.
Quoted 19 lines
--- include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+)include/uapi/linux/input-event-codes.h +1
-0@@ -519,6 +519,7 @@#define KEY_NOTIFICATION_CENTER 0x1bc/* Show/hide the notification center */ #define KEY_PICKUP_PHONE 0x1bd/* Answer incoming call */ #define KEY_HANGUP_PHONE 0x1be/* Decline incoming call */ +#define KEY_LINK_PHONE 0x1bf/* AL Phone Syncing */ #define KEY_DEL_EOL 0x1c0#define KEY_DEL_EOS 0x1c1Signature · 1 line
2.47.0
Thanks.
Signature · 1 line
Dmitry
PATCH 2/2 platform/x86: thinkpad_acpi: Add support for new phone link hotkey
In reply to Illia OstapyshynThe 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.
--- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/thinkpad_acpi.c +1 -0
@@ -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 } };
Signature · 1 line
2.47.0
Ilpo Järvinen
maintainerQuoted 9 lines · Illia Ostapyshyn
The Lenovo Thinkpad T14 Gen 5, T16 Gen 3, and P14s Gen 5 laptops feature a new hotkey on F11 showing a smartphone and a laptop chained together. According to the user manual [1], it launches the Microsoft Phone Link software used to connect to Android/iOS devices and relay messages/calls or sync data.
This new keycode can be interpreted by desktop environments to lauch free Phone Link alternatives like KDE Connect or GSConnect.
[...]
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.
The list of commits applied:
[1/2] Input: allocate keycode for phone linking
commit: c3c1bf65b9f28a30b2b6f42fcbb644b53db4f87c
[2/2] platform/x86: thinkpad_acpi: Add support for new phone link hotkey
commit: 2677cc0a7519b6a816611a8a2a3e05bd028119ed--
i.