2020-05-25 08:22:16 +10:00
|
|
|
#include <dt-bindings/zmk/keys.h>
|
|
|
|
#include <zmk/kscan-mock.h>
|
|
|
|
|
|
|
|
/ {
|
|
|
|
chosen {
|
|
|
|
zmk,kscan = &kscan0;
|
|
|
|
zmk,keymap = &keymap0;
|
|
|
|
};
|
|
|
|
|
|
|
|
kscan0: kscan {
|
|
|
|
compatible = "zmk,kscan-mock";
|
|
|
|
label = "KSCAN_MOCK0";
|
|
|
|
|
|
|
|
rows = <2>;
|
|
|
|
columns = <2>;
|
2020-05-25 13:13:33 +10:00
|
|
|
events = <ZMK_MOCK_PRESS(0,1,300) ZMK_MOCK_PRESS(0,0,300) ZMK_MOCK_RELEASE(0,0,300) ZMK_MOCK_RELEASE(0,1,300)>;
|
|
|
|
// events = <ZMK_MOCK_PRESS(0,0,800) ZMK_MOCK_RELEASE(0,0,800) ZMK_MOCK_PRESS(0,1,800) ZMK_MOCK_RELEASE(0,1,800)>;
|
2020-05-25 08:22:16 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
keymap0: keymap {
|
|
|
|
compatible = "zmk,keymap";
|
|
|
|
label ="Default keymap";
|
|
|
|
layers = <&default &lower &raise>;
|
|
|
|
};
|
|
|
|
|
|
|
|
layers {
|
|
|
|
compatible = "zmk,layers";
|
|
|
|
|
|
|
|
default: layer_0 {
|
|
|
|
label = "DEFAULT";
|
|
|
|
keys =
|
|
|
|
<
|
2020-05-25 13:13:33 +10:00
|
|
|
KC_A MT(MOD_LSFT, KC_B)
|
2020-05-25 08:22:16 +10:00
|
|
|
KC_C KC_D
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
lower: layer_1 {
|
|
|
|
label = "LOWER";
|
|
|
|
keys = <KC_D KC_C ZC_TRNS ZC_TRNS>;
|
|
|
|
};
|
|
|
|
|
|
|
|
raise: layer_2 {
|
|
|
|
label = "RAISE";
|
|
|
|
keys = <KC_C KC_D ZC_TRNS ZC_TRNS>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|