]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
platform/x86: asus-wmi: map more keys on ExpertBook B9
authorAnton Khirnov <anton@khirnov.net>
Wed, 27 Aug 2025 15:29:54 +0000 (17:29 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 28 Aug 2025 15:41:38 +0000 (18:41 +0300)
* there is a dedicated "noise cancel" key in top row, between mic mute
  and PrintScreen; it sends 0xCA when pressed by itself (mapped to F13),
  0xCB with Fn (mapped to F14)
* Fn+f sends 0x9D; it is not documented in the manual, but some web
  search results mention "asus intelligent performance"; mapped to FN_F

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250827152954.4844-1-anton@khirnov.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/asus-nb-wmi.c

index 6928bb6ae0f3c83169ec88bf179d0426fd4c0bc5..3a488cf9ca06c966d1035feda656d78f987b7916 100644 (file)
@@ -632,6 +632,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
        { KE_KEY, 0x93, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + DVI */
        { KE_KEY, 0x95, { KEY_MEDIA } },
        { KE_KEY, 0x99, { KEY_PHONE } }, /* Conflicts with fan mode switch */
+       { KE_KEY, 0X9D, { KEY_FN_F } },
        { KE_KEY, 0xA0, { KEY_SWITCHVIDEOMODE } }, /* SDSP HDMI only */
        { KE_KEY, 0xA1, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + HDMI */
        { KE_KEY, 0xA2, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + HDMI */
@@ -646,6 +647,8 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
        { KE_IGNORE, 0xC0, }, /* External display connect/disconnect notification */
        { KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
        { KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
+       { KE_KEY, 0xCA, { KEY_F13 } }, /* Noise cancelling on Expertbook B9 */
+       { KE_KEY, 0xCB, { KEY_F14 } }, /* Fn+noise-cancel */
        { KE_IGNORE, 0xC6, },  /* Ambient Light Sensor notification */
        { KE_IGNORE, 0xCF, },   /* AC mode */
        { KE_KEY, 0xFA, { KEY_PROG2 } },           /* Lid flip action */