![](https://static.wixstatic.com/media/11062b_6a134fc09ea34833a17d295e295ab517f000.jpg/v1/fill/w_1920,h_1080,al_c,q_90,enc_avif,quality_auto/11062b_6a134fc09ea34833a17d295e295ab517f000.jpg)
Desktop Swap
Logitech LED SDK + C#
As a side project, I wanted to make an application that took advantage of my G-keys on my Logitech keyboard. With so much potential packed into one key-press, I set out to make an application that could change my desktop theme at the push of a button. Below you can see that there are 9 G-keys and I've assigned each one its own theme.
![IMG_5170.JPG](https://static.wixstatic.com/media/9234e2_cc1743c293214a319b19bdb12547f6b1~mv2_d_2448_3264_s_4_2.jpg/v1/crop/x_0,y_0,w_2448,h_2353/fill/w_339,h_323,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/IMG_5170_JPG.jpg)
I setup the keys to remain the same color by setting them individually from the rest of the keyboard using Logitech's LED SDK commands:
![changekb.png](https://static.wixstatic.com/media/9234e2_2dfe01990607428f9965b0b0338c4ae5~mv2.png/v1/fill/w_585,h_263,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/changekb.png)
While the SDK I was using was in C++, I wanted to make a quick C# application that could call run it while handling some .NET work. I also found that there is C# integration with the program and that you can call these C++ commands with some wrappers that come with the SDK.
![ezgif.com-video-to-gif (2).gif](https://static.wixstatic.com/media/9234e2_2bb0067e80494ce6acebbf00aa4d2dcc~mv2.gif)
After a few days of tweaking and nailing down all of the files I needed, I got something that looks pretty good.
The visualizer for music is part of Rainmeter which is a free software for customizing your desktop. I used Rainmeter and a visualizer I found online to change the settings variables from my application.
To get everything running, I made some batch files that would run the programs I needed while refreshing Rainmeter after changes are made. I also needed batch files to run the application when a G-key was pressed. Luckily it's very easy to change the functionality of these keys through the Logitech Software GUI.
![logitechgui.png](https://static.wixstatic.com/media/9234e2_079bc54e2bf148d3a99ac605e4b56810~mv2.png/v1/fill/w_703,h_523,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/logitechgui.png)
It was fun to make an application that had real world value to me and I'm happy it wasn't too difficult to put all the pieces together.
Just for fun, I've bundled the application here for anyone running Logitech software or if you simply want to see how I made it.
There's an added ReadMe and Config file to get the application working:
![IMG_5171.JPG](https://static.wixstatic.com/media/9234e2_1627898071f24725988cec55bd3a6c3a~mv2_d_3264_2448_s_4_2.jpg/v1/fill/w_504,h_378,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/IMG_5171_JPG.jpg)
![IMG_5172.JPG](https://static.wixstatic.com/media/9234e2_2ed2f45cd329455ba17b365ffb5d48ac~mv2_d_3264_2448_s_4_2.jpg/v1/crop/x_0,y_9,w_3264,h_2430/fill/w_407,h_303,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/IMG_5172_JPG.jpg)
![IMG_5173.JPG](https://static.wixstatic.com/media/9234e2_42b013b49f2c496596d4deed1fcca318~mv2_d_3264_2448_s_4_2.jpg/v1/crop/x_0,y_12,w_3264,h_2424/fill/w_416,h_309,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/IMG_5173_JPG.jpg)