public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] platform/x86: asus-wmi: map more keys on ExpertBook B9
@ 2025-07-14 15:07 Anton Khirnov
  2025-07-14 15:07 ` [PATCH v2 1/2] Input: allocate a keycode for Fn+space Anton Khirnov
  2025-07-14 15:07 ` [PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9 Anton Khirnov
  0 siblings, 2 replies; 13+ messages in thread
From: Anton Khirnov @ 2025-07-14 15:07 UTC (permalink / raw)
  To: Corentin Chary, Luke D. Jones, Hans de Goede, Ilpo Järvinen,
	Dmitry Torokhov
  Cc: platform-driver-x86, linux-kernel, linux-input

Hi,
second version of the set [1], changed according to review by Hans de
Goede.

Now allocates a new keycode KEY_FN_SPACE for Fn+space.

The key mappings now are:
* Fn+space              -> FN_SPACE
* Fn+f                  -> FN_F
* <noise cancel>        -> F13
* Fn+<noise cancel>     -> F14

[1] https://lore.kernel.org/platform-driver-x86/20250702070231.2872-1-anton@khirnov.net/



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 1/2] Input: allocate a keycode for Fn+space
  2025-07-14 15:07 [PATCH v2 0/2] platform/x86: asus-wmi: map more keys on ExpertBook B9 Anton Khirnov
@ 2025-07-14 15:07 ` Anton Khirnov
  2025-07-15 12:26   ` Hans de Goede
                     ` (2 more replies)
  2025-07-14 15:07 ` [PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9 Anton Khirnov
  1 sibling, 3 replies; 13+ messages in thread
From: Anton Khirnov @ 2025-07-14 15:07 UTC (permalink / raw)
  To: Corentin Chary, Luke D. Jones, Hans de Goede, Ilpo Järvinen,
	Dmitry Torokhov
  Cc: platform-driver-x86, linux-kernel, linux-input

The Asus ExpertBook B9 laptop sends a WMI event when Fn+space is
pressed. Since I could not find any information on what this combination
is intended to do on this or any other Asus laptop, allocate a
KEY_FN_SPACE keycode for it.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
---
 include/uapi/linux/input-event-codes.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 3b2524e4b667..a49b0782fd8a 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -548,6 +548,7 @@
 #define KEY_FN_S		0x1e3
 #define KEY_FN_B		0x1e4
 #define KEY_FN_RIGHT_SHIFT	0x1e5
+#define KEY_FN_SPACE		0x1e6
 
 #define KEY_BRL_DOT1		0x1f1
 #define KEY_BRL_DOT2		0x1f2
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9
  2025-07-14 15:07 [PATCH v2 0/2] platform/x86: asus-wmi: map more keys on ExpertBook B9 Anton Khirnov
  2025-07-14 15:07 ` [PATCH v2 1/2] Input: allocate a keycode for Fn+space Anton Khirnov
@ 2025-07-14 15:07 ` Anton Khirnov
  2025-07-15 12:27   ` Hans de Goede
  1 sibling, 1 reply; 13+ messages in thread
From: Anton Khirnov @ 2025-07-14 15:07 UTC (permalink / raw)
  To: Dmitry Torokhov, Corentin Chary, Luke D. Jones, Hans de Goede,
	Ilpo Järvinen
  Cc: linux-input, platform-driver-x86, linux-kernel

* 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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
  2025-07-14 15:07 ` [PATCH v2 1/2] Input: allocate a keycode for Fn+space Anton Khirnov
@ 2025-07-15 12:26   ` Hans de Goede
  2025-08-07  7:04   ` Anton Khirnov
  2025-09-19  5:12   ` Dmitry Torokhov
  2 siblings, 0 replies; 13+ messages in thread
From: Hans de Goede @ 2025-07-15 12:26 UTC (permalink / raw)
  To: Anton Khirnov, Corentin Chary, Luke D. Jones, Ilpo Järvinen,
	Dmitry Torokhov
  Cc: platform-driver-x86, linux-kernel, linux-input

Hi,

On 14-Jul-25 5:07 PM, Anton Khirnov wrote:
> The Asus ExpertBook B9 laptop sends a WMI event when Fn+space is
> pressed. Since I could not find any information on what this combination
> is intended to do on this or any other Asus laptop, allocate a
> KEY_FN_SPACE keycode for it.
> 
> Signed-off-by: Anton Khirnov <anton@khirnov.net>

Thanks, patch looks good to me:

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

Regards,

Hans


> ---
>  include/uapi/linux/input-event-codes.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 3b2524e4b667..a49b0782fd8a 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -548,6 +548,7 @@
>  #define KEY_FN_S		0x1e3
>  #define KEY_FN_B		0x1e4
>  #define KEY_FN_RIGHT_SHIFT	0x1e5
> +#define KEY_FN_SPACE		0x1e6
>  
>  #define KEY_BRL_DOT1		0x1f1
>  #define KEY_BRL_DOT2		0x1f2


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9
  2025-07-14 15:07 ` [PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9 Anton Khirnov
@ 2025-07-15 12:27   ` Hans de Goede
  2025-08-27 15:29     ` [PATCH v3] " Anton Khirnov
  0 siblings, 1 reply; 13+ messages in thread
From: Hans de Goede @ 2025-07-15 12:27 UTC (permalink / raw)
  To: Anton Khirnov, Dmitry Torokhov, Corentin Chary, Luke D. Jones,
	Ilpo Järvinen
  Cc: linux-input, platform-driver-x86, linux-kernel

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 */


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
  2025-07-14 15:07 ` [PATCH v2 1/2] Input: allocate a keycode for Fn+space Anton Khirnov
  2025-07-15 12:26   ` Hans de Goede
@ 2025-08-07  7:04   ` Anton Khirnov
  2025-09-19  5:12   ` Dmitry Torokhov
  2 siblings, 0 replies; 13+ messages in thread
From: Anton Khirnov @ 2025-08-07  7:04 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: platform-driver-x86, linux-kernel, linux-input, Corentin Chary,
	Luke D. Jones, Hans de Goede, Ilpo Järvinen

Hi Dmitry,
could you please look at this?

Thanks,
-- 
Anton Khirnov

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3] platform/x86: asus-wmi: map more keys on ExpertBook B9
  2025-07-15 12:27   ` Hans de Goede
@ 2025-08-27 15:29     ` Anton Khirnov
  2025-08-28 16:18       ` Ilpo Järvinen
  0 siblings, 1 reply; 13+ messages in thread
From: Anton Khirnov @ 2025-08-27 15:29 UTC (permalink / raw)
  To: Hans de Goede, Corentin Chary, Luke D. Jones, Ilpo Järvinen
  Cc: Anton Khirnov, Dmitry Torokhov, linux-input, platform-driver-x86,
	linux-kernel

* 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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] platform/x86: asus-wmi: map more keys on ExpertBook B9
  2025-08-27 15:29     ` [PATCH v3] " Anton Khirnov
@ 2025-08-28 16:18       ` Ilpo Järvinen
  2025-08-31  9:21         ` Anton Khirnov
  0 siblings, 1 reply; 13+ messages in thread
From: Ilpo Järvinen @ 2025-08-28 16:18 UTC (permalink / raw)
  To: Anton Khirnov
  Cc: Hans de Goede, Corentin Chary, Luke D. Jones, Dmitry Torokhov,
	linux-input, platform-driver-x86, LKML

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 */
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] platform/x86: asus-wmi: map more keys on ExpertBook B9
  2025-08-28 16:18       ` Ilpo Järvinen
@ 2025-08-31  9:21         ` Anton Khirnov
  0 siblings, 0 replies; 13+ messages in thread
