kle-serial

A Rust library for deserialising [Keyboard Layout Editor] files. Designed to be used in conjunction with [serde_json] to deserialize JSON files exported from KLE.

Example

```Rust use kle_serial::Keyboard;

let keyboard: Keyboard = serdejson::fromstr( r#"[ {"name": "example"}, [{"f": 4}, "!\n1\n¹\n¡"] ]"# ).unwrap();

asserteq!(keyboard.metadata.name, "example"); asserteq!(keyboard.keys.len(), 1);

let legend = keyboard.keys[0].legends[0].as_ref().unwrap();

asserteq!(legend.text, "!"); asserteq!(legend.size, 4); ```

Licence

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.