ZMK Firmware Documentation

repository·main·Indexed 26 days ago

https://github.com/zmkfirmware/zmk

An open-source, wireless-focused keyboard firmware built on the Zephyr RTOS. This documentation provides build and configuration guides for various supported boards and shields, including the BDN9, Kinesis Advantage 360 Professional, S40NC, MoErgo Glove80, nice!60, Ferris 0.2, and various shields like the BFO-9000, Helix, and Leeloo-Micro.

Tokens
112.7K
Snippets
344
Records
678
Agent score
88%

What's inside ZMK Firmware

  1. Overview of the BFO-9000 shield

    main

    The BFO-9000 is a customizable full-size split ortholinear keyboard shield. It is designed to be modular, allowing for different configurations of rows and columns using breakoff pieces.

    Key Features

    • Switch Compatibility: Supports MX-compatible, Alps-compatible, and Kailh Low-Profile Choc switches.
    • Configurability: Breakoff pieces allow for layouts ranging from 4 to 6 rows and 7 to 9 columns.
    • Lighting: Includes connections for RGB LEDs.
  2. Overview of ZMK Behaviors

    main

    In ZMK, Behaviors are the actions invoked when a key is pressed or released. Within the Zephyr RTOS context, behaviors are implemented as "devices". A complete behavior implementation typically consists of:

    • A devicetree binding file (.yaml) to declare the behavior's properties.
    • A device driver written in C code.
    • (Optional) Devicetree-source-include files (.dtsi) containing predefined instances of the behavior that can be included directly in keymaps.
  3. Overview of ZMK Firmware

    main
    ZMK Firmware is an open-source (MIT licensed) keyboard firmware built on top of the Zephyr™ Project Real Time Operating System (RTOS). It is designed to provide a modern, wireless, and powerful firmware experience for mechanical keyboards.
  4. Overview of ZMK Firmware features

    main

    ZMK is an open-source (MIT) keyboard firmware built on the Zephyr™ Project Real Time Operating System (RTOS). It is designed for power-efficiency, flexibility, and broad hardware support, suitable for both wired and wireless input devices.

    Supported Features

    • Hardware: Wireless Split Keyboards, Low Active Power Usage, Encoders, LED-based Lighting, Pointing Devices, Low Power Sleep States, Low Power Mode (VCC Shutoff) for Peripherals, Battery Level Reporting, and a wide range of 32-bit Microcontrollers.
    • Connectivity: Low-Latency BLE Support, Multi-Device BLE Connectivity, and USB Connectivity.
    • Keymap Features: User Configuration Repositories, Keymaps and Layers, Wide Range of Keycodes, Flexible Behavior System, Hold-Taps (Mod-Tap, Layer-Tap), Tap-Dances, Sticky (One Shot) Keys, Combos, Macros, and Mouse Keys.

    Under Development or Not Planned

    • Under Development: Wired Split Keyboards, Displays, Multitouch Touchpads (PTP), Improved Power Handling for Multiple Peripherals, and Realtime Keymap Updating.
    • Not Planned: Support for AVR/8-bit Chips.
  5. Distinguish between ZMK Boards and Shields

    main

    ZMK uses Zephyr concepts to modularize keyboard builds:

    • Board: Defines the PCB that includes the Microcontroller Unit (MCU). This can be a complete keyboard PCB (e.g., Planck) or a small MCU-only board (e.g., nice!nano) designed to be combined with other components.
    • Shield: A PCB or hardwired set of components (like a keyboard shell with keys and encoders) that, when combined with an MCU-only board, forms a complete keyboard. Shields typically map features to a standard pin footprint (e.g., Pro Micro pinout).

    Composite Keyboards use this separation to allow users to swap different MCU boards (like nice!nano or SparkFun Pro Micro RP2040) onto the same 'brainless' shield.

  6. Understand ZMK Hardware Support and Compatibility

    main

    ZMK is built on Zephyr™ RTOS and supports a wide variety of 32-bit and 64-bit hardware targets.

    Supported Architectures

    • Nordic nRF52 series
    • Raspberry Pi RP2040/RP2350
    • Most ST STM32 MCUs
    • Microchip SAMD21
    • Any hardware supported by Zephyr™ (though custom configuration may be required).

    Unsupported Hardware

    ZMK does not support boards with AVR 8-bit processors because Zephyr™ requires 32-bit or 64-bit platforms.

    • Examples of unsupported controllers: SparkFun Pro Micro, Elite-C, and Arduino Uno Rev3.
  7. Understand Devicetree Preprocessing in ZMK

    main
    ZMK devicetrees are constructed through two preprocessing stages: the C preprocessor and Devicetree processing. This process merges multiple files (including .dts, .dtsi, .overlay, and .keymap files) into a single final tree. Because of this, your custom keymap and most customizations will typically appear near the bottom of the final processed file. If you encounter issues, you can inspect the fully processed devicetree in GitHub Actions or local builds.