Adds a default kscan and keymap for the nRF52840DK Signed-off-by: Kelly Helmut Lord <helmut@helmutlord.com>
32 lines
840 B
Text
32 lines
840 B
Text
#include <behaviors.dtsi>
|
|
#include <dt-bindings/zmk/keys.h>
|
|
#include <dt-bindings/zmk/matrix_transform.h>
|
|
|
|
/ {
|
|
chosen {
|
|
zmk,kscan = &kscan0;
|
|
zmk,matrix-transform = &layout_grid_transform;
|
|
};
|
|
|
|
kscan0: kscan {
|
|
compatible = "zmk,kscan-gpio-direct";
|
|
label = "direct";
|
|
input-gpios
|
|
= <&gpio0 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>,
|
|
<&gpio0 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>,
|
|
<&gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>,
|
|
<&gpio0 25 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>
|
|
;
|
|
};
|
|
|
|
layout_grid_transform:
|
|
keymap_transform_0 {
|
|
compatible = "zmk,matrix-transform";
|
|
columns = <2>;
|
|
rows = <2>;
|
|
map = <
|
|
RC(0,0) RC(0,1)
|
|
RC(1,0) RC(1,1)
|
|
>;
|
|
};
|
|
};
|