| Crates.io | dygma_focus |
| lib.rs | dygma_focus |
| version | 0.5.1 |
| created_at | 2023-12-22 19:42:35.516256+00 |
| updated_at | 2025-03-07 17:24:03.941034+00 |
| description | Dygma focus api, for use with dygma keyboards |
| homepage | |
| repository | https://github.com/mbwilding/dygma-focus |
| max_upload_size | |
| id | 1078627 |
| size | 228,666 |
This crate is a Rust implementation of the Dygma Focus API.
Make sure to not have Bazecor running and connected while trying to communicate with your keyboard.
Cargo.toml
[dependencies]
dygma_focus = "0.5"
src/main.rs
use dygma_focus::prelude::*;
fn main() -> Result<(), FocusError> {
// Open the first device found and declare as mutable
// Other constructors are under Focus::new_*
let mut focus = Focus::new_first_available()?;
// Here is an example method, most have a get and set method
// There are also other methods for triggering macros or switching layers for example
println!("version: {}", &focus.version()?);
Ok(())
}