Skip to main content

Split Configuration

These are settings that control how split keyboards behave.

See Configuration Overview for instructions on how to change these settings.

Kconfig

Following split keyboard settings are defined in zmk/app/src/split/Kconfig.

ConfigTypeDescriptionDefault
CONFIG_ZMK_SPLITboolEnable split keyboard supportn
CONFIG_ZMK_SPLIT_ROLE_CENTRALbooly for central device, n for peripheraln
CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORSboolEnable split keyboard support for passing indicator state to peripheralsn

Bluetooth Splits

Following bluetooth split keyboard settings are defined in zmk/app/src/split/bluetooth/Kconfig.

ConfigTypeDescriptionDefault
CONFIG_ZMK_SPLIT_BLEboolUse BLE to communicate between split keyboard halvesy
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALSintNumber of peripherals that will connect to the central1
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHINGboolEnable fetching split peripheral battery levels to the central siden
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXYboolEnable central reporting of split battery levels to hostsn
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_QUEUE_SIZEintMax number of battery level events to queue when received from peripheralsCONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS
CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZEintMax number of key state events to queue when received from peripherals5
CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZEintStack size of the BLE split central write thread512
CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZEintMax number of behavior run events to queue to send to the peripheral(s)5
CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZEintStack size of the BLE split peripheral notify thread756
CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_PRIORITYintPriority of the BLE split peripheral notify thread5
CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZEintMax number of key state events to queue to send to the central10

Wired Splits

Hardware UARTs have a few different modes/approaches to sending and receiving data, with different levels of complexity and performance. Not all hardware nor drivers support all modes, so ZMK has code to support different interaction modes with the UART as needed. The default mode should be properly selected based on the platform's report support, but you can choose to override the mode if needed.

  • Polling Mode - The least efficient mode, this requires the MCU to constantly poll the UART to see if more data has been received, taking time away from other processing. This is basic mode supported by all UART drivers.
  • Interrupt Mode - This mode allows the MCU to do other processing until the UART raises an interrupt to signal new data has been received. On platforms where this is combined with a FIFO, there is even less superfluous processing, and high speeds can be achieved while allowing other processing to continue. Examples:
    • RP2040
    • nRF52
  • Async (DMA) Mode - Similar to interrupt mode, data reception can occur without involving the MCU. Additionally, larger volumes can be copied directly into accessible memory without the use of the MCU, allowing even further efficiency/rates without tying up the MCU. Only some drivers support this mode (and the current Zephyr 3.5 version of the nRF52 UART has some bugs that prevent its use). Examples:
    • SAM0 (e.g. SAMD21)
    • STM32 (e.g. stm32f072)

Following wired split keyboard settings are defined in zmk/app/src/split/wired/Kconfig.

ConfigTypeDescriptionDefault
CONFIG_ZMK_SPLIT_WIREDboolUse wired connection to communicate between split keyboard halvesy (if no BLE split and devicetree is set appropriately)
CONFIG_ZMK_SPLIT_WIRED_UART_MODE_ASYNCboolAsync (DMA) modey if the driver supports it (excluding nRF52 with known bugs)
CONFIG_ZMK_SPLIT_WIRED_UART_MODE_INTERRUPTboolInterrupt modey if the hardware supports it
CONFIG_ZMK_SPLIT_WIRED_UART_MODE_POLLINGboolPolling modey if neither other mode is supported

Async (DMA) Mode

The following settings only apply when using wired split in async (DMA) mode:

ConfigTypeDescriptionDefault
CONFIG_ZMK_SPLIT_WIRED_ASYNC_RX_TIMEOUTintRX Timeout (in microseconds) before reporting received data20

Polling Mode

The following settings only apply when using wired split in polling mode:

ConfigTypeDescriptionDefault
CONFIG_ZMK_SPLIT_WIRED_POLLING_RX_PERIODintNumber of ticks between calls to poll for split data10

Devicetree

Wired Split

Wired splits require a properly configured UART to function. If writing a shield, you may be able to use the standard UART already provided by the board, e.g. &pro_micro_serial. See predefined nodes for details on the UART node labels provided by various interconnects. If you are creating your own board, or using custom pins for the UART, see the documentation on pin control to configure the pins for your UART.

Once you have a properly configured UART device, it needs to be assigned in a new node with a compatible value of "zmk,wired-split". For example:

/ {
wired_split {
compatible = "zmk,wired-split";
device = <&pro_micro_serial>;
};
};