Crates.io | thinkpad-backlight-api |
lib.rs | thinkpad-backlight-api |
version | 0.1.0 |
source | src |
created_at | 2024-12-29 03:35:28.504506+00 |
updated_at | 2024-12-29 03:35:28.504506+00 |
description | Keyboard backlight API for thinkpad |
homepage | https://github.com/vlad2030/thinkpad-backlight-api |
repository | https://github.com/vlad2030/thinkpad-backlight-api |
max_upload_size | |
id | 1497930 |
size | 16,099 |
Keyboard backlight API for thinkpad. Implemented on Rust
Add this to your Cargo.toml
:
thinkpad-backlight-api = "0.1.0"
use thinkpad_backlight_api::{KeyboardBacklight, LightLevel};
fn main() {
if let Err(e) = KeyboardBacklight::set(LightLevel::Full) {
println!("Error: {:?}", e)
}
match KeyboardBacklight::get() {
Ok(level) => println!("Level: {:?}", level),
Err(e) => println!("Error: {:?}", e),
}
}