| Crates.io | rktk |
| lib.rs | rktk |
| version | 0.2.0 |
| created_at | 2024-06-30 14:25:36.697425+00 |
| updated_at | 2025-05-23 13:09:32.804419+00 |
| description | rktk - Rust Keyboard firmware Toolkit |
| homepage | |
| repository | https://github.com/nazo6/rktk |
| max_upload_size | |
| id | 1288018 |
| size | 177,211 |
Rust Keyboard Toolkit
rktk is a keyboard firmware framework written in Rust.
Currently, rktk supports nRF52840 and RP2040, and although there are bugs and performance issues (especially related to split keyboards), it can be used as a decent keyboard.
This firmware consists of two parts: the core functionality implemented in the
rktk crate and the driver that actually interacts with the hardware. This
makes it easy to extend.
You can find examples in the examples directory.
Also, you can find some advanced examples in the following repositories:
| Feature | Status | Note |
|---|---|---|
| Keyscan | ✅ | |
| Key mapping | 🟡 | See below table for detail |
| Mouse | ✅ | |
| Encoder | 🟡 | |
| Hook system | 🟡 | |
| USB | ✅ | |
| Bluetooth | 🟡 | |
| Split keyboard | ✅ | |
| Display | 🟡 | |
| Storage | 🟡 | |
| RGB led | 🟡 | |
| Remapper (rktk-client) | 🟡 |
Key mapping features is implemented in rktk-keymanager and this crate does not
depend on rktk or embassy.
| Feature name | Status | Note |
|---|---|---|
| Key action | ||
| Tap-Hold | ✅ | Called as Mod-Tap or Layer-Tap in QMK |
| Tap Dance | ✅ | |
| Oneshot key | ✅ | |
| Combo key | 🟡 | |
| Key code | ||
| Normal key | ✅ | |
| Modifier key | ✅ | |
| Media key | ✅ | |
| Mouse key | ✅ | |
| Mouse scroll momentary | ✅ | |
| Layer momentary (MO) | ✅ | |
| Layer toggle (TG) | ✅ |
Driver that is available in the rktk-drivers-common crate is available for all
platforms which have embassy compatible HAL.
| Driver | Common | RP2040 | NRF52840 |
|---|---|---|---|
| Key scanner | |||
| Matrix | 🟡 | - | - |
| Matrix with shift register | ✅ | - | - |
| (Japanese) Duplex-Matrix | 🟡 | - | - |
| Mouse | |||
| PMW3360 | ✅ | - | - |
| PAW3395 | ✅ | - | - |
| Encoder | 🟡 | - | - |
| Debouncer | |||
| Eager debouncer | 🟡 | - | - |
| Host communication | |||
| USB | ✅ | - | - |
| Bluetooth | 🟡 (Trouble) | 🟡 (SoftDevice) | |
| Split communication | |||
| Half-duplex (single wire, TRS) | 🟡 (PIO) | 🟡 (UART) | |
| Full-duplex (dual wire, TRRS) | ✅ (UART) | ||
| Bluetooth | 🔴 | ||
| Display | |||
| SSD1306 | ✅ | - | - |
| Storage | |||
| sequential-storage (NorFlash) | 🟡 | - | - |
| RGB led | |||
| WS2812 | ✅ (PIO) | ✅ (PWM) |
In addition to the dependencies specified here, to develop rktk, you need to install the following dependencies:
rktk actually doesn't depends on nightly feature of rustc, but uses nightly
cargo features like per-package-target. So, it requires nightly toolchain.