1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
#include <dt-bindings/zmk/keys.h>
#include <behaviors.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";
bindings = <
&kp B &mo A &kp C &kp E
&kp D &kp G &kp F &kp Q>;
};
lower: layer_1 {
label = "LOWER";
bindings = <
&kp N &trans &kp O &kp Q
&kp L &kp J &kp P &kp K>;
};
raise: layer_2 {
label = "RAISE";
bindings = <
&kp W &kp U &kp I &kp N
&kp X &kp M &kp C &kp B>;
};
};
};
|