All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] input: Add new keyboard backlight control keys to match modern notebooks
@ 2023-05-30 11:05 Werner Sembach
  2023-05-30 13:33 ` Bastien Nocera
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Werner Sembach @ 2023-05-30 11:05 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Werner Sembach, linux-input, linux-kernel

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>
---
 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
-- 
2.34.1


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

end of thread, other threads:[~2023-05-31 14:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 11:05 [PATCH] input: Add new keyboard backlight control keys to match modern notebooks Werner Sembach
2023-05-30 13:33 ` Bastien Nocera
2023-05-30 14:28   ` Werner Sembach
2023-05-30 14:49     ` Werner Sembach
2023-05-30 15:30 ` Werner Sembach
2023-05-31 13:52 ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.