mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Werner Sembach <wse@tuxedocomputers.com>
To: Bastien Nocera <hadess@hadess.net>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: Add new keyboard backlight control keys to match modern notebooks
Date: Tue, 30 May 2023 16:28:51 +0200	[thread overview]
Message-ID: <44574d05-3a2a-2249-b808-7e929feea36d@tuxedocomputers.com> (raw)
In-Reply-To: <d4d6eb1da42de6536e708331100fc33e9cfae140.camel@hadess.net>

Hi,

Am 30.05.23 um 15:33 schrieb Bastien Nocera:
> On Tue, 2023-05-30 at 13:05 +0200, Werner Sembach wrote:
>> The old three KEY_KBDILLUM* keycodes don't reflect the current
>> situation
>> modern notebooks anymore. Especially the ones with RGB keyboards.
>>
>> e.g.
>> - Clevo NL50NU has a toggle, an up, a down and a color-cycle key
>> - TongFang PH4ARX1 doesn't have a toggle key, but one that cycles
>> through
>>    off, half-brightness, and full-brightness.
>>
>> Also, on some devices these keys are already implemented in firmware.
>> It
>> would still be nice if there is a way to let userspace know when one
>> of
>> these keys is pressed to display the OSD, but don't advice it to
>> actually
>> do anything. This is the intended purpose of the KEY_KBDILLUMCHANGE
>> define.
>>
>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> Can you please point to the user-space patches (or issues filed) that
> would integrate the support for those keycodes, and make the key
> presses do something?

I'm sorry to say that these don't exist yet. So I guess the process is similar 
to DRM uAPI additions? 
https://docs.kernel.org/gpu/drm-uapi.html#open-source-userspace-requirements

>
> Has anyone tested that those keycodes are fit for purpose when mixed
> with other brightness changes that don't happen through key presses?

Color control is not yet implemented in any DE afaik, so there is not yet a 
collision with the color cycle key.

For the brightness cycle key, I would assume that it functions the same as the 
brightness up key unless brightness == brightness max. In this case it sets 
brightness to 0. I don't see a logical collision here as brightness up and 
brightness down are already implemented just fine in most DEs

>
>> ---
>>   include/uapi/linux/input-event-codes.h | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/include/uapi/linux/input-event-codes.h
>> b/include/uapi/linux/input-event-codes.h
>> index 022a520e31fc2..05287bf9a77f7 100644
>> --- a/include/uapi/linux/input-event-codes.h
>> +++ b/include/uapi/linux/input-event-codes.h
>> @@ -803,6 +803,10 @@
>>   #define BTN_TRIGGER_HAPPY39            0x2e6
>>   #define BTN_TRIGGER_HAPPY40            0x2e7
>>   
>> +#define KEY_KBDILLUMCYCLE              0x2e8
>> +#define KEY_KBDILLUMCOLORCYCLE         0x2e9
>> +#define KEY_KBDILLUMCHANGE             0x2ea
>> +
>>   /* We avoid low common keys in module aliases so they don't get
>> huge. */
>>   #define KEY_MIN_INTERESTING    KEY_MUTE
>>   #define KEY_MAX                        0x2ff

  reply	other threads:[~2023-05-30 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 11:05 Werner Sembach
2023-05-30 13:33 ` Bastien Nocera
2023-05-30 14:28   ` Werner Sembach [this message]
2023-05-30 14:49     ` Werner Sembach
2023-05-30 15:30 ` Werner Sembach
2023-05-31 13:52 ` Hans de Goede

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=44574d05-3a2a-2249-b808-7e929feea36d@tuxedocomputers.com \
    --to=wse@tuxedocomputers.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hadess@hadess.net \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®