https://github.com/errornointernet/msi-klc
MSI SteelSeries Keyboard Light Controller
https://github.com/errornointernet/msi-klc
backlight keyboard laptop msi rgb steelseries
Last synced: about 2 months ago
JSON representation
MSI SteelSeries Keyboard Light Controller
- Host: GitHub
- URL: https://github.com/errornointernet/msi-klc
- Owner: ErrorNoInternet
- License: gpl-3.0
- Created: 2022-09-25T04:24:08.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-06T09:13:18.000Z (about 2 years ago)
- Last Synced: 2024-11-30T09:20:20.410Z (11 months ago)
- Topics: backlight, keyboard, laptop, msi, rgb, steelseries
- Language: Rust
- Homepage:
- Size: 142 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# msi-klc
[](https://crates.io/crates/msi-klc)
[](https://docs.rs/msi-klc/latest/msi_klc)A tool/library that allows you to control the backlight of your MSI SteelSeries laptop keyboard.\
Supports 3 regions, 8 predefined colors, RGB colors, and custom animations (CLI only).### Tested Devices
#### Linux
- [x] MSI GE60 2PE## Installation
### Compiling
- Requirements
- Rust (cargo)
- hidapiNote: This project uses the libusb backend of hidapi as there are issues when using hidraw.
#### Manual compilation
```sh
git clone https://github.com/ErrorNoInternet/msi-klc
cd msi-klc
cargo build --release
sudo cp target/release/msi-klc /usr/local/bin
```#### Using cargo
```sh
cargo install msi-klc
```## Usage
Make sure to run with root privileges (sudo) if you don't have the appropriate udev rules.### CLI
```sh
# make the entire keyboard blue
msi-klc set --color blue# make the left side of the keyboard red
msi-klc set --color red --region left# turn off all the LEDs on the keyboard
msi-klc off# ...and turn them back on
msi-klc reset# make the keyboard cyan
msi-klc set --color "#0fffaf" --mode rgb# make only the left side cyan
msi-klc off && msi-klc set --color "#0fffaf" --mode rgb --region left# load an animation
msi-klc load animations/breathe.txt
```### Library
```rust
use msi_klc::*;fn main() {
let mut keyboard = Keyboard::new().unwrap();
// make the keyboard blue
keyboard
.set_color(&KeyboardLightData::new(
&Region::All,
&Color::Blue,
&Brightness::Medium,
))
.unwrap();
keyboard
.set_mode(&KeyboardModeData::new(&Mode::Normal))
.unwrap();// set a custom RGB color on the right side of the keyboard
keyboard
.set_rgb_color(&KeyboardRGBLightData::new(
&Region::Right,
&(255, 80, 80),
))
.unwrap();
}
```