2020-12-11 14:24:44 -08:00
|
|
|
#include <dt-bindings/zmk/keys.h>
|
|
|
|
#include <behaviors.dtsi>
|
2023-09-14 23:43:47 -07:00
|
|
|
#include <dt-bindings/zmk/kscan_mock.h>
|
2020-12-11 14:24:44 -08:00
|
|
|
|
|
|
|
&mt {
|
2023-04-22 21:25:56 -07:00
|
|
|
flavor = "hold-preferred";
|
2020-12-11 14:24:44 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* This test verifies that hold-tap keys can observe
|
|
|
|
* events which were released from combos.
|
|
|
|
*/
|
|
|
|
/ {
|
2023-04-22 21:25:56 -07:00
|
|
|
combos {
|
|
|
|
compatible = "zmk,combos";
|
|
|
|
combo_one {
|
|
|
|
timeout-ms = <100>;
|
|
|
|
key-positions = <0 2>;
|
|
|
|
bindings = <&kp Y>;
|
|
|
|
};
|
|
|
|
combo_two {
|
|
|
|
timeout-ms = <100>;
|
|
|
|
key-positions = <1 3>;
|
|
|
|
bindings = <&kp Z>;
|
|
|
|
};
|
|
|
|
};
|
2020-12-11 14:24:44 -08:00
|
|
|
|
2023-04-22 21:25:56 -07:00
|
|
|
keymap {
|
|
|
|
compatible = "zmk,keymap";
|
2020-12-11 14:24:44 -08:00
|
|
|
|
2023-04-22 21:25:56 -07:00
|
|
|
default_layer {
|
|
|
|
bindings = <
|
|
|
|
&mt LEFT_CONTROL A &mt RIGHT_CONTROL B
|
|
|
|
&none &none
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
};
|
2020-12-11 14:24:44 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
&kscan {
|
2023-04-22 21:25:56 -07:00
|
|
|
events = <
|
|
|
|
ZMK_MOCK_PRESS(0,0,0)
|
|
|
|
ZMK_MOCK_PRESS(0,1,300)
|
|
|
|
>;
|
2020-12-11 14:24:44 -08:00
|
|
|
};
|