When Fn-Lock is pressed on Lenovo TrackPoint Keyboard II in USB mode, the keyboard only sends the scancode to the host and does not toggle the mode by itself, contrary to Bluetooth mode. This results in non-working Fn-Lock switching. Fix this issue by sending switching command upon receiving Fn-Lock scancode. Signed-off-by: ValdikSS <iam@xxxxxxxxxxxxxxx> Reported-by: Rodrigo Aguilera <rodrigoaguileraparraga@xxxxxxxxx> Tested-by: Rodrigo Aguilera <rodrigoaguileraparraga@xxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx # 6.x --- drivers/hid/hid-lenovo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c index e5e72aa52..6b315310a 100644 --- a/drivers/hid/hid-lenovo.c +++ b/drivers/hid/hid-lenovo.c @@ -757,6 +757,13 @@ static int lenovo_event_cptkbd(struct hid_device *hdev, * ensure things are in sync (the syncing should be a no-op). */ cptkbd_data->fn_lock = !cptkbd_data->fn_lock; + if (hdev->product == USB_DEVICE_ID_LENOVO_TPIIUSBKBD) { + /* + * ThinkPad TrackPoint keyboard II in USB mode needs + * host to toggle Fn-lock + */ + lenovo_send_cmd_cptkbd(hdev, 0x05, cptkbd_data->fn_lock); + } } return 0; -- 2.45.2