diff options
author | Nicolas Munnich <[email protected]> | 2024-12-13 00:13:56 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-12-12 19:13:56 -0500 |
commit | 4ef231f4bba87151acfbd1cf3babd83b69813e45 (patch) | |
tree | 4f8ed2da58aa8284d6fdc010983279140819f73a /app/tests/keytoggle/kt-off | |
parent | 7013158a6715d94b34e8c471ce25bb5005f3bb49 (diff) | |
download | zmk-4ef231f4bba87151acfbd1cf3babd83b69813e45.tar.gz zmk-4ef231f4bba87151acfbd1cf3babd83b69813e45.zip |
feat: Added `toggle-mode`, allowing toggle-on and toggle-off (#2555)
feat: added toggle mode to key and layer toggles
docs: documented toggle mode changes
Diffstat (limited to 'app/tests/keytoggle/kt-off')
-rw-r--r-- | app/tests/keytoggle/kt-off/events.patterns | 1 | ||||
-rw-r--r-- | app/tests/keytoggle/kt-off/keycode_events.snapshot | 4 | ||||
-rw-r--r-- | app/tests/keytoggle/kt-off/native_posix_64.keymap | 29 |
3 files changed, 34 insertions, 0 deletions
diff --git a/app/tests/keytoggle/kt-off/events.patterns b/app/tests/keytoggle/kt-off/events.patterns new file mode 100644 index 0000000000..833100f6ac --- /dev/null +++ b/app/tests/keytoggle/kt-off/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p
\ No newline at end of file diff --git a/app/tests/keytoggle/kt-off/keycode_events.snapshot b/app/tests/keytoggle/kt-off/keycode_events.snapshot new file mode 100644 index 0000000000..2440460586 --- /dev/null +++ b/app/tests/keytoggle/kt-off/keycode_events.snapshot @@ -0,0 +1,4 @@ +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: 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-off/native_posix_64.keymap b/app/tests/keytoggle/kt-off/native_posix_64.keymap new file mode 100644 index 0000000000..4abf6ee99d --- /dev/null +++ b/app/tests/keytoggle/kt-off/native_posix_64.keymap @@ -0,0 +1,29 @@ +#include "../behavior_keymap.dtsi" + +&kt { + toggle-mode = "off"; +}; + +&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 |