forked from kofal.net/zmk
test(core): Adding coverage for key pre-releasing.
Added cases for the two use cases I know of:
1. Rolling with key-repeat behavior
2. Rolling symbols that have the same base key, eg `+=`
This commit is contained in:
committed by
Pete Johanson
parent
933e369d7c
commit
dffdb2365e
2
app/tests/key-repeat/tap-when-rolling/events.patterns
Normal file
2
app/tests/key-repeat/tap-when-rolling/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode_//p
|
||||
s/.*hid_implicit_modifiers_//p
|
||||
@@ -0,0 +1,9 @@
|
||||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
press: Modifiers set to 0x00
|
||||
pressed: unregistering usage_page 0x07 keycode 0x04 since it was already pressed
|
||||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
press: Modifiers set to 0x00
|
||||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
release: Modifiers set to 0x00
|
||||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
release: Modifiers set to 0x00
|
||||
13
app/tests/key-repeat/tap-when-rolling/native_posix.keymap
Normal file
13
app/tests/key-repeat/tap-when-rolling/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
||||
13
app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap
Normal file
13
app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,1,9000)
|
||||
ZMK_MOCK_PRESS(0,0,30)
|
||||
ZMK_MOCK_RELEASE(0,1,30)
|
||||
ZMK_MOCK_RELEASE(0,0,3000)
|
||||
>;
|
||||
};
|
||||
Reference in New Issue
Block a user