kontroll/
lib.rs

1//! Kontroll connects to Keymapp's API, allowing control of ZSAs keyboard programmaticaly.
2//!
3//! For more information or examples on how to use it, please refer to the [repository](https://github.com/zsa/kontroll)
4//!
5//! ## Usage
6//! ```rust,no_run
7//! use kontroll::Kontroll;
8//! // Note: The port is optional, if not provided, it will default to
9//! // "$CONFIG_DIR/.keymapp/keymapp.sock" on Unix and 50051 on Windows.
10//! let port = None
11//! let api = Kontroll::new(port).await.unwrap();
12//! let keyboards = api.list_keyboards().await.unwrap();
13//! ```
14//! The above example will list all the keyboards connected to the system. You can
15//! check other available methods in the [`Kontroll`] struct.
16pub mod api;
17pub mod utils;
18
19pub use api::Kontroll;