From: Anton Khirnov @ 2025-08-31  9:21 UTC (permalink / raw)
  To: Ilpo Järvinen
  Cc: Hans de Goede, Corentin Chary, Luke D. Jones, Dmitry Torokhov,
	linux-input, platform-driver-x86, LKML

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
  2025-07-14 15:07 ` [PATCH v2 1/2] Input: allocate a keycode for Fn+space Anton Khirnov
  2025-07-15 12:26   ` Hans de Goede
  2025-08-07  7:04   ` Anton Khirnov
@ 2025-09-19  5:12   ` Dmitry Torokhov
  2025-09-19  5:36     ` Mario Limonciello (AMD) (kernel.org)
  2025-09-19  7:23     ` Anton Khirnov
  2 siblings, 2 replies; 13+ messages in thread
From: Dmitry Torokhov @ 2025-09-19  5:12 UTC (permalink / raw)
  To: Anton Khirnov
  Cc: Corentin Chary, Luke D. Jones, Hans de Goede, Ilpo Järvinen,
	platform-driver-x86, linux-kernel, linux-input

Hi Anton,

On Mon, Jul 14, 2025 at 05:07:57PM +0200, Anton Khirnov wrote:
> The Asus ExpertBook B9 laptop sends a WMI event when Fn+space is
> pressed. Since I could not find any information on what this combination
> is intended to do on this or any other Asus laptop, allocate a
> KEY_FN_SPACE keycode for it.
> 
> Signed-off-by: Anton Khirnov <anton@khirnov.net>
> ---
>  include/uapi/linux/input-event-codes.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 3b2524e4b667..a49b0782fd8a 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -548,6 +548,7 @@
>  #define KEY_FN_S		0x1e3
>  #define KEY_FN_B		0x1e4
>  #define KEY_FN_RIGHT_SHIFT	0x1e5
> +#define KEY_FN_SPACE		0x1e6

