Hi!
You submit a proposal.I had some thoughts on how the current userspace api could be expanded toThere are however some known short comings:Sooner or later, we'll need to support these keyboards.
- The sysfs leds interface does only allow to write one key at a time. The
controller however can only update row wise or the whole keyboard at once
(whole keyboard update is currently not implemented). This means that even
when you want to updated a whole row, the whole row is actually updated
once for each key. So you actually write up to 18x as much as would be
required.
- When you want to update the brightness of the whole keyboard you have to
write 126 sysfs entries, which inherently is somewhat slow, especially when
using a slider that is live updating the brightness.
- While the controller manages up to 126 leds, not all are actually
populated. However the unused are not grouped at the end but also in
between. To not have dead sysfs entries, this would require manual testing
for each implemented device to see which leds are used and some kind of
bitmap in the driver to sort out the unconnected ones.
- It is not communicated to userspace which led entry controls which key
exactly
But this has way too many shortcomings (and we'd be stuck with the
interface forever).
better reflect the capabilities of RGB keyboards. What would be required for
such an expansion to be considered?
I'm in contact with the KDE folks. Plasma already has a keyboard brightnessYep, there's definitely interest.
slider, that soon
https://gitlab.freedesktop.org/upower/upower/-/merge_requests/203 will work
with multiple kbd_backlight. However the slowness of 126 sysfs entries makes
it a little bit janky still.
They are also thinking about expanding desktop accent colors to the keyboard
backlight when it supports RGB.
I have not reached out to the OpenRGB project yet, but is it alive and well
and under constant development: https://gitlab.com/CalcProgrammer1/OpenRGB.
Afaik it is currently a userspace only driver interacting directly with
hidraw mostly and has not yet implemented the sysfs leds interface.
Just listing this to show that there is definitely interest in this.
Yes, I know displays are a bit different from RGB LEDs. Gamma isThese days, displays with weird shapes are common. Like roundedI'm not sure if I can follow you here. Where would this be implemented? Also
corners and holes in them. Perhaps this should be better modelled as a
weird display?
I asume displays asume equal distance between pixels and that columns are
straight lines perpendicular to rows, which the key backlights have and are
not.
another issue. Yes, it is quite weird display. But 6x22 display may be
better approximation of keyboard than ... 126 unrelated files.
Or you could do 6x66 sparse display, I guess, to express the
shifts. But I believe 6x22 would be better.
It would go to drivers/auxdisplay, most probably.
I checked
https://www.tuxedocomputers.com/en/Linux-Hardware/Zubehoer-USB-Co./USB-Zubehoer.tuxedo
, but you don't seem to have stand-alone keyboard with such RGB capability...?
Best regards,
Pavel