Skip to content

ChickenStorm/roccat-vulcan-api-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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(())
# }