I'd rather we did not add more codes with no defined meaning. I regret
that we have KEY_FN_* (with the exception of KEY_FN itself). Since
nobody knows what this key is supposed to do maybe map it to
KEY_RESERVED and whoever wants to use it can map it to a concrete key
code via udev?

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
  2025-09-19  5:12   ` Dmitry Torokhov
@ 2025-09-19  5:36     ` Mario Limonciello (AMD) (kernel.org)
  2025-09-19  7:32       ` Anton Khirnov
  2025-09-19  7:23     ` Anton Khirnov
  1 sibling, 1 reply; 13+ messages in thread
From: Mario Limonciello (AMD) (kernel.org) @ 2025-09-19  5:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Anton Khirnov
  Cc: Corentin Chary, Luke D. Jones, Hans de Goede, Ilpo Järvinen,
	platform-driver-x86, linux-kernel, linux-input



On 9/19/2025 12:12 AM, Dmitry Torokhov wrote:
> Hi Anton,
> 
> On Mon, Jul 14, 2025 at 05:07:57PM +0200, Anton Khirnov wrote:
>> The Asus ExpertBook B9 laptop sends a WMI event when Fn+space is
>> pressed. Since I could not find any information on what this combination
>> is intended to do on this or any other Asus laptop, allocate a
>> KEY_FN_SPACE keycode for it.
>>
>> Signed-off-by: Anton Khirnov <anton@khirnov.net>
>> ---
>>   include/uapi/linux/input-event-codes.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
>> index 3b2524e4b667..a49b0782fd8a 100644
>> --- a/include/uapi/linux/input-event-codes.h
>> +++ b/include/uapi/linux/input-event-codes.h
>> @@ -548,6 +548,7 @@
>>   #define KEY_FN_S		0x1e3
>>   #define KEY_FN_B		0x1e4
>>   #define KEY_FN_RIGHT_SHIFT	0x1e5
>> +#define KEY_FN_SPACE		0x1e6
> 
> I'd rather we did not add more codes with no defined meaning. I regret
> that we have KEY_FN_* (with the exception of KEY_FN itself). Since
> nobody knows what this key is supposed to do maybe map it to
> KEY_RESERVED and whoever wants to use it can map it to a concrete key
> code via udev?
> 
> Thanks.
> 

Any chance you can look at Windows and see what the key actually does 
when you have the matching OEM software installed?

I've seen a bunch of laptops that FN+SPACE turns on/off keyboard 
backlight.  Maybe that's what it does.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
  2025-09-19  5:12   ` Dmitry Torokhov
  2025-09-19  5:36     ` Mario Limonciello (AMD) (kernel.org)
@ 2025-09-19  7:23     ` Anton Khirnov
  1 sibling, 0 replies; 13+ messages in thread
From: Anton Khirnov @ 2025-09-19  7:23 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Corentin Chary, Luke D. Jones, Hans de Goede, Ilpo Järvinen,
	platform-driver-x86, linux-kernel, linux-input

Hi Dmitry,
Quoting Dmitry Torokhov (2025-09-19 07:12:38)
> Hi Anton,
> 
> On Mon, Jul 14, 2025 at 05:07:57PM +0200, Anton Khirnov wrote:
> > The Asus ExpertBook B9 laptop sends a WMI event when Fn+space is
> > pressed. Since I could not find any information on what this combination
> > is intended to do on this or any other Asus laptop, allocate a
> > KEY_FN_SPACE keycode for it.
> > 
> > Signed-off-by: Anton Khirnov <anton@khirnov.net>
> > ---
> >  include/uapi/linux/input-event-codes.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> > index 3b2524e4b667..a49b0782fd8a 100644
> > --- a/include/uapi/linux/input-event-codes.h
> > +++ b/include/uapi/linux/input-event-codes.h
> > @@ -548,6 +548,7 @@
> >  #define KEY_FN_S		0x1e3
> >  #define KEY_FN_B		0x1e4
> >  #define KEY_FN_RIGHT_SHIFT	0x1e5
> > +#define KEY_FN_SPACE		0x1e6
> 
> I'd rather we did not add more codes with no defined meaning. I regret
> that we have KEY_FN_* (with the exception of KEY_FN itself). Since
> nobody knows what this key is supposed to do maybe map it to
> KEY_RESERVED and whoever wants to use it can map it to a concrete key
> code via udev?

The problem with that approach is that on this laptop we have TWO keys
with unknown meanings - fn+space and fn+f (KEY_FN_F already exists).
Using KEY_RESERVED for one of them would be inconsistent then.

Could you elaborate on why are you against KEY_FN_* codes? I understand
they can be abused, but in some cases (such as this one) it genuinely
seems the least bad way to characterize a key.

Cheers,
-- 
Anton Khirnov

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
  2025-09-19  5:36     ` Mario Limonciello (AMD) (kernel.org)
