forked from kofal.net/zmk
Testing: split input test (#2762)
test(pointing): Add mock input device. New mock input device to generate input events for tests. test(split): Add peripheral input test. Test event propagation from peripheral input devices. fix(split): Proper scoping for local within switch. Minor compile fix. chore: Fix up test snapshots after logging changes. Adjust the test snapshots after logging changes to the central. fix(kscan): Don't fire last mock event twice. Fix a bug where the kscan mock would raise the last mock event twice before halting processing.
This commit is contained in:
31
app/tests/ble/split/peripheral-input/peripheral.overlay
Normal file
31
app/tests/ble/split/peripheral-input/peripheral.overlay
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
#include "shared.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <>;
|
||||
|
||||
/delete-property/ exit-after;
|
||||
};
|
||||
|
||||
/ {
|
||||
mock_input: mock_input {
|
||||
compatible = "zmk,input-mock";
|
||||
status = "okay";
|
||||
event-startup-delay = <4000>;
|
||||
event-period = <2000>;
|
||||
events
|
||||
= <INPUT_EV_REL INPUT_REL_X 100 0>
|
||||
, <INPUT_EV_REL INPUT_REL_Y 100 1>
|
||||
, <INPUT_EV_REL INPUT_REL_X 40 0>
|
||||
, <INPUT_EV_REL INPUT_REL_Y 50 1>
|
||||
;
|
||||
exit-after;
|
||||
};
|
||||
};
|
||||
|
||||
&split_input {
|
||||
device = <&mock_input>;
|
||||
};
|
||||
Reference in New Issue
Block a user