Closed motabass closed 1 year ago
@RobertBeekman Hi. I`m curious how detected devices are mapped to a certain layout xml. Is it just comparing the Name attribute in the XML with the device name returned by RGB.NET or OpenRGB? Or is there more to it?
Hi,
Artemis doesn't use the name tag of the XML currently, you can use that to give the device a more user friendly name, if Artemis ever uses it it would only be in the UI.
Which file to load is based on the model reported by RGB.NET, with special characters replaced by a -
Thanks for pointing this out.
It seems that with the current approach there has to be a layout file for every "variant" RGB.NET or OpenRGB detects. For example The G903 has to have 4 identical layouts for "G900, G903, G903 Lightspeed" reported by RGB.NET and an extra one for OpenRGB which reports "G903 Wired-Wireless Gaming Mouse".
Would it be possible to have for example only one layout file and declare aliases/reported names in the xml itself or in some extra file?
Device providers can override this behaviour so if these are all the same we can make the Logitech plugin treat it all as one. An example of that is here in Corsair
If you're not comfortable making the change I can do that for you, just give me the exact names and their 'main' name and I'll get it done :)
Well I'm a real noob in C# ;)
If you check the pull-request you get a good overview of the names because i created all possible for G903 in it
For G903 it would really be "G903", "G903 Lightspeed" and "G903 Wired-Wireless Gaming Mouse". G900 really is another model but has the same layout also.
The same is true for GXXX and GXXX HERO models. HERO models are just updated models with a new sensor but share the same layout.
Same for G403 and G703 which also share the same layout but one being wired the other wireless
btw: Thanks for your awesome work on this Project. It's by far the best RGB solution out of many
Everything in this pull-request is about aligning the layout files to the current behavior, consulting duplicate layout images and layouts, fixing file names.
I hope i've not put too many changes into this one;)
Dear @motabass, keep this greate Pull request proposal. You are in the right direction.
Hi. Since the last update of RGB.NET my G915 TKL is now detected correctly via the logitech device plugin ;)
But i saw that controlling the media-key leds is not working at all strangely. Any Ideas why this could be?
Those keys are not available to control through the Logitech SDK.
Are you sure?
With the OpenRGB plugin it works just fine. Also with every other RGB Software i have tried as well as Logitech G HUB itself. Or aren't they using the Logitech SDK?
It works with OpenRGB because OpenRGB doesn't use the Logitech SDK. LGHUB itself controls it directly, "every other software" is what, signal? That doesn't use the SDK, either.
OK. Thanks for making this clear. So if Logitech doesn't decide to add it in we won't be able to have it work through RGB.NET right?
Thanks, @motabass. My vote to approve ASAP.
@diogotr7 Hi. I was searching around for a solution and was asking myself if it would be possible to force the Logitech SDK into changing the media key LEDs by just passing the right "code" to either one the functions provided. ...Even though it is documented nowhere? (LogiLedSetLightingForKeyWithScanCode, LogiLedSetLightingForKeyWithHidCode, LogiLedSetLightingForKeyWithQuartzCode)
OpenRGB seems to have the codes in their matrix: https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/Controllers/LogitechController/RGBController_LogitechG915.cpp
Maybe it's possible to just send the correct media key scan code listed at the end of this file: https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2
I also tried to contact Logitech Dev-Support and asked for an example. Let's see if they even answer.
I wasted far too much time trying to get it to work, I tried all those methods you suggested with every keycode I could.
If somehow I'm wrong and logitech dev support points you in the right direction then we can look into the issue.
I'm going to merge this one as-is without making the changes to layout selection. I don't really want to mess with that right now since it could potentially break other people's layouts.
When the workshop is ready file-based layouts will mostly become obsolete anyway (although they'll stay supported)
Thanks!
Thank you.
@diogotr7 I see. You already went through the pain. I will let you know if Logitech writes back.
@RobertBeekman Hi. I`m curious how detected devices are mapped to a certain layout xml. Is it just comparing the Name attribute in the XML with the device name returned by RGB.NET or OpenRGB? Or is there more to it?