diff --git a/app/tests/jamie/README.md b/app/tests/jamie/README.md new file mode 100644 index 00000000..0630132d --- /dev/null +++ b/app/tests/jamie/README.md @@ -0,0 +1 @@ +Refer to the pdf/open document "zmk-modtap-proposal.{pdf,odt}" in this directory for a visual representation of the numbered tests for hold-tap. diff --git a/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/events.patterns b/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/events.patterns new file mode 100644 index 00000000..fdf2b15c --- /dev/null +++ b/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*on_hold_tap_binding/ht_binding/p +s/.*decide_hold_tap/ht_decide/p \ No newline at end of file diff --git a/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/keycode_events.snapshot b/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/keycode_events.snapshot new file mode 100644 index 00000000..311a7a70 --- /dev/null +++ b/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/keycode_events.snapshot @@ -0,0 +1,10 @@ +ht_binding_pressed: 0 new undecided hold_tap +ht_decide: 0 decided hold-interrupt (tap-unless-interrupted decision moment other-key-down) +kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_pressed: 1 new undecided hold_tap +ht_decide: 1 decided tap (tap-unless-interrupted decision moment key-up) +kp_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 1 cleaning up hold-tap +kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 0 cleaning up hold-tap diff --git a/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap new file mode 100644 index 00000000..eeb2084d --- /dev/null +++ b/app/tests/jamie/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -0,0 +1,15 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(0,1,400) + /* timer 0 fires */ + /* timer 1 fires */ + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; \ No newline at end of file diff --git a/app/tests/jamie/tap-unless-interrupted/behavior_keymap.dtsi b/app/tests/jamie/tap-unless-interrupted/behavior_keymap.dtsi new file mode 100644 index 00000000..2329ecc8 --- /dev/null +++ b/app/tests/jamie/tap-unless-interrupted/behavior_keymap.dtsi @@ -0,0 +1,31 @@ +#include +#include +#include + + + +/ { + behaviors { + ht_tui: behavior_hold_tap_tap_unless_interrupted { + compatible = "zmk,behavior-hold-tap"; + label = "hold_tap_tap_unless_interrupted"; + #binding-cells = <2>; + flavor = "tap-unless-interrupted"; + tapping-term-ms = <300>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + hold-trigger-key-positions = <1>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &ht_tui LEFT_SHIFT F &ht_tui LEFT_CONTROL J + &kp D &kp RIGHT_CONTROL>; + }; + }; +}; diff --git a/app/tests/jamie/zmk-modtap-proposal.odg b/app/tests/jamie/zmk-modtap-proposal.odg new file mode 100644 index 00000000..82f84369 Binary files /dev/null and b/app/tests/jamie/zmk-modtap-proposal.odg differ diff --git a/app/tests/jamie/zmk-modtap-proposal.pdf b/app/tests/jamie/zmk-modtap-proposal.pdf new file mode 100644 index 00000000..33048ca1 Binary files /dev/null and b/app/tests/jamie/zmk-modtap-proposal.pdf differ