93635077e6
* Implement "momentary layer" behavior with `&mo` reference. * Implement basic "transparent" behavior with `&trans` reference.
98 lines
1.9 KiB
Text
98 lines
1.9 KiB
Text
#include <dt-bindings/zmk/keys.h>
|
|
#include <behaviors/key_press.dtsi>
|
|
#include <behaviors/transparent.dtsi>
|
|
#include <behaviors/mod_tap.dtsi>
|
|
#include <behaviors/momentary_layer.dtsi>
|
|
#include <behaviors/reset.dtsi>
|
|
#include <behaviors/keymap.dtsi>
|
|
#include <behaviors/hid.dtsi>
|
|
#include <zmk/kscan-mock.h>
|
|
|
|
/ {
|
|
chosen {
|
|
zmk,kscan = &kscan0;
|
|
zmk,keymap = &keymap0;
|
|
};
|
|
|
|
kscan0: kscan_0 {
|
|
compatible = "zmk,kscan-composite";
|
|
label = "KSCAN_COMP";
|
|
rows = <2>;
|
|
columns = <4>;
|
|
|
|
left: left {
|
|
kscan = <&left_hand>;
|
|
};
|
|
|
|
right: right {
|
|
kscan = <&right_hand>;
|
|
column-offset = <2>;
|
|
};
|
|
};
|
|
|
|
left_hand: kscan_1 {
|
|
compatible = "zmk,kscan-mock";
|
|
label = "KSCAN_LEFT";
|
|
|
|
rows = <2>;
|
|
columns = <2>;
|
|
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)>;
|
|
};
|
|
|
|
right_hand: kscan_2 {
|
|
compatible = "zmk,kscan-mock";
|
|
label = "KSCAN_RIGHT";
|
|
|
|
rows = <2>;
|
|
columns = <2>;
|
|
events = <ZMK_MOCK_PRESS(1,1,800) ZMK_MOCK_RELEASE(1,1,100) ZMK_MOCK_PRESS(0,1,800) ZMK_MOCK_RELEASE(0,1,100)>;
|
|
};
|
|
|
|
keymap0: keymap {
|
|
compatible = "zmk,keymap";
|
|
label ="Default keymap";
|
|
layers = <&default &lower &raise>;
|
|
};
|
|
|
|
layers {
|
|
compatible = "zmk,layers";
|
|
|
|
default: layer_0 {
|
|
label = "DEFAULT";
|
|
keys =
|
|
<
|
|
KC_A MT(MOD_LSFT, KC_B) KC_C KC_D
|
|
KC_E KC_F KC_G KC_H
|
|
>;
|
|
|
|
bindings = <
|
|
&kp 5 &mo 1 &kp 10 &kp 11
|
|
&kp 1 &kp 2 &kp 4 &kp 89>;
|
|
};
|
|
|
|
lower: layer_1 {
|
|
label = "LOWER";
|
|
keys = <
|
|
KC_A KC_B KC_C KC_D
|
|
KC_E KC_F KC_G KC_H
|
|
>;
|
|
|
|
bindings = <
|
|
&kp 20 &trans &kp 18 &kp 19
|
|
&kp 21 &kp 22 &kp 24 &kp 49>;
|
|
};
|
|
|
|
raise: layer_2 {
|
|
label = "RAISE";
|
|
keys = <
|
|
KC_E KC_F KC_G KC_H
|
|
KC_A KC_B KC_C KC_D
|
|
>;
|
|
|
|
bindings = <
|
|
&kp 5 &kp 0 &kp 10 &kp 11
|
|
&kp 1 &kp 2 &kp 4 &kp 89>;
|
|
};
|
|
};
|
|
};
|