This section covers the basic keyboard identification and physical matrix configuration in your keyboard.toml file.
The [keyboard] section defines basic information about your keyboard that appears to the operating system and identifies your device.
You must specify either a chip or board, but not both:
Option 1: Specify Chip
Option 2: Specify Board
nrf52840, nrf52833, nrf52832, nrf52811, nrf52810esp32c3, esp32c6, esp32s3rp2040, rp2350nice!nano - nRF52840-based wireless boardnice!nano_v2 - Updated version of nice!nanopi_pico_w - Raspberry Pi Pico W with WiFi/BLExiao_ble - Seeed Studio XIAO nRF52840For chips without full USB functionality (like nRF52832 or ESP32-C3), disable USB:
The [matrix] section defines your keyboard's physical key matrix wiring. This tells RMK which GPIO pins connect to your key switches.
Skip [matrix] section for split keyboards. Use the [split] section instead to define matrix configuration for each part.
A keyboard matrix uses diodes to enable multiple key detection. Here's how it works:
Per default RMK assumes that your pins are col2row, meaning that the output pins (anodes) represent the columns and the input pins (cathodes) represent the rows. If your schemata shows the opposite you need to change the configuration to row2col
For keyboards using a traditional diode matrix:
GPIO pin names vary by microcontroller. Here are the correct formats for each supported chip series:
Examples by Chip Series:
PA0, PB1, PC2, etc.P0_00, P0_01, P1_15, etc.PIN_0, PIN_1, PIN_28, etc.GPIO0, GPIO1, GPIO21, etc.Finding Pin Names:
embassy-stm32/stm32h750xb)
RMK supports two matrix types:
For keyboards where each switch connects directly to a GPIO pin (no matrix):
Direct Pin Behavior:
true (default): The pin is pulled high by default, pressing a key pulls it to lowfalse: The pin is pulled low by default, pressing a key pulls it to high"_" or "trns" for unused positions in the matrix[security] SectionFor enhanced security, Vial locks certain functions (like matrix testing) by default. You can set a key combination to unlock it.
Wrong GPIO Pin Names:
P0_00 (nRF52), PIN_0 (RP2040), PA0 (STM32), GPIO0 (ESP32)P0_09/P0_10 are used as NFC pins by default. To use it as a normal pin in matrix, you should enable corresponding features(for example, nfc-pins-as-gpio) for embassy-nrf dependency.Matrix Not Working:
row2col = truerow2col feature to Cargo.tomlDirect Pins Not Working:
matrix_type = "direct_pin" is setdirect_pin_low_active setting matches your hardware"_" or "trns"