[PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9

Anton Khirnov posted 2 patches 2 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9
Posted by Anton Khirnov 2 months, 3 weeks ago
* 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
* Fn+space sends 0x5B; it is not documented or mentioned anywhere I
  could find; mapped to FN_SPACE

Signed-off-by: Anton Khirnov <anton@khirnov.net>
---
 drivers/platform/x86/asus-nb-wmi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index f84c3d03c1de..9d2fd7bc3ce1 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -582,6 +582,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
 	{ KE_KEY, 0x55, { KEY_CALC } },
 	{ KE_IGNORE, 0x57, },  /* Battery mode */
 	{ KE_IGNORE, 0x58, },  /* AC mode */
+	{ KE_KEY, 0x5B, { KEY_FN_SPACE } },
 	{ KE_KEY, 0x5C, { KEY_F15 } },  /* Power Gear key */
 	{ KE_KEY, 0x5D, { KEY_WLAN } }, /* Wireless console Toggle */
 	{ KE_KEY, 0x5E, { KEY_WLAN } }, /* Wireless console Enable */
@@ -618,6 +619,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 */
@@ -632,6 +634,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 */
-- 
2.39.5
Re: [PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9
Posted by Hans de Goede 2 months, 3 weeks ago
Hi,

On 14-Jul-25 5:07 PM, Anton Khirnov wrote:
> * 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
> * Fn+space sends 0x5B; it is not documented or mentioned anywhere I
>   could find; mapped to FN_SPACE
> 
> Signed-off-by: Anton Khirnov <anton@khirnov.net>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hansg@kernel.org>

Regards,

Hans



> ---
>  drivers/platform/x86/asus-nb-wmi.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
> index f84c3d03c1de..9d2fd7bc3ce1 100644
> --- a/drivers/platform/x86/asus-nb-wmi.c
> +++ b/drivers/platform/x86/asus-nb-wmi.c
> @@ -582,6 +582,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
>  	{ KE_KEY, 0x55, { KEY_CALC } },
>  	{ KE_IGNORE, 0x57, },  /* Battery mode */
>  	{ KE_IGNORE, 0x58, },  /* AC mode */
> +	{ KE_KEY, 0x5B, { KEY_FN_SPACE } },
>  	{ KE_KEY, 0x5C, { KEY_F15 } },  /* Power Gear key */
>  	{ KE_KEY, 0x5D, { KEY_WLAN } }, /* Wireless console Toggle */
>  	{ KE_KEY, 0x5E, { KEY_WLAN } }, /* Wireless console Enable */
> @@ -618,6 +619,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 */
> @@ -632,6 +634,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 */
[PATCH v3] platform/x86: asus-wmi: map more keys on ExpertBook B9
Posted by Anton Khirnov 1 month, 1 week ago
* 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>
---
Hi Hans,
would you mind applying this version of the patch, with the Fn+space
mapping left out for now?

Thanks
---

 drivers/platform/x86/asus-nb-wmi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index f84c3d03c1de..dba3c1488db2 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -618,6 +618,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 */
@@ -632,6 +633,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 */
-- 
2.39.5
Re: [PATCH v3] platform/x86: asus-wmi: map more keys on ExpertBook B9
Posted by Ilpo Järvinen 1 month, 1 week ago
On Wed, 27 Aug 2025, Anton Khirnov wrote:

> * 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>
> ---
> Hi Hans,
> would you mind applying this version of the patch, with the Fn+space
> mapping left out for now?

Hi Anton,

These days I'm the one handling pdx86 patches. I took this into the
review-ilpo-fixes branch and reinstated Hans' ack.

My experience is that long delays are nothing unusual when interacting 
with Dimitry so don't get discouraged by that when it comes to the
rest of v2 content. Once Dimitry has okay'ed the input side change, please 
resubmit the rest.

--
 i.

> Thanks
> ---
> 
>  drivers/platform/x86/asus-nb-wmi.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
> index f84c3d03c1de..dba3c1488db2 100644
> --- a/drivers/platform/x86/asus-nb-wmi.c
> +++ b/drivers/platform/x86/asus-nb-wmi.c
> @@ -618,6 +618,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 */
> @@ -632,6 +633,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 */
>
Re: [PATCH v3] platform/x86: asus-wmi: map more keys on ExpertBook B9
Posted by Anton Khirnov 1 month ago
Hi Ilpo,
Quoting Ilpo Järvinen (2025-08-28 18:18:51)
> Hi Anton,
> 
> These days I'm the one handling pdx86 patches. I took this into the
> review-ilpo-fixes branch and reinstated Hans' ack.

Thank you, much appreciated.

> My experience is that long delays are nothing unusual when interacting 
> with Dimitry so don't get discouraged by that when it comes to the
> rest of v2 content. Once Dimitry has okay'ed the input side change, please 
> resubmit the rest.

Sure, I will.

Cheers,
-- 
Anton Khirnov