[PATCH v2 1/2] Input: allocate a keycode for Fn+space

Anton Khirnov posted 2 patches 2 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 1/2] Input: allocate a keycode for Fn+space
Posted by Anton Khirnov 2 months, 3 weeks ago
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
Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
Posted by Dmitry Torokhov 2 weeks, 3 days ago
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
Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
Posted by Mario Limonciello (AMD) (kernel.org) 2 weeks, 3 days ago

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.
Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
Posted by Anton Khirnov 2 weeks, 3 days ago
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
Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
Posted by Anton Khirnov 2 months ago
Hi Dmitry,
could you please look at this?

Thanks,
-- 
Anton Khirnov
Re: [PATCH v2 1/2] Input: allocate a keycode for Fn+space
Posted by Hans de Goede 2 months, 3 weeks ago
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