feat(test): add testing for transparent
This commit is contained in:
parent
a722cbcea3
commit
e2f77f25c8
7 changed files with 42 additions and 0 deletions
22
app/tests/transparent/behavior_keymap.dtsi
Normal file
22
app/tests/transparent/behavior_keymap.dtsi
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/kscan-mock.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
label ="Default keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &mo 1
|
||||||
|
&kp A &none>;
|
||||||
|
};
|
||||||
|
|
||||||
|
lower_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &trans
|
||||||
|
&trans &kp A>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
1
app/tests/transparent/layered/events.patterns
Normal file
1
app/tests/transparent/layered/events.patterns
Normal file
|
@ -0,0 +1 @@
|
||||||
|
s/.*hid_listener_keycode/kp/p
|
2
app/tests/transparent/layered/keycode_events.snapshot
Normal file
2
app/tests/transparent/layered/keycode_events.snapshot
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
kp_pressed: usage_page 0x07 keycode 0x04
|
||||||
|
kp_released: usage_page 0x07 keycode 0x04
|
8
app/tests/transparent/layered/native_posix.keymap
Normal file
8
app/tests/transparent/layered/native_posix.keymap
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#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(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,1,10)>;
|
||||||
|
};
|
1
app/tests/transparent/normal/events.patterns
Normal file
1
app/tests/transparent/normal/events.patterns
Normal file
|
@ -0,0 +1 @@
|
||||||
|
s/.*hid_listener_keycode/kp/p
|
0
app/tests/transparent/normal/keycode_events.snapshot
Normal file
0
app/tests/transparent/normal/keycode_events.snapshot
Normal file
8
app/tests/transparent/normal/native_posix.keymap
Normal file
8
app/tests/transparent/normal/native_posix.keymap
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#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,0,10) ZMK_MOCK_RELEASE(0,0,10)>;
|
||||||
|
};
|
Loading…
Reference in a new issue