aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/tests/keytoggle/kt-on
diff options
context:
space:
mode:
Diffstat (limited to 'app/tests/keytoggle/kt-on')
-rw-r--r--app/tests/keytoggle/kt-on/events.patterns1
-rw-r--r--app/tests/keytoggle/kt-on/keycode_events.snapshot6
-rw-r--r--app/tests/keytoggle/kt-on/native_posix_64.keymap30
3 files changed, 37 insertions, 0 deletions
diff --git a/app/tests/keytoggle/kt-on/events.patterns b/app/tests/keytoggle/kt-on/events.patterns
new file mode 100644
index 0000000000..833100f6ac
--- /dev/null
+++ b/app/tests/keytoggle/kt-on/events.patterns
@@ -0,0 +1 @@
+s/.*hid_listener_keycode_//p \ No newline at end of file
diff --git a/app/tests/keytoggle/kt-on/keycode_events.snapshot b/app/tests/keytoggle/kt-on/keycode_events.snapshot
new file mode 100644
index 0000000000..6954f3daa9
--- /dev/null
+++ b/app/tests/keytoggle/kt-on/keycode_events.snapshot
@@ -0,0 +1,6 @@
+pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
+pressed: unregistering usage_page 0x07 keycode 0x05 since it was already pressed
+pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
+pressed: unregistering usage_page 0x07 keycode 0x05 since it was already pressed
+pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00
+released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 \ No newline at end of file
diff --git a/app/tests/keytoggle/kt-on/native_posix_64.keymap b/app/tests/keytoggle/kt-on/native_posix_64.keymap
new file mode 100644
index 0000000000..964aa93bb8
--- /dev/null
+++ b/app/tests/keytoggle/kt-on/native_posix_64.keymap
@@ -0,0 +1,30 @@
+#include "../behavior_keymap.dtsi"
+
+&kt {
+ toggle-mode = "on";
+};
+
+
+&kscan {
+ events = <
+ ZMK_MOCK_PRESS(0,0,10)
+ ZMK_MOCK_RELEASE(0,0,10)
+ ZMK_MOCK_PRESS(1,1,10)
+ ZMK_MOCK_PRESS(0,0,10)
+ ZMK_MOCK_RELEASE(1,1,10)
+ ZMK_MOCK_RELEASE(0,0,10)
+ >;
+};
+
+/ {
+ keymap {
+ compatible = "zmk,keymap";
+
+ default_layer {
+ bindings = <
+ &kt B &trans
+ &trans &kp B
+ >;
+ };
+ };
+}; \ No newline at end of file