Commit 7545dc75 authored by Hans de Goede's avatar Hans de Goede

platform/x86: thinkpad_acpi: Add mappings for adaptive kbd clipping-tool and cloud keys

The X1 carbon 2014 / 2nd gen's adaptive keyboard top row's "Home" mode,
which is 1 of the 2 modes Linux supports, has clipping-tool and cloud
buttons which so far are not mapped.

I assume these were left as KEY_RESERVED because no suitable KEY_FOO codes
were available when support was added.

In the mean time we have gotten KEY_SELECTIVE_SCREENSHOT and this has been
used for the clipping-tool function under Fn + PrtSc on more traditional
ThinkPad keyboards already.

Finding a KEY_FOO code for the cloud key is harder looking at the symbol
it seems to refer to cloud-storage which made me think of file syncing,
or file transfer which has let me to pick KEY_XFER for this.

Note this is based on looking at a picture of the adaptive top row
in Home mode and has not been tested on an actual adaptive keyboard.
Tested-by: default avatarMark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarMark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240424122834.19801-21-hdegoede@redhat.com
parent 42f7b965
...@@ -3234,8 +3234,8 @@ static const struct key_entry keymap_lenovo[] __initconst = { ...@@ -3234,8 +3234,8 @@ static const struct key_entry keymap_lenovo[] __initconst = {
/* Adaptive keyboard mappings for Carbon X1 2014 translated scancodes 0x20 - 0x33 */ /* Adaptive keyboard mappings for Carbon X1 2014 translated scancodes 0x20 - 0x33 */
{ KE_KEY, TP_ACPI_HOTKEYSCAN_MUTE2, { KEY_RESERVED } }, { KE_KEY, TP_ACPI_HOTKEYSCAN_MUTE2, { KEY_RESERVED } },
{ KE_KEY, TP_ACPI_HOTKEYSCAN_BRIGHTNESS_ZERO, { KEY_BRIGHTNESS_MIN } }, { KE_KEY, TP_ACPI_HOTKEYSCAN_BRIGHTNESS_ZERO, { KEY_BRIGHTNESS_MIN } },
{ KE_KEY, TP_ACPI_HOTKEYSCAN_CLIPPING_TOOL, { KEY_RESERVED } }, { KE_KEY, TP_ACPI_HOTKEYSCAN_CLIPPING_TOOL, { KEY_SELECTIVE_SCREENSHOT } },
{ KE_KEY, TP_ACPI_HOTKEYSCAN_CLOUD, { KEY_RESERVED } }, { KE_KEY, TP_ACPI_HOTKEYSCAN_CLOUD, { KEY_XFER } },
{ KE_KEY, TP_ACPI_HOTKEYSCAN_UNK9, { KEY_RESERVED } }, { KE_KEY, TP_ACPI_HOTKEYSCAN_UNK9, { KEY_RESERVED } },
{ KE_KEY, TP_ACPI_HOTKEYSCAN_VOICE, { KEY_VOICECOMMAND } }, { KE_KEY, TP_ACPI_HOTKEYSCAN_VOICE, { KEY_VOICECOMMAND } },
{ KE_KEY, TP_ACPI_HOTKEYSCAN_UNK10, { KEY_RESERVED } }, { KE_KEY, TP_ACPI_HOTKEYSCAN_UNK10, { KEY_RESERVED } },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment