linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Input: Add key event code for Fn + P
@ 2025-08-02 21:21 edip
  2025-08-15 14:49 ` Edip Hazuri
  0 siblings, 1 reply; 2+ messages in thread
From: edip @ 2025-08-02 21:21 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: jikos, bentiss, linux-input, linux-kernel, Edip Hazuri

From: Edip Hazuri <edip@medip.dev>

Newer Victus (and probably newer omen) laptops contains a "Fn + P"
Shortcut. This is intended to use with Omen Gaming Hub, Which is
changing the performance profile when this shortcut triggered. This
shortcut is shown on performance control page, see [1]

Currently there is no key definition to handle this. So add a KEY_FN_P
keycode define to be able to use this shortcut.

[1]: https://jpcdn.it/img/adadf6c927ffeb75afd8038f95db400a.png

Signed-off-by: Edip Hazuri <edip@medip.dev>
---
 drivers/hid/hid-debug.c                | 2 +-
 include/uapi/linux/input-event-codes.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 4424c0512ba..2bcf7b24801 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -3342,7 +3342,7 @@ static const char *keys[KEY_MAX + 1] = {
 	[KEY_FN_1] = "Fn+1",			[KEY_FN_2] = "Fn+2",
 	[KEY_FN_B] = "Fn+B",			[KEY_FN_D] = "Fn+D",
 	[KEY_FN_E] = "Fn+E",			[KEY_FN_F] = "Fn+F",
-	[KEY_FN_S] = "Fn+S",
+	[KEY_FN_S] = "Fn+S",			[KEY_FN_P] = "Fn+P",
 	[KEY_FN_F1] = "Fn+F1",			[KEY_FN_F2] = "Fn+F2",
 	[KEY_FN_F3] = "Fn+F3",			[KEY_FN_F4] = "Fn+F4",
 	[KEY_FN_F5] = "Fn+F5",			[KEY_FN_F6] = "Fn+F6",
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 3b2524e4b66..2fc79b32425 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_P		0x1e6
 
 #define KEY_BRL_DOT1		0x1f1
 #define KEY_BRL_DOT2		0x1f2
-- 
2.50.1


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

* Re: [PATCH 1/2] Input: Add key event code for Fn + P
  2025-08-02 21:21 [PATCH 1/2] Input: Add key event code for Fn + P edip
@ 2025-08-15 14:49 ` Edip Hazuri
  0 siblings, 0 replies; 2+ messages in thread
From: Edip Hazuri @ 2025-08-15 14:49 UTC (permalink / raw)
  To: dmitry.torokhov, jikos; +Cc: bentiss, linux-input, linux-kernel, Edip Hazuri

On Sunday, August 3, 2025 12:21:50 AM GMT+03:00 edip@medip.dev wrote:
> From: Edip Hazuri <edip@medip.dev>
> 
> Newer Victus (and probably newer omen) laptops contains a "Fn + P"
> Shortcut. This is intended to use with Omen Gaming Hub, Which is
> changing the performance profile when this shortcut triggered. This
> shortcut is shown on performance control page, see [1]
> 
> Currently there is no key definition to handle this. So add a KEY_FN_P
> keycode define to be able to use this shortcut.
> 
> [1]: https://jpcdn.it/img/adadf6c927ffeb75afd8038f95db400a.png
> 
> Signed-off-by: Edip Hazuri <edip@medip.dev>
> ---
>  drivers/hid/hid-debug.c                | 2 +-
>  include/uapi/linux/input-event-codes.h | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
> index 4424c0512ba..2bcf7b24801 100644
> --- a/drivers/hid/hid-debug.c
> +++ b/drivers/hid/hid-debug.c
> @@ -3342,7 +3342,7 @@ static const char *keys[KEY_MAX + 1] = {
>  	[KEY_FN_1] = "Fn+1",			[KEY_FN_2] = 
"Fn+2",
>  	[KEY_FN_B] = "Fn+B",			[KEY_FN_D] = "Fn+D",
>  	[KEY_FN_E] = "Fn+E",			[KEY_FN_F] = 
"Fn+F",
> -	[KEY_FN_S] = "Fn+S",
> +	[KEY_FN_S] = "Fn+S",			[KEY_FN_P] = "Fn+P",
>  	[KEY_FN_F1] = "Fn+F1",			[KEY_FN_F2] = 
"Fn+F2",
>  	[KEY_FN_F3] = "Fn+F3",			[KEY_FN_F4] = 
"Fn+F4",
>  	[KEY_FN_F5] = "Fn+F5",			[KEY_FN_F6] = 
"Fn+F6",
> diff --git a/include/uapi/linux/input-event-codes.h
> b/include/uapi/linux/input-event-codes.h index 3b2524e4b66..2fc79b32425
> 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_P		0x1e6
> 
>  #define KEY_BRL_DOT1		0x1f1
>  #define KEY_BRL_DOT2		0x1f2

Hello,

Please don't merge this. I made a v2 of this patch and this is no longer 
needed. 

Thanks!




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

end of thread, other threads:[~2025-08-15 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-02 21:21 [PATCH 1/2] Input: Add key event code for Fn + P edip
2025-08-15 14:49 ` Edip Hazuri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).