rmk 0.1.4

Keyboard firmware written in Rust
Documentation

RMK

Crates.io Docs Build

Keyboard firmware with layer/dynamic keymap/vial support, written in Rust.

RMK is under active development, breaking changes may happen. If you have any problem please check the latest doc or file an issue.

News

  • [2024.01.26] 🎉rmk-template is released! Now you can create your own keyboard firmware with a single command: cargo generate --git https://github.com/HaoboGu/rmk-template
  • [2024.01.18] RMK just released version 0.1.0! By migrating to Embassy, RMK now has better async support, more supported MCUs and much easier usages than before. For examples using Embassy, check boards folder!

User Documentation

API Reference

Prerequisites

This crate requires stable Rust 1.75 and up. openocd(stm32) or probe-rs(stm32/rp2040) is used for flashing & debugging.

Usage

Option 1: Initialize from template

You can use rmk-template to initialize your project.

cargo install cargo-generate
cargo generate --git https://github.com/HaoboGu/rmk-template

Option 2: Try built-in examples

Example can be found at boards. The following is a simple step-to-step instruction for rp2040 and stm32h7

rp2040

  1. Install probe-rs

    cargo install probe-rs --features cli
    
  2. Build the firmware

    cd boards/rp2040
    cargo build
    
  3. Flash it

    cd boards/rp2040
    cargo run
    

stm32h7

  1. Install openocd

  2. Build the firmware

    cd boards/stm32h7
    cargo build
    
  3. Flash

    You can use both probe-rs and openocd to flash the firmware:

    # Use openocd
    openocd -f openocd.cfg -c "program target/thumbv7em-none-eabihf/debug/rmk-stm32h7 preverify verify reset exit"
    
    # Use probe-rs
    cd boards/stm32h7
    cargo run
    
  4. (Optional) Debug firmware using CMSIS-DAP

    Open the project using VSCode, choose Cortex-Debug - stm32h7 debug profile, then press F5, the firmware will be automatically compiled and flashed. A debug session is started after flashing. Check .vscode/tasks.json and .vscode/launch.json for details.

Roadmap

A lot of todos at the list, any contributions are welcomed :)

  • layer support
  • system/media keys
  • mouse keys
  • vial support
  • eeprom
  • project template
  • easy keyboard configuration with good default
  • LED
  • RGB
  • better documentation
  • keyboard macro
  • encoder
  • wireless
  • default bootloader/DFU
  • a good gui configurator

License

RMK is licensed under either of

at your option.