Skip to content

Commit

Permalink
Add one more failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbb committed Dec 20, 2024
1 parent 5a26255 commit 7302c5d
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/tests/combo/other-key-release-2/events.patterns
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
s/.*hid_listener_keycode_//p
4 changes: 4 additions & 0 deletions app/tests/combo/other-key-release-2/keycode_events.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
57 changes: 57 additions & 0 deletions app/tests/combo/other-key-release-2/native_posix_64.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/kscan_mock.h>

/*
Combo on positions 01 and 23.

- press 2 and 3
- press 0
- release 2
- press 1
- release the rest

Both combos should actuate.
*/

/ {
combos {
compatible = "zmk,combos";

combo_a {
timeout-ms = <50>;
key-positions = <0 1>;
bindings = <&kp A>;
};

combo_b {
timeout-ms = <50>;
key-positions = <2 3>;
bindings = <&kp B>;
};
};

keymap {
compatible = "zmk,keymap";

default_layer {
bindings = <
&kp N0 &kp N1
&kp N2 &kp N3
>;
};
};
};

&kscan {
events = <
ZMK_MOCK_PRESS(1,0,10)
ZMK_MOCK_PRESS(1,1,10)
ZMK_MOCK_PRESS(0,0,10)
ZMK_MOCK_RELEASE(1,0,10)
ZMK_MOCK_PRESS(0,0,10)
ZMK_MOCK_RELEASE(1,1,0)
ZMK_MOCK_RELEASE(0,0,0)
ZMK_MOCK_RELEASE(0,1,0)
>;
};

0 comments on commit 7302c5d

Please sign in to comment.