ChickenStorm / roccat-vulcan-api-rs

Roccat Vulcan keyboard illumination API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

roccat-vulcan-api-rs

license Build codecov

Roccat Vulcan keyboard illumination API.
A fast multiplatform API to control Roccat Vulcan illumination.

Provide an API to control the lighting of the Roccat Vulcan 100 and 120.

Usage

add on your dependencies of Cargo.toml roccat-vulcan-api-rs = { version = "0.2.1", git = "https://github.com/ChickenStorm/roccat-vulcan-api-rs", branch = "main" }.

The main way to interact with the API is through [KeyboardApi]. Note that when the structure is dropped the keyboard will go back to the default rainbow behavior.

Layout

For the moment only Swiss French layout is supported. To support other layout implement the trait [Layout].

Examples

To load and initialized a keyboard use

use std::{thread::sleep, time::Duration};
use roccat_vulcan_api_rs::{ColorBuffer, ColorRgb, ErrorRoccatVulcanApi, KeyboardApi};

# fn main() -> Result<(), ErrorRoccatVulcanApi> {
# #[cfg(not(feature = "no-keyboard-test"))]
# {
let keyboard = KeyboardApi::new()?;
let buffer = ColorBuffer::from_element(ColorRgb::new(255, 255, 255));
keyboard.render(&buffer)?;
sleep(Duration::from_secs(1));
# }
# Ok(())
# }

About

Roccat Vulcan keyboard illumination API

License:MIT License


Languages

Language:Rust 100.0%