Files
zmk/docs/docs/development/hardware-integration/includes/_gpio-key-matrix.md

434 B

Here is an example for a keyboard with a GPIO pin that reads from the matrix:

/ {
    keys {
        compatible = "gpio-keys";
        soft_off_gpio_key: soft_off_gpio_key {
            gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
        };
    };
};

MCU inputs are triggered by pulling the specified pin high, typically by pressing some combination of switches which connects the MCU input to an MCU output.