Unit test for ignore-modifiers bug
This commit is contained in:
parent
c23443a086
commit
7a4f3a261d
3 changed files with 59 additions and 0 deletions
1
app/tests/sticky-keys/11-sl-sk-macro/events.patterns
Normal file
1
app/tests/sticky-keys/11-sl-sk-macro/events.patterns
Normal file
|
@ -0,0 +1 @@
|
|||
s/.*hid_listener_keycode_//p
|
|
@ -0,0 +1,4 @@
|
|||
pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
|
||||
released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
|
54
app/tests/sticky-keys/11-sl-sk-macro/native_posix_64.keymap
Normal file
54
app/tests/sticky-keys/11-sl-sk-macro/native_posix_64.keymap
Normal file
|
@ -0,0 +1,54 @@
|
|||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
|
||||
&sl {
|
||||
ignore-modifiers;
|
||||
};
|
||||
|
||||
/ {
|
||||
macros {
|
||||
sls: sls {
|
||||
label = "sticky_layer_shift";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
wait-ms = <0>;
|
||||
tap-ms = <1>;
|
||||
bindings
|
||||
= <&sl 1 &sk LSHFT>;
|
||||
};
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
label ="Default keymap";
|
||||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&sls &kp A
|
||||
&sl 1 &sk LSHFT
|
||||
>;
|
||||
};
|
||||
|
||||
second_layer {
|
||||
bindings = <
|
||||
&trans &kp B
|
||||
&trans &trans
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10) // macro should produce same as sl followd by sk
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
// ZMK_MOCK_PRESS(1,0,10)
|
||||
// ZMK_MOCK_RELEASE(1,0,10)
|
||||
// ZMK_MOCK_PRESS(1,1,10)
|
||||
// ZMK_MOCK_RELEASE(1,1,10)
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
>;
|
||||
};
|
Loading…
Add table
Reference in a new issue