Skip to content

Commit

Permalink
Add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbb committed Jul 16, 2024
1 parent 7bd74a6 commit 672a399
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/tests/combo/other-key-release/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/keycode_events.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00
released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00
pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
34 changes: 34 additions & 0 deletions app/tests/combo/other-key-release/native_posix_64.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/kscan_mock.h>

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

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

keymap {
compatible = "zmk,keymap";

default_layer {
bindings = <&kp A &kp B &kp C>;
};
};
};

&kscan {
events = <
ZMK_MOCK_PRESS(0,2,10) // C
ZMK_MOCK_PRESS(0,0,10) // A
ZMK_MOCK_RELEASE(0,2,10) // C
ZMK_MOCK_PRESS(0,1,10) // B
ZMK_MOCK_RELEASE(0,0,0) // A
ZMK_MOCK_RELEASE(0,1,0) // B
>;
};

0 comments on commit 672a399

Please sign in to comment.