RMK provides a simple and declarative way to configure your keyboard using a TOML configuration file, requiring no Rust programming knowledge. You can also use Rust API which offers maximum flexibility and control over your keyboard's behavior.
RMK provides many examples for various microcontrollers using both configuration methods. See the examples folder in the RMK repository.
This section is a brief introduction of RMK's configuration system. For the complete configuration specification, please refer to the Configuration section.
Keyboard configuration in RMK is managed using a keyboard.toml file that defines nearly every aspect of your keyboard setup. TOML is a human-readable configuration format that's easy to understand and edit.
If you're unfamiliar with TOML syntax, check out the TOML Specification.
keyboard.toml is the default configuration method when your keyboard project is generated by rmkit.
If you create your project manually, enable the keyboard.toml support by using #[rmk_keyboard] macro:
You should also specify the path to your keyboard.toml file in .cargo/config.toml, so that the build system can locate it:
For developers who want full programmatic control over the keyboard's behavior, RMK provides a comprehensive Rust API. This approach offers maximum flexibility and customization capabilities, allowing you to leverage Rust's powerful type system and compile-time guarantees to build sophisticated keyboard firmware.
The Rust API is ideal if you:
Checkout examples which use Rust API if you want to try fantastic Rust programming language.