From: Marcos Alano <marcoshalano@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] Add keycode to Dell G-Mode key
Date: Tue, 22 Apr 2025 10:49:09 -0300 [thread overview]
Message-ID: <c332518c-f997-49bd-a2cd-4612def52b81@gmail.com> (raw)
In-Reply-To: <20250419113132.36504-1-marcoshalano@gmail.com>
On 19/04/2025 08:31, Marcos Alano wrote:
> This key exists in some Alienware and Dell machines.
> On Windows it activates the performance mode.
>
I noticed just now the missing of a rationale about my patch. Sorry
about that.
This patch is part of a multiple stage plans to enable the G-Mode key on
Linux.
The most important part is this patch, that will define an exclusive key
code for the key.
There will be necessary a newer version for libevdev, specially the
Python support, using the newer headers with the key code I'm adding in
there.
Subsequently, I will update my change in systemd so the scan code for
this key, 0x68, returns `KEY_GMODE` (today is returning a very generic
key code).
Finally, I will release a simple Python code I developed that is
responsible for monitoring event devices, /dev/input/event* (since I
doubt that I have how to know what is the keyboard device).
When detect `KEY_GMODE` it will enable performance mode, and when press
again, it will disable.
Today I'm using D-Bus to call power-profiles-daemon, but the idea in the
future, with a quite set in stone key code, any user-space tool, like
power-profiles-daemon, can use and manage the key by themselves.
Please let me know about any doubts or considerations.
> Signed-off-by: Marcos Alano <marcoshalano@gmail.com>
> ---
> include/uapi/linux/input-event-codes.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 5a199f3d4a26..85c6a612ee84 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -765,6 +765,9 @@
> #define KEY_KBD_LCD_MENU4 0x2bb
> #define KEY_KBD_LCD_MENU5 0x2bc
>
> +/* G-Mode key present in some Alienware and Dell machines */
> +#define KEY_GMODE 0x2bd
> +
> #define BTN_TRIGGER_HAPPY 0x2c0
> #define BTN_TRIGGER_HAPPY1 0x2c0
> #define BTN_TRIGGER_HAPPY2 0x2c1
--
Marcos Alano
next prev parent reply other threads:[~2025-04-22 13:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-19 11:31 [PATCH] Add keycode to Dell G-Mode key Marcos Alano
2025-04-22 13:49 ` Marcos Alano [this message]
2025-04-29 1:44 ` Dmitry Torokhov
2025-04-29 10:28 ` Marcos Alano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c332518c-f997-49bd-a2cd-4612def52b81@gmail.com \
--to=marcoshalano@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).