Keyboard Device

Keyboard device configuration contains keyboard name, USB VID/PID, etc, which is the information about your keyboard that appears to the operating system or identifies your device.

Basic Configuration

The keyboard device info is defined in [keyboard] section of keyboard.toml, or device_config field in RmkConfig struct:

Toml
Rust
keyboard.toml
[keyboard]
name = "My Custom Keyboard"       # A label for your configuration; it does not appear on USB or BLE
vendor_id = 0x4c4b                # USB vendor ID (16-bit hex)
product_id = 0x4643               # USB product ID (16-bit hex)
manufacturer = "YourName"         # (Optional) Manufacturer string, defaults to "RMK"
product_name = "KeyboardName"     # (Optional) USB product string and BLE device name, defaults to "RMK Keyboard"
serial_number = "my-firmware-v1"  # (Optional) Serial number; defaults to rmk:<version> (with a vial: prefix for Vial builds)
chip = "nrf52840"                 # Target microcontroller
usb_enable = true                 # (Optional) Enable USB functionality. If omitted, RMK uses the board/chip default.
Info

If serial_number is omitted, RMK embeds a version stamp automatically. For Vial builds (the default), this is vial:f64c2b3c;rmk:<version>, which lets Vial discover the keyboard without a hardcoded serial override. Non-Vial builds use rmk:<version> without the Vial marker; builds with the rynk feature (or dongle without vial) prepend rynk: to the USB serial number, giving rynk:rmk:<version>. The Vial marker comes first because BLE's serial number characteristic is length limited, so a trailing marker can be truncated away.

Overriding the serial number

Set serial_number explicitly in DeviceConfig to use your own value instead of the RMK default. For Vial to discover the keyboard, the value must start with vial:f64c2b3c:

main.rs
use rmk::config::DeviceConfig;

let keyboard_device_config = DeviceConfig {
    serial_number: "vial:f64c2b3c;my-firmware:1.0.0",
    ..DeviceConfig::default()
};

Hardware Selection

You must specify either a chip or board in keyboard.toml, but not both:

Option 1: Specify Chip

[keyboard]
chip = "nrf52840"  # Direct chip specification

Option 2: Specify Board

[keyboard]
board = "nice!nano_v2"  # Pre-configured board

Supported Hardware

Supported Chips

  • Nordic nRF52 Series: nrf52840, nrf52833, nrf52832, nrf52811, nrf52810
  • Espressif ESP32 Series: esp32c3, esp32c6, esp32h2, esp32s3
  • Raspberry Pi: rp2040
  • STM32 Series: Any STM32 chip supported by embassy-stm32 with USB capability
Info

rp2350 is currently supported via the Rust API examples, but keyboard.toml chip selection only recognizes rp2040 for now.

Supported Development Boards

  • nice!nano - nRF52840-based wireless board
  • nice!nano_v2 - Updated version of nice!nano
  • pi_pico_w - Raspberry Pi Pico W with WiFi/BLE
  • XIAO BLE - Seeed Studio XIAO nRF52840
  • nrfmicro - nRF52840-based Pro Micro replacement
  • bluemicro840 - nRF52840-based Pro Micro replacement
  • puchi_ble - nRF52840-based wireless board
Board names are case-sensitive. :::

::: tip Board names are case-sensitive.

USB Configuration

For microcontrollers that lack full USB device functionality (such as the nRF52832 or ESP32-C3), the chip default config already disables USB, so usb_enable = false only needs to be set explicitly when your chip's default enables it:

[keyboard]
chip = "nrf52832"
usb_enable = false  # Disable USB for chips without USB support