Input: atkbd - map F23 key to support default copilot shortcut
authorMark Pearson <mpearson-lenovo@squebb.ca>
Tue, 21 Jan 2025 04:24:08 +0000 (20:24 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 21 Jan 2025 05:23:38 +0000 (21:23 -0800)
commit907bc9268a5a9f823ffa751957a5c1dd59f83f42
treeb91179f04ca73da90ac38d3f37ffd694d966df8b
parente4940fe6322c851659c17852b671c6e7b1aa9f56
Input: atkbd - map F23 key to support default copilot shortcut

Microsoft defined Meta+Shift+F23 as the Copilot shortcut instead of a
dedicated keycode, and multiple vendors have their keyboards emit this
sequence in response to users pressing a dedicated "Copilot" key.
Unfortunately the default keymap table in atkbd does not map scancode
0x6e (F23) and so the key combination does not work even if userspace
is ready to handle it.

Because this behavior is common between multiple vendors and the
scancode is currently unused map 0x6e to keycode 193 (KEY_F23) so that
key sequence is generated properly.

MS documentation for the scan code:
https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#scan-codes
Confirmed on Lenovo, HP and Dell machines by Canonical.
Tested on Lenovo T14s G6 AMD.

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20250107034554.25843-1-mpearson-lenovo@squebb.ca
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/atkbd.c