You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.4 KiB
80 lines
1.4 KiB
5 years ago
|
#include <dt-bindings/zmk/keys.h>
|
||
|
#include <zmk/kscan-mock.h>
|
||
|
|
||
|
/ {
|
||
|
chosen {
|
||
|
zmk,kscan = &kscan0;
|
||
|
zmk,keymap = &keymap0;
|
||
|
};
|
||
|
|
||
5 years ago
|
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 {
|
||
5 years ago
|
compatible = "zmk,kscan-mock";
|
||
5 years ago
|
label = "KSCAN_LEFT";
|
||
5 years ago
|
|
||
|
rows = <2>;
|
||
|
columns = <2>;
|
||
5 years ago
|
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)>;
|
||
5 years ago
|
};
|
||
|
|
||
5 years ago
|
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)>;
|
||
|
};
|
||
|
|
||
5 years ago
|
keymap0: keymap {
|
||
|
compatible = "zmk,keymap";
|
||
|
label ="Default keymap";
|
||
|
layers = <&default &lower &raise>;
|
||
|
};
|
||
|
|
||
|
layers {
|
||
|
compatible = "zmk,layers";
|
||
|
|
||
|
default: layer_0 {
|
||
|
label = "DEFAULT";
|
||
|
keys =
|
||
5 years ago
|
<
|
||
|
KC_A MT(MOD_LSFT, KC_B) KC_C KC_D
|
||
|
KC_E KC_F KC_G KC_H
|
||
|
>;
|
||
5 years ago
|
};
|
||
|
|
||
|
lower: layer_1 {
|
||
|
label = "LOWER";
|
||
5 years ago
|
keys = <
|
||
|
KC_A KC_B KC_C KC_D
|
||
|
KC_E KC_F KC_G KC_H
|
||
|
>;
|
||
5 years ago
|
};
|
||
|
|
||
|
raise: layer_2 {
|
||
|
label = "RAISE";
|
||
5 years ago
|
keys = <
|
||
|
KC_E KC_F KC_G KC_H
|
||
|
KC_A KC_B KC_C KC_D
|
||
|
>;
|
||
5 years ago
|
};
|
||
|
};
|
||
|
};
|