Bnyro activity https://gitlab.com/Bnyro 2025-11-03T10:47:40Z tag:gitlab.com,2025-11-03:4773139597 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-11-03T10:47:40Z Bnyro Bnyro

Bnyro (665069d9) at 03 Nov 10:47

Add support for Lenovo Legion K510 keyboard

... and 4 more commits

tag:gitlab.com,2025-11-03:4773137103 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-11-03T10:47:03Z Bnyro Bnyro

Bnyro (81cd97f9) at 03 Nov 10:47

Add support for Lenovo Legion K510 keyboard

tag:gitlab.com,2025-11-03:4773104070 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-11-03T10:39:28Z Bnyro Bnyro

Yes, the mode is persisted. So I'll revert it to mode specific.

tag:gitlab.com,2025-10-30:4763058273 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-30T13:31:45Z Bnyro Bnyro

Currently, the information whether a mode supports UP/DOWN or LEFT/RIGHT is only known in the modes vec in LenovoK510_RGBController.

If we now want to set the current_mode.direction here, we would need that information either

  • from the modes vec in LenovoK510_RGBController, so we'd need to pass the modes vec to this method here (which we likely don't want to keep separation between the Controller´ and RGBController`
  • or hard code for each mode whether it supports UP/DOWN or LEFT/RIGHT a second time, so this would be duplicated information because it's already defined in RGBController so it'd perhaps make this code harder to maintain (at least from my experience).

Since I like neither of the options, I chose to let RGBController handle this, but if you prefer one of the other options I'm okay with changing the code :)

tag:gitlab.com,2025-10-30:4763032510 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-30T13:25:55Z Bnyro Bnyro

I agree, the previous solution was a bit hacky 👍

tag:gitlab.com,2025-10-30:4763030801 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-30T13:25:29Z Bnyro Bnyro

If that changes something in this discussion:

There's a keyboard shortcut to change the mode, and if you use that all modes also use the color you selected previously in a different mode. That means that the color is really stored per LED block (i.e. the keyboard) and not per animation mode.

tag:gitlab.com,2025-10-29:4760234950 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-29T19:24:08Z Bnyro Bnyro

Good idea, done.

Since our hidapi_write call always has to include the current mode and all other data as well (i.e. we can't send a call that specifically only modifies the color), I assume it's okay to just call DeviceUpdateMode from DeviceUpdateLEDs here as it's the same code that needs to be executed anyways?

tag:gitlab.com,2025-10-29:4760227009 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-10-29T19:22:12Z Bnyro Bnyro

Bnyro (a8cc10be) at 29 Oct 19:22

Add support for Lenovo Legion K510 keyboard

... and 7 more commits

tag:gitlab.com,2025-10-29:4760170750 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-10-29T19:02:15Z Bnyro Bnyro

Bnyro (bb057990) at 29 Oct 19:02

Add support for Lenovo Legion K510 keyboard

tag:gitlab.com,2025-10-29:4760168924 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-29T19:01:41Z Bnyro Bnyro

That's what it looks like if no color is set (it's not animated): 0aqtdpmsurdmvnj2qnc9r07qvwa8sr402948

Otherwise, if a color is set, the whole keyboard is in that one color as you would expect from a static mode.

Possibly we could just make this a completely separate mode, but that would also make the code much more complicated.

tag:gitlab.com,2025-10-29:4759642882 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-10-29T16:17:44Z Bnyro Bnyro

Bnyro (2dbd34b0) at 29 Oct 16:17

Add support for Lenovo Legion K510 keyboard

... and 3 more commits

tag:gitlab.com,2025-10-29:4759639343 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-29T16:16:53Z Bnyro Bnyro

This feels a bit ugly now because we have to iterate over all modes to find the one that's selected and to update its values, but should work fine overall.

Possibly that's also because I've no experience with C++ yet, so perhaps there's a simpler way to accomplish that.

tag:gitlab.com,2025-10-29:4759632698 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-10-29T16:15:15Z Bnyro Bnyro

Bnyro (2d5f790e) at 29 Oct 16:15

Add support for Lenovo Legion K510 keyboard

tag:gitlab.com,2025-10-29:4757929938 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-29T09:39:19Z Bnyro Bnyro

It was, yes. I've applied your suggestion.

tag:gitlab.com,2025-10-29:4757924085 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-10-29T09:38:01Z Bnyro Bnyro

Bnyro (b9ac3220) at 29 Oct 09:38

Add support for Lenovo Legion K510 keyboard

... and 3 more commits

tag:gitlab.com,2025-10-29:4757921822 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-10-29T09:37:32Z Bnyro Bnyro

Bnyro (4a045a39) at 29 Oct 09:37

Add support for Lenovo Legion K510 keyboard

tag:gitlab.com,2025-10-29:4757755759 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-29T09:05:51Z Bnyro Bnyro

It returns all information about the current mode (e.g. its color and speed), but I didn't know how to set them in RGBController from this point without creating a custom data type that contains all the information so that we can return it in this method and RGBController can pick it up to update the modes.

tag:gitlab.com,2025-10-29:4757744916 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-10-29T09:03:10Z Bnyro Bnyro

Bnyro (b0f48802) at 29 Oct 09:03

Add support for Lenovo Legion K510 keyboard

... and 3 more commits

tag:gitlab.com,2025-10-29:4757738879 Bnyro pushed to project branch lenovok510 at Bnyro / OpenRGB 2025-10-29T09:01:58Z Bnyro Bnyro

Bnyro (e06d4578) at 29 Oct 09:01

Add support for Lenovo Legion K510 keyboard

tag:gitlab.com,2025-10-29:4757727207 Bnyro commented on merge request !3045 at Adam Honse / OpenRGB 2025-10-29T08:59:21Z Bnyro Bnyro

Whoops, my bad