|
| 1 | +<!-- PROJECT LOGO --> |
| 2 | +<br /> |
| 3 | +<p align="center"> |
| 4 | + <a href="https://github.com/haobogu/rmk"> |
| 5 | + <img src="https://github.com/HaoboGu/rmk/blob/dad1f922f471127f5449262c4cb4a922e351bf43/docs/images/rmk_logo.svg?raw=true" alt="Logo" width="150"> |
| 6 | + </a> |
| 7 | + |
| 8 | + <p align="center"> |
| 9 | + A feature-rich keyboard firmware written in Rust. |
| 10 | + <br /> |
| 11 | + <br /> |
| 12 | + <a href="https://crates.io/crates/rmk"><img src="https://img.shields.io/crates/v/rmk"></a> |
| 13 | + <a href="https://docs.rs/rmk/latest/rmk/"><img src="https://img.shields.io/docsrs/rmk"></a> |
| 14 | + <a href="https://github.com/HaoboGu/rmk/actions"><img src="https://github.com/haobogu/rmk/actions/workflows/build.yml/badge.svg"></a> |
| 15 | + <a href="https://discord.gg/HHGA7pQxkG"><img src="https://img.shields.io/discord/1166665039793639424?label=discord"></a> |
| 16 | + </p> |
| 17 | +</p> |
| 18 | + |
| 19 | +👉 Join our [Discord server](https://discord.gg/HHGA7pQxkG) for discussions, support, and community collaboration! |
| 20 | + |
| 21 | +----- |
| 22 | +[中文](https://github.com/HaoboGu/rmk/blob/main/README_zh.md) |
| 23 | + |
| 24 | + |
| 25 | +## Features |
| 26 | + |
| 27 | +- **Broad microcontroller compatibility**: Leveraging [embassy](https://github.com/embassy-rs/embassy), RMK supports a comprehensive range of microcontrollers, including stm32, nRF, rp2040(w), esp32, etc |
| 28 | +- **Dynamic keymap customization**: RMK offers native [Vial](https://get.vial.today) support, enabling real-time keymap modifications. You can even edit keymaps over BLE connections wirelessly |
| 29 | +- **Advanced keyboard functionality**: RMK comes with lots of advanced keyboard features by default, including layer switching, media controls, system commands, mouse control, and more |
| 30 | +- **Wireless connectivity**: BLE wireless support with automatic reconnection and multi-device capabilities for nRF52 and esp32 microcontrollers, tested on nRF52840, esp32c3, esp32s3, Pi Pico W |
| 31 | +- **Easy configuration**: RMK simplifies keyboard development through a single `keyboard.toml` configuration file. For Rust enthusiasts, the firmware remains highly customizable using Rust code |
| 32 | +- **Optimized performance**: RMK achieves approximately 2ms latency in wired mode and 10ms in wireless mode. With the `async_matrix` feature enabled, power consumption is significantly reduced—a 2000mAh battery can power your keyboard for several months |
| 33 | + |
| 34 | +## [User Documentation](https://rmk.rs/docs/user_guide/guide_overview) | [API Reference](https://docs.rs/rmk/latest/rmk/) | [FAQs](https://rmk.rs/docs/getting_started/faq) | [Changelog](https://github.com/HaoboGu/rmk/blob/main/rmk/CHANGELOG.md) |
| 35 | + |
| 36 | +## Real-World Implementations |
| 37 | + |
| 38 | +### [rmk-ble-keyboard](https://github.com/HaoboGu/rmk-ble-keyboard) |
| 39 | + |
| 40 | +<img src="https://raw.githubusercontent.com/HaoboGu/rmk/refs/heads/main/docs/docs/main/images/rmk_ble_keyboard.jpg" width="60%"> |
| 41 | + |
| 42 | +### [dactyl-lynx-rmk](https://github.com/whitelynx/dactyl-lynx-rmk) |
| 43 | + |
| 44 | +<img src="https://raw.githubusercontent.com/whitelynx/dactyl-lynx-keyboard/refs/heads/main/resources/skeleton-prototype.jpg" width="60%"> |
| 45 | + |
| 46 | +### [sessile](https://github.com/willpuckett/sessile) |
| 47 | + |
| 48 | +<img src="https://raw.githubusercontent.com/HaoboGu/rmk/refs/heads/main/docs/docs/main/images/sessile.png" width="60%"> |
| 49 | + |
| 50 | +### [Urchin](https://github.com/TimoBbz/urchin-rmk-firmware) |
| 51 | + |
| 52 | +<img src="https://raw.githubusercontent.com/HaoboGu/rmk/refs/heads/main/docs/docs/main/images/urchin.png" width="60%"> |
| 53 | + |
| 54 | +### [zx66](https://github.com/zongxin1993/zx66-keybord) |
| 55 | + |
| 56 | +<img src="https://raw.githubusercontent.com/zongxin1993/zx66-keybord/refs/heads/master/Images/zx66-keybord_03.jpg" width="60%"> |
| 57 | + |
| 58 | +### [rmk-zsa-voyager](https://github.com/jpds/rmk-zsa-voyager) |
| 59 | + |
| 60 | +<img src="https://raw.githubusercontent.com/HaoboGu/rmk/refs/heads/main/docs/docs/main/images/zsa-voyager.webp" width="60%"> |
| 61 | + |
| 62 | +## Getting Started |
| 63 | + |
| 64 | +### Option 1: Start with a Template |
| 65 | + |
| 66 | +Quickly bootstrap your project using [rmkit](https://github.com/HaoboGu/rmkit) and the official RMK [project template](https://github.com/HaoboGu/rmk-template). |
| 67 | + |
| 68 | +```shell |
| 69 | +cargo install rmkit flip-link |
| 70 | +# If you encounter installation issues on Windows, try this alternative command: |
| 71 | +# powershell -ExecutionPolicy ByPass -c "irm https://github.com/haobogu/rmkit/releases/download/v0.0.20/rmkit-installer.ps1 | iex" |
| 72 | +rmkit init |
| 73 | +``` |
| 74 | + |
| 75 | +For comprehensive guidance, refer to the [User Guide](https://rmk.rs/docs/user_guide/guide_overview). |
| 76 | + |
| 77 | +### Option 2: Explore Built-in Examples |
| 78 | + |
| 79 | +Browse the examples in the [`examples`](https://github.com/HaoboGu/rmk/tree/main/examples) directory. Below are step-by-step instructions for rp2040 development. The process is similar for other microcontrollers when using a debug probe. |
| 80 | + |
| 81 | +#### rp2040 Setup |
| 82 | + |
| 83 | +1. Install [probe-rs](https://github.com/probe-rs/probe-rs) |
| 84 | + |
| 85 | + ```shell |
| 86 | + curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh |
| 87 | + ``` |
| 88 | + |
| 89 | +2. Build the firmware |
| 90 | + |
| 91 | + ```shell |
| 92 | + cd examples/use_rust/rp2040 |
| 93 | + cargo build --release |
| 94 | + ``` |
| 95 | + |
| 96 | +3. Flash using a debug probe |
| 97 | + |
| 98 | + With a debug probe connected to your rp2040 board, simply run: |
| 99 | + |
| 100 | + ```shell |
| 101 | + cd examples/use_rust/rp2040 |
| 102 | + cargo run --release |
| 103 | + ``` |
| 104 | + |
| 105 | +4. (Optional) Flash via USB |
| 106 | + |
| 107 | + Without a debug probe, you can use `elf2uf2-rs` to flash via USB: |
| 108 | + |
| 109 | + 1. Install the tool: `cargo install elf2uf2-rs` |
| 110 | + 2. Modify `examples/use_rust/rp2040/.cargo/config.toml` to use `elf2uf2`: |
| 111 | + ```diff |
| 112 | + - runner = "probe-rs run --chip RP2040" |
| 113 | + + runner = "elf2uf2-rs -d" |
| 114 | + ``` |
| 115 | + 3. Connect your rp2040 board while holding the BOOTSEL button until the USB drive appears |
| 116 | + 4. Flash the firmware: |
| 117 | + ```shell |
| 118 | + cd examples/use_rust/rp2040 |
| 119 | + cargo run --release |
| 120 | + ``` |
| 121 | + Upon successful completion, you'll see output similar to: |
| 122 | + ```shell |
| 123 | + Finished release [optimized + debuginfo] target(s) in 0.21s |
| 124 | + Running `elf2uf2-rs -d 'target\thumbv6m-none-eabi\release\rmk-rp2040'` |
| 125 | + Found pico uf2 disk G:\ |
| 126 | + Transfering program to pico |
| 127 | + 173.00 KB / 173.00 KB [=======================] 100.00 % 193.64 KB/s |
| 128 | + ``` |
| 129 | + |
| 130 | +## [Development Roadmap](https://rmk.rs/docs/development/roadmap) |
| 131 | + |
| 132 | +Current roadmap of RMK can be found [here](https://rmk.rs/docs/development/roadmap). |
| 133 | + |
| 134 | +## Minimum Supported Rust Version (MSRV) |
| 135 | + |
| 136 | +RMK is developed against the latest stable Rust release. While other versions may work, they are not fully tested. |
| 137 | + |
| 138 | +## License |
| 139 | + |
| 140 | +RMK is licensed under either of |
| 141 | + |
| 142 | +- Apache License, Version 2.0 (LICENSE-APACHE or <http://www.apache.org/licenses/LICENSE-2.0>) |
| 143 | +- MIT license (LICENSE-MIT or <http://opensource.org/licenses/MIT>) |
| 144 | + |
| 145 | +at your option. |
0 commit comments