diff options
Diffstat (limited to 'app/tests/combo/combos-and-holdtaps-1')
3 files changed, 48 insertions, 0 deletions
diff --git a/app/tests/combo/combos-and-holdtaps-1/events.patterns b/app/tests/combo/combos-and-holdtaps-1/events.patterns new file mode 100644 index 0000000..b90d786 --- /dev/null +++ b/app/tests/combo/combos-and-holdtaps-1/events.patterns @@ -0,0 +1,2 @@ +s/.*hid_listener_keycode_//p +s/.*combo//p
\ No newline at end of file diff --git a/app/tests/combo/combos-and-holdtaps-1/keycode_events.snapshot b/app/tests/combo/combos-and-holdtaps-1/keycode_events.snapshot new file mode 100644 index 0000000..dc4dbb4 --- /dev/null +++ b/app/tests/combo/combos-and-holdtaps-1/keycode_events.snapshot @@ -0,0 +1,4 @@ +pressed: usage_page 0x07 keycode 0x1c mods 0x00 +pressed: usage_page 0x07 keycode 0x06 mods 0x00 +released: usage_page 0x07 keycode 0x1c mods 0x00 +released: usage_page 0x07 keycode 0x06 mods 0x00 diff --git a/app/tests/combo/combos-and-holdtaps-1/native_posix.keymap b/app/tests/combo/combos-and-holdtaps-1/native_posix.keymap new file mode 100644 index 0000000..a99c15d --- /dev/null +++ b/app/tests/combo/combos-and-holdtaps-1/native_posix.keymap @@ -0,0 +1,42 @@ +#include <dt-bindings/zmk/keys.h> +#include <behaviors.dtsi> +#include <dt-bindings/zmk/kscan-mock.h> + +&mt { + flavor = "hold-preferred"; +}; + +/* this test checks if hold-taps can be part of a combo */ +/ { + combos { + compatible = "zmk,combos"; + combo_two { + timeout-ms = <100>; + key-positions = <0 1>; + bindings = <&kp Y>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &mt LEFT_CONTROL A &kp B + &kp C &none + >; + }; + }; +}; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,2,10) + >; +};
\ No newline at end of file |