aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/tests/pointing/mkp
diff options
context:
space:
mode:
Diffstat (limited to 'app/tests/pointing/mkp')
-rw-r--r--app/tests/pointing/mkp/events.patterns1
-rw-r--r--app/tests/pointing/mkp/keycode_events.snapshot10
-rw-r--r--app/tests/pointing/mkp/native_posix.keymap27
-rw-r--r--app/tests/pointing/mkp/native_posix_64.conf6
-rw-r--r--app/tests/pointing/mkp/native_posix_64.keymap27
5 files changed, 71 insertions, 0 deletions
diff --git a/app/tests/pointing/mkp/events.patterns b/app/tests/pointing/mkp/events.patterns
new file mode 100644
index 0000000000..2599345c2d
--- /dev/null
+++ b/app/tests/pointing/mkp/events.patterns
@@ -0,0 +1 @@
+s/.*zmk_hid_mouse_button_//p
diff --git a/app/tests/pointing/mkp/keycode_events.snapshot b/app/tests/pointing/mkp/keycode_events.snapshot
new file mode 100644
index 0000000000..ab58cc9575
--- /dev/null
+++ b/app/tests/pointing/mkp/keycode_events.snapshot
@@ -0,0 +1,10 @@
+press: Button 0 count 1
+press: Mouse buttons set to 0x01
+press: Button 1 count 1
+press: Mouse buttons set to 0x03
+release: Button 1 count: 0
+release: Button 1 released
+release: Mouse buttons set to 0x01
+release: Button 0 count: 0
+release: Button 0 released
+release: Mouse buttons set to 0x00
diff --git a/app/tests/pointing/mkp/native_posix.keymap b/app/tests/pointing/mkp/native_posix.keymap
new file mode 100644
index 0000000000..8e3071d431
--- /dev/null
+++ b/app/tests/pointing/mkp/native_posix.keymap
@@ -0,0 +1,27 @@
+#include <behaviors.dtsi>
+#include <dt-bindings/zmk/keys.h>
+#include <dt-bindings/zmk/kscan_mock.h>
+#include <dt-bindings/zmk/mouse.h>
+
+/ {
+ keymap {
+ compatible = "zmk,keymap";
+
+ default_layer {
+ bindings = <
+ &mkp LCLK &none
+ &none &mkp RCLK
+ >;
+ };
+ };
+};
+
+
+&kscan {
+ events = <
+ ZMK_MOCK_PRESS (0,0,100)
+ ZMK_MOCK_PRESS (1,1,100)
+ ZMK_MOCK_RELEASE(1,1, 10)
+ ZMK_MOCK_RELEASE(0,0, 10)
+ >;
+};
diff --git a/app/tests/pointing/mkp/native_posix_64.conf b/app/tests/pointing/mkp/native_posix_64.conf
new file mode 100644
index 0000000000..65ed54bb20
--- /dev/null
+++ b/app/tests/pointing/mkp/native_posix_64.conf
@@ -0,0 +1,6 @@
+CONFIG_GPIO=n
+CONFIG_ZMK_BLE=n
+CONFIG_LOG=y
+CONFIG_LOG_BACKEND_SHOW_COLOR=n
+CONFIG_ZMK_LOG_LEVEL_DBG=y
+CONFIG_ZMK_MOUSE=y
diff --git a/app/tests/pointing/mkp/native_posix_64.keymap b/app/tests/pointing/mkp/native_posix_64.keymap
new file mode 100644
index 0000000000..8e3071d431
--- /dev/null
+++ b/app/tests/pointing/mkp/native_posix_64.keymap
@@ -0,0 +1,27 @@
+#include <behaviors.dtsi>
+#include <dt-bindings/zmk/keys.h>
+#include <dt-bindings/zmk/kscan_mock.h>
+#include <dt-bindings/zmk/mouse.h>
+
+/ {
+ keymap {
+ compatible = "zmk,keymap";
+
+ default_layer {
+ bindings = <
+ &mkp LCLK &none
+ &none &mkp RCLK
+ >;
+ };
+ };
+};
+
+
+&kscan {
+ events = <
+ ZMK_MOCK_PRESS (0,0,100)
+ ZMK_MOCK_PRESS (1,1,100)
+ ZMK_MOCK_RELEASE(1,1, 10)
+ ZMK_MOCK_RELEASE(0,0, 10)
+ >;
+};