Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: redmi-wmi: Add more hotkey mappings

This patch adds more Fn hotkeys (like Refresh rate toggle).
Additionally, remap the setup key from KEY_SETUP to KEY_CONFIG.
As KEY_CONFIG is supported by Desktop Environments for launching
system settings, whereas KEY_SETUP is often ignored by userspace.

Signed-off-by: Jesse Guo <JesseGuoTech@outlook.com>
Reviewed-by: Gladyshev Ilya <foxido@foxido.dev>
Link: https://patch.msgid.link/TYCPR01MB6851636256C39B170F2312E5D192A@TYCPR01MB6851.jpnprd01.prod.outlook.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Jesse Guo and committed by
Ilpo Järvinen
e3aa6fea bd5914ca

+24 -1
+24 -1
drivers/platform/x86/redmi-wmi.c
··· 20 20 static const struct key_entry redmi_wmi_keymap[] = { 21 21 {KE_KEY, 0x00000201, {KEY_SELECTIVE_SCREENSHOT}}, 22 22 {KE_KEY, 0x00000301, {KEY_ALL_APPLICATIONS}}, 23 - {KE_KEY, 0x00001b01, {KEY_SETUP}}, 23 + {KE_KEY, 0x00001b01, {KEY_CONFIG}}, 24 + {KE_KEY, 0x00011b01, {KEY_CONFIG}}, 25 + {KE_KEY, 0x00010101, {KEY_SWITCHVIDEOMODE}}, 26 + {KE_KEY, 0x00001a01, {KEY_REFRESH_RATE_TOGGLE}}, 24 27 25 28 /* AI button has code for each position */ 26 29 {KE_KEY, 0x00011801, {KEY_ASSISTANT}}, ··· 34 31 {KE_IGNORE, 0x00800501, {}}, 35 32 {KE_IGNORE, 0x00050501, {}}, 36 33 {KE_IGNORE, 0x000a0501, {}}, 34 + 35 + /* Xiaomi G Command Center */ 36 + {KE_KEY, 0x00010a01, {KEY_VENDOR}}, 37 + 38 + /* OEM preset power mode */ 39 + {KE_IGNORE, 0x00011601, {}}, 40 + {KE_IGNORE, 0x00021601, {}}, 41 + {KE_IGNORE, 0x00031601, {}}, 42 + {KE_IGNORE, 0x00041601, {}}, 43 + 44 + /* Fn Lock state */ 45 + {KE_IGNORE, 0x00000701, {}}, 46 + {KE_IGNORE, 0x00010701, {}}, 47 + 48 + /* Fn+`/1/2/3/4 */ 49 + {KE_KEY, 0x00011101, {KEY_F13}}, 50 + {KE_KEY, 0x00011201, {KEY_F14}}, 51 + {KE_KEY, 0x00011301, {KEY_F15}}, 52 + {KE_KEY, 0x00011401, {KEY_F16}}, 53 + {KE_KEY, 0x00011501, {KEY_F17}}, 37 54 38 55 {KE_END} 39 56 };