split tests in two

This commit is contained in:
Jamie Ding 2022-03-20 02:09:54 +00:00
parent ddc022c291
commit 60d363f103
8 changed files with 53 additions and 33 deletions

View file

@ -1,29 +0,0 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/kscan_mock.h>
#include "behavior_keymap.dtsi"
&kscan {
events = <
ZMK_MOCK_PRESS( 1,1,10)
ZMK_MOCK_PRESS( 0,1,10)
ZMK_MOCK_RELEASE(0,1,10)
ZMK_MOCK_RELEASE(1,1,10)
//ZMK_MOCK_PRESS( 0,0,10)
//ZMK_MOCK_PRESS( 0,1,10)
//ZMK_MOCK_RELEASE(0,1,10)
//ZMK_MOCK_RELEASE(0,0,10)
//
//ZMK_MOCK_PRESS( 1,0,10)
//ZMK_MOCK_PRESS( 1,1,10)
//ZMK_MOCK_RELEASE(1,1,10)
//ZMK_MOCK_RELEASE(1,0,10)
>;
};

View file

@ -0,0 +1,6 @@
mo_pressed: position 0 layer 1
kp_pressed: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
kp_pressed: usage_page 0x07 keycode 0x13 implicit_mods 0x00 explicit_mods 0x00
kp_released: usage_page 0x07 keycode 0x13 implicit_mods 0x00 explicit_mods 0x00
mo_released: position 0 layer 1
kp_released: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/kscan_mock.h>
#include "../behavior_keymap.dtsi"
&kscan {
events = <
ZMK_MOCK_PRESS( 1,0,10)
ZMK_MOCK_PRESS( 1,1,10)
ZMK_MOCK_RELEASE(1,1,10)
ZMK_MOCK_RELEASE(1,0,10)
>;
};

View file

@ -19,10 +19,13 @@
#binding-cells = <0>; #binding-cells = <0>;
wait-ms = <1>; wait-ms = <1>;
bindings bindings
// tog doesn't work, the tog on release doesn't seem to fire //= <&macro_press &mo RAISE &kp LSHFT>
= <&macro_press &mo RAISE &kp LSHFT> = <&macro_press &mo RAISE>
, <&macro_press &kp LSHFT>
, <&macro_pause_for_release> , <&macro_pause_for_release>
, <&macro_release &mo RAISE &kp LSHFT> //, <&macro_release &mo RAISE &kp LSHFT>
, <&macro_release &mo RAISE>
, <&macro_release &kp LSHFT>
; ;
}; };
}; };
@ -51,7 +54,7 @@
raise_layer { raise_layer {
bindings = < bindings = <
&mth L M &kp N &kp M &kp N
&kp O &kp P>; &kp O &kp P>;
}; };
}; };

View file

@ -0,0 +1,2 @@
s/.*hid_listener_keycode/kp/p
s/.*mo_keymap_binding/mo/p

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/kscan_mock.h>
#include "../behavior_keymap.dtsi"
&kscan {
events = <
ZMK_MOCK_PRESS( 0,0,10)
ZMK_MOCK_PRESS( 0,1,10)
ZMK_MOCK_RELEASE(0,1,10)
ZMK_MOCK_RELEASE(0,0,10)
>;
};