Browse Source

feat(test): add tests for none behavior

xmkb
Cody McGinnis 4 years ago
parent
commit
3d325ccb84
  1. 22
      app/tests/none/behavior_keymap.dtsi
  2. 1
      app/tests/none/layered/events.patterns
  3. 0
      app/tests/none/layered/keycode_events.snapshot
  4. 8
      app/tests/none/layered/native_posix.keymap
  5. 1
      app/tests/none/normal/events.patterns
  6. 0
      app/tests/none/normal/keycode_events.snapshot
  7. 8
      app/tests/none/normal/native_posix.keymap

22
app/tests/none/behavior_keymap.dtsi

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/kscan-mock.h>
/ {
keymap {
compatible = "zmk,keymap";
label ="Default keymap";
default_layer {
bindings = <
&none &mo 1
&kp A &none>;
};
lower_layer {
bindings = <
&none &trans
&none &kp A>;
};
};
};

1
app/tests/none/layered/events.patterns

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

0
app/tests/none/layered/keycode_events.snapshot

8
app/tests/none/layered/native_posix.keymap

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
#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,1,10) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,1,10)>;
};

1
app/tests/none/normal/events.patterns

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

0
app/tests/none/normal/keycode_events.snapshot

8
app/tests/none/normal/native_posix.keymap

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
#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_RELEASE(0,0,10)>;
};
Loading…
Cancel
Save