Behaviors: add tests for key-tap

Test covers left brace/bracket combination.
This commit is contained in:
Marco Sterbik 2022-02-21 23:25:36 +01:00
parent cb50620f9f
commit 919178a38e
4 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,17 @@
#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 = <
&kt LBRC &kt LBKT
&none &none
>;
};
};
};

View file

@ -0,0 +1 @@
s/.*hid_listener_keycode_//p

View file

@ -0,0 +1,4 @@
pressed: usage_page 0x07 keycode 0x2f implicit_mods 0x02 explicit_mods 0x00
released: usage_page 0x07 keycode 0x2f implicit_mods 0x02 explicit_mods 0x00
pressed: usage_page 0x07 keycode 0x2f implicit_mods 0x00 explicit_mods 0x00
released: usage_page 0x07 keycode 0x2f implicit_mods 0x00 explicit_mods 0x00

View file

@ -0,0 +1,10 @@
#include "../behavior_keymap.dtsi"
&kscan {
events = <
ZMK_MOCK_PRESS(0,0,10)
ZMK_MOCK_PRESS(0,1,10)
ZMK_MOCK_RELEASE(0,0,10)
ZMK_MOCK_RELEASE(0,1,10)
>;
};