The C# package which allows to control the backlight of your MSI keyboard!
If you have a notebook from MSI with steel series keyboard you can control your keyboard directly from code!
This package allows you to change the blinking mode and the color of the leds with programmer friendly way - using configuration builder and simply service which contains method to apply your created configuration.
My idea was to use this library to set the keyboard backlight depends of windows taskbar color.
I was inspired to create library by watching this video https://www.youtube.com/watch?v=z_ESTHVDSSQ.
My library use https://github.com/mikeobrien/HidLibrary package to get the handler to keyboard which allows me to write input data directly to device.
Currently the project is tested only on Windows operating system.
Feel free to send some feature requests!
v1.0.8
- Support for netstandard 2.1
- Upgrade dependencies
v1.0.7
- Added IsDeviceSupported check to IKeyboardService
v1.0.6
- Setting RGB value to each region
- Setting intensity level to each region (0-100)
v1.0.5
- Initial public release
public static async Task Main(string[] args)
{
var configuration = BacklightConfigurationBuilderFactory.Create()
.ForAllRegions(BlinkingMode.Normal)
.ForRegion(Region.Start, Color.Red, Intensity.High)
.ForRegion(Region.Center, Color.Green, Intensity.High)
.ForRegion(Region.End, Color.Blue, Intensity.High)
.Build();
var service = KeyboardServiceFactory.Create();
await service.ApplyConfigurationAsync(configuration);
}
public static async Task Main(string[] args)
{
var random = new Random();
var service = KeyboardServiceFactory.Create();
var configuration = BacklightConfigurationBuilderFactory.Create()
.ForAllRegions(color: System.Drawing.Color.Red, intensity: random.Next(0, 100))
.Build();
await service.ApplyConfigurationAsync(configuration);
}