aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/tests/toggle-layer/toggle-mode-off
diff options
context:
space:
mode:
Diffstat (limited to 'app/tests/toggle-layer/toggle-mode-off')
-rw-r--r--app/tests/toggle-layer/toggle-mode-off/events.patterns4
-rw-r--r--app/tests/toggle-layer/toggle-mode-off/keycode_events.snapshot14
-rw-r--r--app/tests/toggle-layer/toggle-mode-off/native_posix_64.keymap25
3 files changed, 43 insertions, 0 deletions
diff --git a/app/tests/toggle-layer/toggle-mode-off/events.patterns b/app/tests/toggle-layer/toggle-mode-off/events.patterns
new file mode 100644
index 0000000000..30996ad02d
--- /dev/null
+++ b/app/tests/toggle-layer/toggle-mode-off/events.patterns
@@ -0,0 +1,4 @@
+s/.*hid_listener_keycode/kp/p
+s/.*to_keymap_binding/to/p
+s/.*layer_changed/layer_changed/p
+s/.*tog_keymap_binding/tog/p \ No newline at end of file
diff --git a/app/tests/toggle-layer/toggle-mode-off/keycode_events.snapshot b/app/tests/toggle-layer/toggle-mode-off/keycode_events.snapshot
new file mode 100644
index 0000000000..94b7b3607e
--- /dev/null
+++ b/app/tests/toggle-layer/toggle-mode-off/keycode_events.snapshot
@@ -0,0 +1,14 @@
+tog_pressed: position 1 layer 1
+tog_released: position 1 layer 1
+kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
+kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
+to_pressed: position 3 layer 1
+layer_changed: layer 1 state 1
+to_released: position 3 layer 1
+kp_pressed: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00
+kp_released: usage_page 0x0C keycode 0xB5 implicit_mods 0x00 explicit_mods 0x00
+tog_pressed: position 1 layer 1
+layer_changed: layer 1 state 0
+tog_released: position 1 layer 1
+kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
+kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file
diff --git a/app/tests/toggle-layer/toggle-mode-off/native_posix_64.keymap b/app/tests/toggle-layer/toggle-mode-off/native_posix_64.keymap
new file mode 100644
index 0000000000..a89182fcc2
--- /dev/null
+++ b/app/tests/toggle-layer/toggle-mode-off/native_posix_64.keymap
@@ -0,0 +1,25 @@
+#include <dt-bindings/zmk/keys.h>
+#include <behaviors.dtsi>
+#include <dt-bindings/zmk/kscan_mock.h>
+#include "../behavior_keymap.dtsi"
+
+&tog {
+ toggle-mode = "off";
+};
+
+&kscan {
+ events = <
+ ZMK_MOCK_PRESS(0,1,10)
+ ZMK_MOCK_RELEASE(0,1,10)
+ ZMK_MOCK_PRESS(0,0,10)
+ ZMK_MOCK_RELEASE(0,0,10)
+ ZMK_MOCK_PRESS(1,1,10)
+ ZMK_MOCK_RELEASE(1,1,10)
+ ZMK_MOCK_PRESS(0,0,10)
+ ZMK_MOCK_RELEASE(0,0,10)
+ ZMK_MOCK_PRESS(0,1,10)
+ ZMK_MOCK_RELEASE(0,1,10)
+ ZMK_MOCK_PRESS(0,0,10)
+ ZMK_MOCK_RELEASE(0,0,10)
+ >;
+}; \ No newline at end of file