]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
platform/x86: huawei-wmi: add keys for HONOR models
authorJia Ston <ston.jia@outlook.com>
Wed, 29 Oct 2025 05:18:38 +0000 (05:18 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 6 Nov 2025 12:11:43 +0000 (14:11 +0200)
HONOR MagicBook X16/X14 models produced in 2025 cannot use the Print
Screen and YOYO keys properly, with the system reporting them as
unknown key presses (codes: 0x028b and 0x028e).

To resolve this, a key_entry is added for both the HONOR Print Screen
key and the HONOR YOYO key, ensuring they function correctly on these
models.

Signed-off-by: Ston Jia <ston.jia@outlook.com>
Link: https://patch.msgid.link/20251029051804.220111-1-ston.jia@outlook.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/huawei-wmi.c

index c3772df34679f50abbaa7a173424ae1fa98717ba..8a4c54089ace3168594320fba3e2ad59cb1ab610 100644 (file)
@@ -81,6 +81,10 @@ static const struct key_entry huawei_wmi_keymap[] = {
        { KE_KEY,    0x289, { KEY_WLAN } },
        // Huawei |M| key
        { KE_KEY,    0x28a, { KEY_CONFIG } },
+       // HONOR YOYO key
+       { KE_KEY,    0x28b, { KEY_NOTIFICATION_CENTER } },
+       // HONOR print screen
+       { KE_KEY,    0x28e, { KEY_PRINT } },
        // Keyboard backlit
        { KE_IGNORE, 0x293, { KEY_KBDILLUMTOGGLE } },
        { KE_IGNORE, 0x294, { KEY_KBDILLUMUP } },