Crate roccat_vulcan_api_rs[−][src]
Expand description
roccat-vulcan-api-rs
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}; let keyboard = KeyboardApi::new()?; let buffer = ColorBuffer::from_element(ColorRgb::new(255, 255, 255)); keyboard.render(&buffer)?; sleep(Duration::from_secs(1));
Structs
ColorBuffer | Encode the set of color for |
ColorRgb | RGB color representation |
ColorRgba | Color with alpha parameter |
HidInterfaceFilter | Basic HID interface filter with a product id and an interface number. |
Hue | Color hue. Gauranties that the value is between 0 and 1. |
KeyCode | structur of data to incode the key when a key press is read form hid device. |
KeyInfo | associative data for a key. |
KeyLight | Code for key light. This represent the key position in the buffer |
KeyPress | Key press event from the read device. |
KeyboardApi | Main API |
KeyboardIntrefacesFilter | liste the filter for the differents devices used by |
LayoutFrCh | Swiss French Layout |
Position | Represent the position of a key |
Saturation | Color saturation, gauranties that the value is between 0 and 1. |
Enums
ErrorRoccatVulcanApi | Error returned by the API |
KeyName | Liste of keys. Some key might be missing. |
Constants
NUMBER_KEY_LED_BUFFER | Size of the |
Traits
Layout | Defines a Keyboard layout |
Type Definitions
Value | Color value (also called brigthness). Gauranties that the value is between 0 and 1. |