SGK3LEDAPI 1.0.0

dotnet add package SGK3LEDAPI --version 1.0.0
NuGet\Install-Package SGK3LEDAPI -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SGK3LEDAPI" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SGK3LEDAPI --version 1.0.0
#r "nuget: SGK3LEDAPI, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SGK3LEDAPI as a Cake Addin
#addin nuget:?package=SGK3LEDAPI&version=1.0.0

// Install SGK3LEDAPI as a Cake Tool
#tool nuget:?package=SGK3LEDAPI&version=1.0.0

About

This library is a C# API that allows controlling the LEDs in the Sharkoon Skiller Mech SGK3 keyboard. You can set the color of each key, as well as control the brightness. It was created by listening to communication made by the official software for this keyboard.

Usage

using SGK3LEDAPI;

// Initialize before you use any SGK3LEDAPI functionality
// To make sure it works, set they keyboard to the 1st customization profile.
await DeviceDiscoveryManager.AutoInitialize();

// Set color of keys
await KeyManager.SetKeyColor(Key.Enter, Color.Blue);
await KeyManager.SetKeyColor(Key.Space, Color.DarkRed);

// Set brightness level of the board, from range 0-5
await BrightnessManager.SetBrightnessLevel(5);

// Dispose of they keyboard when no longer needed
DeviceDiscoveryManager.DisposeDevice();

Limitations

Unfortunately, you will not be able to create custom animated effects. The keyboard was not designed with this in mind, as it causes a short flash with every key change. Additionally, updating every key on the board takes quite a bit of time. Tested only on Windows.

Credits

Venom668/sgk3rgb - This project was very useful in figuring out the method, but my key codes (as well as some constant byte values) were different. There might be some hardware differences between the keyboards.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 156 12/29/2022