@ 2025-09-19  7:32       ` Anton Khirnov
  0 siblings, 0 replies; 13+ messages in thread
From: Anton Khirnov @ 2025-09-19  7:32 UTC (permalink / raw)
  To: Mario Limonciello (AMD) (kernel.org)
  Cc: Dmitry Torokhov, Corentin Chary, Luke D. Jones, Hans de Goede,
	Ilpo Järvinen, platform-driver-x86, linux-kernel,
	linux-input

Hi Mario,
Quoting Mario Limonciello (AMD) (kernel.org) (2025-09-19 07:36:31)
> On 9/19/2025 12:12 AM, Dmitry Torokhov wrote:
> > Hi Anton,
> > 
> > On Mon, Jul 14, 2025 at 05:07:57PM +0200, Anton Khirnov wrote:
> >> The Asus ExpertBook B9 laptop sends a WMI event when Fn+space is
> >> pressed. Since I could not find any information on what this combination
> >> is intended to do on this or any other Asus laptop, allocate a
> >> KEY_FN_SPACE keycode for it.
> >>
> >> Signed-off-by: Anton Khirnov <anton@khirnov.net>
> >> ---
> >>   include/uapi/linux/input-event-codes.h | 1 +
> >>   1 file changed, 1 insertion(+)
> >>
> >> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> >> index 3b2524e4b667..a49b0782fd8a 100644
> >> --- a/include/uapi/linux/input-event-codes.h
> >> +++ b/include/uapi/linux/input-event-codes.h
> >> @@ -548,6 +548,7 @@
> >>   #define KEY_FN_S		0x1e3
> >>   #define KEY_FN_B		0x1e4
> >>   #define KEY_FN_RIGHT_SHIFT	0x1e5
> >> +#define KEY_FN_SPACE		0x1e6
> > 
> > I'd rather we did not add more codes with no defined meaning. I regret
> > that we have KEY_FN_* (with the exception of KEY_FN itself). Since
> > nobody knows what this key is supposed to do maybe map it to
> > KEY_RESERVED and whoever wants to use it can map it to a concrete key
> > code via udev?
> > 
> > Thanks.
> > 
> 
> Any chance you can look at Windows and see what the key actually does 
> when you have the matching OEM software installed?

Unfortunately I removed Windows from this machine right after buying it,
and reinstalling it would be too invasive. I did ask someone to test on
a different Asus laptop running Windows, the key did not seem to do
anything.

> I've seen a bunch of laptops that FN+SPACE turns on/off keyboard 
> backlight.  Maybe that's what it does.

Fn+F7 toggles keyboard backlight on this laptop, so probably not. I'm
willing to believe it's a leftover from older hardware where it did do
something and they just forgot to disable it.

Cheers,
-- 
Anton Khirnov

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-09-19  7:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-14 15:07 [PATCH v2 0/2] platform/x86: asus-wmi: map more keys on ExpertBook B9 Anton Khirnov
2025-07-14 15:07 ` [PATCH v2 1/2] Input: allocate a keycode for Fn+space Anton Khirnov
2025-07-15 12:26   ` Hans de Goede
2025-08-07  7:04   ` Anton Khirnov
2025-09-19  5:12   ` Dmitry Torokhov
2025-09-19  5:36     ` Mario Limonciello (AMD) (kernel.org)
2025-09-19  7:32       ` Anton Khirnov
2025-09-19  7:23     ` Anton Khirnov
2025-07-14 15:07 ` [PATCH v2 2/2] platform/x86: asus-wmi: map more keys on ExpertBook B9 Anton Khirnov
2025-07-15 12:27   ` Hans de Goede
2025-08-27 15:29     ` [PATCH v3] " Anton Khirnov
2025-08-28 16:18       ` Ilpo Järvinen
2025-08-31  9:21         ` Anton Khirnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox