Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haobogu/rmk
Rust keyboard firmware library with layers, macros, real-time keymap editing, wireless(BLE) and split support
https://github.com/haobogu/rmk
cortex-m embedded esp32 firmware keyboard keyboard-firmware nrf52 rp2040 rust stm32 usb usb-hid wireless
Last synced: 5 days ago
JSON representation
Rust keyboard firmware library with layers, macros, real-time keymap editing, wireless(BLE) and split support
- Host: GitHub
- URL: https://github.com/haobogu/rmk
- Owner: HaoboGu
- License: apache-2.0
- Created: 2023-09-06T13:17:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-12T12:15:59.000Z (10 days ago)
- Last Synced: 2025-01-13T01:39:42.492Z (9 days ago)
- Topics: cortex-m, embedded, esp32, firmware, keyboard, keyboard-firmware, nrf52, rp2040, rust, stm32, usb, usb-hid, wireless
- Language: Rust
- Homepage: https://haobogu.github.io/rmk/
- Size: 7.41 MB
- Stars: 699
- Watchers: 9
- Forks: 56
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-rust - rmk - A feature-rich keyboard firmware. (Applications / Embedded)
- trackawesomelist - rmk (β670) - A feature-rich keyboard firmware. (Recently Updated / [Dec 27, 2024](/content/2024/12/27/README.md))
- fucking-awesome-rust - rmk - A feature-rich keyboard firmware. (Applications / Embedded)
README
A feature-rich Rust keyboard firmware.
π Join our [Discord server](https://discord.gg/HHGA7pQxkG) if you have anything to discuss!
-----
[δΈζ](https://github.com/HaoboGu/rmk/blob/main/README_zh.md)## Features
- **Support a wide range of microcontrollers**: Powered by [embassy](https://github.com/embassy-rs/embassy), RMK supports a wide range of microcontrollers, such as stm32/nRF/rp2040/esp32
- **Real-time keymap editing**: RMK has built-in [Vial](https://get.vial.today) support, the keymap can be changed on-the-fly. You can even use Vial to edit keymap over BLE directly
- **Advanced keyboard features**: Many advanced keyboard features are available by default in RMK, such as layer switch, media control, system control, mouse control, etc
- **Wireless**: BLE wireless support with auto-reconnection/multiple devices feature for nRF52 and esp32 microcontrollers, tested on nRF52840, esp32c3 and esp32s3
- **Easy configuration**: RMK provides a simple way to build your keyboard: a `keyboard.toml` is all you need! For experienced Rust user, you can still customize your firmware easily using Rust code
- **Low latency and low-power ready**: RMK has a typical 2 ms latency in wired mode and 10 ms latency in wireless mode. By enabling `async_matrix` feature, RMK has very low power consumption, with a 2000mah battery, RMK can provide several months battery life## [User Documentation](https://haobogu.github.io/rmk/user_guide/1_guide_overview.html) | [API Reference](https://docs.rs/rmk/latest/rmk/) | [FAQs](https://haobogu.github.io/rmk/faq.html) | [Changelog](https://github.com/HaoboGu/rmk/blob/main/rmk/CHANGELOG.md)
## Real World Examples
### [rmk-ble-keyboard](https://github.com/HaoboGu/rmk-ble-keyboard)
### [dactyl-lynx-rmk](https://github.com/whitelynx/dactyl-lynx-rmk)
## Usage
### Option 1: Initialize from template
You can use [rmkit](https://github.com/HaoboGu/rmkit) to initialize your project from RMK [project template](https://github.com/HaoboGu/rmk-template/tree/feat/rework).
```shell
cargo install rmkit flip-link
rmkit init
```Check RMK's [User Guide](https://haobogu.github.io/rmk/user_guide/1_guide_overview.html) for details.
### Option 2: Try built-in examples
Example can be found at [`examples`](https://github.com/HaoboGu/rmk/blob/main/examples). The following is a simple step-to-step instruction for rp2040. For other microcontrollers, the steps should be identical with a debug probe.
#### rp2040
1. Install [probe-rs](https://github.com/probe-rs/probe-rs)
```shell
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh
```2. Build the firmware
```shell
cd examples/use_rust/rp2040
cargo build --release
```3. Flash using debug probe
If you have a debug probe connected to your rp2040 board, flashing is quite simple: run the following command to automatically compile and flash RMK firmware to the board:
```shell
cd examples/use_rust/rp2040
cargo run --release
```4. (Optional) Flash using USB
If you don't have a debug probe, you can use `elf2uf2-rs` to flash your rp2040 firmware via USB. There are several additional steps you have to do:
1. Install `elf2uf2-rs`: `cargo install elf2uf2-rs`
2. Update `examples/use_rust/rp2040/.cargo/config.toml`, use `elf2uf2` as the flashing tool
```diff
- runner = "probe-rs run --chip RP2040"
+ runner = "elf2uf2-rs -d"
```
3. Connect your rp2040 board holding the BOOTSEL key, ensure that rp's USB drive appears
4. Flash
```shell
cd examples/use_rust/rp2040
cargo run --release
```
Then, you will see logs like if everything goes right:
```shell
Finished release [optimized + debuginfo] target(s) in 0.21s
Running `elf2uf2-rs -d 'target\thumbv6m-none-eabi\release\rmk-rp2040'`
Found pico uf2 disk G:\
Transfering program to pico
173.00 KB / 173.00 KB [=======================] 100.00 % 193.64 KB/s
```## [Roadmap](https://haobogu.github.io/rmk/roadmap.html)
Current roadmap of RMK can be found [here](https://haobogu.github.io/rmk/roadmap.html).
## Minimum Supported Rust Version (MSRV)
This crate uses latest stable. Other versions should work, but they're not tested.
## License
RMK is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or )
- MIT license (LICENSE-MIT or )at your option.