forked from kofal.net/zmk
feat(behaviors): Add Tap-Dance behavior
This commit is contained in:
2
app/tests/tap-dance/1a-tap1/events.patterns
Normal file
2
app/tests/tap-dance/1a-tap1/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
5
app/tests/tap-dance/1a-tap1/keycode_events.snapshot
Normal file
5
app/tests/tap-dance/1a-tap1/keycode_events.snapshot
Normal file
@@ -0,0 +1,5 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
11
app/tests/tap-dance/1a-tap1/native_posix.keymap
Normal file
11
app/tests/tap-dance/1a-tap1/native_posix.keymap
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,200)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/1b-tap2/events.patterns
Normal file
2
app/tests/tap-dance/1b-tap2/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
7
app/tests/tap-dance/1b-tap2/keycode_events.snapshot
Normal file
7
app/tests/tap-dance/1b-tap2/keycode_events.snapshot
Normal file
@@ -0,0 +1,7 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
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
|
||||
13
app/tests/tap-dance/1b-tap2/native_posix.keymap
Normal file
13
app/tests/tap-dance/1b-tap2/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,200)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/1c-tap3/events.patterns
Normal file
2
app/tests/tap-dance/1c-tap3/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
9
app/tests/tap-dance/1c-tap3/keycode_events.snapshot
Normal file
9
app/tests/tap-dance/1c-tap3/keycode_events.snapshot
Normal file
@@ -0,0 +1,9 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00
|
||||
15
app/tests/tap-dance/1c-tap3/native_posix.keymap
Normal file
15
app/tests/tap-dance/1c-tap3/native_posix.keymap
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,200)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/2a-hold1/events.patterns
Normal file
2
app/tests/tap-dance/2a-hold1/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
5
app/tests/tap-dance/2a-hold1/keycode_events.snapshot
Normal file
5
app/tests/tap-dance/2a-hold1/keycode_events.snapshot
Normal file
@@ -0,0 +1,5 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
|
||||
11
app/tests/tap-dance/2a-hold1/native_posix.keymap
Normal file
11
app/tests/tap-dance/2a-hold1/native_posix.keymap
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,400)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/2b-hold2/events.patterns
Normal file
2
app/tests/tap-dance/2b-hold2/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
7
app/tests/tap-dance/2b-hold2/keycode_events.snapshot
Normal file
7
app/tests/tap-dance/2b-hold2/keycode_events.snapshot
Normal file
@@ -0,0 +1,7 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0xe2 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0xe2 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/2b-hold2/native_posix.keymap
Normal file
13
app/tests/tap-dance/2b-hold2/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
ZMK_MOCK_PRESS(0,0,400)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/2c-hold3/events.patterns
Normal file
2
app/tests/tap-dance/2c-hold3/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
9
app/tests/tap-dance/2c-hold3/keycode_events.snapshot
Normal file
9
app/tests/tap-dance/2c-hold3/keycode_events.snapshot
Normal file
@@ -0,0 +1,9 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0xe3 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0xe3 implicit_mods 0x00 explicit_mods 0x00
|
||||
15
app/tests/tap-dance/2c-hold3/native_posix.keymap
Normal file
15
app/tests/tap-dance/2c-hold3/native_posix.keymap
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
ZMK_MOCK_PRESS(0,0,400)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/3a-tap-int-mid/events.patterns
Normal file
2
app/tests/tap-dance/3a-tap-int-mid/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
10
app/tests/tap-dance/3a-tap-int-mid/keycode_events.snapshot
Normal file
10
app/tests/tap-dance/3a-tap-int-mid/keycode_events.snapshot
Normal file
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 2 created new tap dance
|
||||
td_binding_pressed: 2 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 1 created new tap dance
|
||||
td_binding_pressed: 1 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 1 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 2 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/3a-tap-int-mid/native_posix.keymap
Normal file
13
app/tests/tap-dance/3a-tap-int-mid/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/3b-tap-int-seq/events.patterns
Normal file
2
app/tests/tap-dance/3b-tap-int-seq/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
10
app/tests/tap-dance/3b-tap-int-seq/keycode_events.snapshot
Normal file
10
app/tests/tap-dance/3b-tap-int-seq/keycode_events.snapshot
Normal file
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 2 created new tap dance
|
||||
td_binding_pressed: 2 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 1 created new tap dance
|
||||
td_binding_pressed: 1 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 2 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 1 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/3b-tap-int-seq/native_posix.keymap
Normal file
13
app/tests/tap-dance/3b-tap-int-seq/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/3c-tap-int-after/events.patterns
Normal file
2
app/tests/tap-dance/3c-tap-int-after/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
10
app/tests/tap-dance/3c-tap-int-after/keycode_events.snapshot
Normal file
10
app/tests/tap-dance/3c-tap-int-after/keycode_events.snapshot
Normal file
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 2 created new tap dance
|
||||
td_binding_pressed: 2 tap dance pressed
|
||||
td_binding_released: 2 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 1 created new tap dance
|
||||
td_binding_pressed: 1 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 1 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/3c-tap-int-after/native_posix.keymap
Normal file
13
app/tests/tap-dance/3c-tap-int-after/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/3d-hold-int-mid/events.patterns
Normal file
2
app/tests/tap-dance/3d-hold-int-mid/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
10
app/tests/tap-dance/3d-hold-int-mid/keycode_events.snapshot
Normal file
10
app/tests/tap-dance/3d-hold-int-mid/keycode_events.snapshot
Normal file
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 1 created new tap dance
|
||||
td_binding_pressed: 1 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 1 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/3d-hold-int-mid/native_posix.keymap
Normal file
13
app/tests/tap-dance/3d-hold-int-mid/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,400)
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/3e-hold-int-seq/events.patterns
Normal file
2
app/tests/tap-dance/3e-hold-int-seq/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
10
app/tests/tap-dance/3e-hold-int-seq/keycode_events.snapshot
Normal file
10
app/tests/tap-dance/3e-hold-int-seq/keycode_events.snapshot
Normal file
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 1 created new tap dance
|
||||
td_binding_pressed: 1 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 1 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/3e-hold-int-seq/native_posix.keymap
Normal file
13
app/tests/tap-dance/3e-hold-int-seq/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,400)
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/3f-hold-int-after/events.patterns
Normal file
2
app/tests/tap-dance/3f-hold-int-after/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 0 created new tap dance
|
||||
td_binding_pressed: 0 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 0 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0xe1 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 1 created new tap dance
|
||||
td_binding_pressed: 1 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 1 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/3f-hold-int-after/native_posix.keymap
Normal file
13
app/tests/tap-dance/3f-hold-int-after/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,400)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/4a-single/events.patterns
Normal file
2
app/tests/tap-dance/4a-single/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
5
app/tests/tap-dance/4a-single/keycode_events.snapshot
Normal file
5
app/tests/tap-dance/4a-single/keycode_events.snapshot
Normal file
@@ -0,0 +1,5 @@
|
||||
td_binding_pressed: 1 created new tap dance
|
||||
td_binding_pressed: 1 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 1 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x16 implicit_mods 0x00 explicit_mods 0x00
|
||||
11
app/tests/tap-dance/4a-single/native_posix.keymap
Normal file
11
app/tests/tap-dance/4a-single/native_posix.keymap
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/5a-tdint-mid/events.patterns
Normal file
2
app/tests/tap-dance/5a-tdint-mid/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
10
app/tests/tap-dance/5a-tdint-mid/keycode_events.snapshot
Normal file
10
app/tests/tap-dance/5a-tdint-mid/keycode_events.snapshot
Normal file
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 2 created new tap dance
|
||||
td_binding_pressed: 2 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 3 created new tap dance
|
||||
td_binding_pressed: 3 tap dance pressed
|
||||
td_binding_released: 3 tap dance keybind released
|
||||
td_binding_released: 2 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/5a-tdint-mid/native_posix.keymap
Normal file
13
app/tests/tap-dance/5a-tdint-mid/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_PRESS(1,1,10)
|
||||
ZMK_MOCK_RELEASE(1,1,10)
|
||||
ZMK_MOCK_RELEASE(1,0,200)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/5b-tdint-seq/events.patterns
Normal file
2
app/tests/tap-dance/5b-tdint-seq/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
10
app/tests/tap-dance/5b-tdint-seq/keycode_events.snapshot
Normal file
10
app/tests/tap-dance/5b-tdint-seq/keycode_events.snapshot
Normal file
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 2 created new tap dance
|
||||
td_binding_pressed: 2 tap dance pressed
|
||||
kp_pressed: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 3 created new tap dance
|
||||
td_binding_pressed: 3 tap dance pressed
|
||||
td_binding_released: 2 tap dance keybind released
|
||||
kp_released: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_released: 3 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/5b-tdint-seq/native_posix.keymap
Normal file
13
app/tests/tap-dance/5b-tdint-seq/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_PRESS(1,1,10)
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_RELEASE(1,1,200)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/5c-tdint-after/events.patterns
Normal file
2
app/tests/tap-dance/5c-tdint-after/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
10
app/tests/tap-dance/5c-tdint-after/keycode_events.snapshot
Normal file
10
app/tests/tap-dance/5c-tdint-after/keycode_events.snapshot
Normal file
@@ -0,0 +1,10 @@
|
||||
td_binding_pressed: 2 created new tap dance
|
||||
td_binding_pressed: 2 tap dance pressed
|
||||
td_binding_released: 2 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 3 created new tap dance
|
||||
td_binding_pressed: 3 tap dance pressed
|
||||
td_binding_released: 3 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
13
app/tests/tap-dance/5c-tdint-after/native_posix.keymap
Normal file
13
app/tests/tap-dance/5c-tdint-after/native_posix.keymap
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_PRESS(1,1,10)
|
||||
ZMK_MOCK_RELEASE(1,1,200)
|
||||
>;
|
||||
};
|
||||
2
app/tests/tap-dance/5d-tdint-multiple/events.patterns
Normal file
2
app/tests/tap-dance/5d-tdint-multiple/events.patterns
Normal file
@@ -0,0 +1,2 @@
|
||||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*on_tap_dance_binding/td_binding/p
|
||||
@@ -0,0 +1,15 @@
|
||||
td_binding_pressed: 2 created new tap dance
|
||||
td_binding_pressed: 2 tap dance pressed
|
||||
td_binding_released: 2 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 3 created new tap dance
|
||||
td_binding_pressed: 3 tap dance pressed
|
||||
td_binding_released: 3 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00
|
||||
td_binding_pressed: 2 created new tap dance
|
||||
td_binding_pressed: 2 tap dance pressed
|
||||
td_binding_released: 2 tap dance keybind released
|
||||
kp_pressed: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x1e implicit_mods 0x00 explicit_mods 0x00
|
||||
15
app/tests/tap-dance/5d-tdint-multiple/native_posix.keymap
Normal file
15
app/tests/tap-dance/5d-tdint-multiple/native_posix.keymap
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_PRESS(1,1,10)
|
||||
ZMK_MOCK_RELEASE(1,1,10)
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_RELEASE(1,0,200)
|
||||
>;
|
||||
};
|
||||
60
app/tests/tap-dance/behavior_keymap.dtsi
Normal file
60
app/tests/tap-dance/behavior_keymap.dtsi
Normal file
@@ -0,0 +1,60 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
|
||||
/ {
|
||||
behaviors {
|
||||
ht: hold_tap {
|
||||
compatible = "zmk,behavior-hold-tap";
|
||||
label = "HOLD_TAP";
|
||||
#binding-cells = <2>;
|
||||
tapping-term-ms = <200>;
|
||||
quick_tap_ms = <0>;
|
||||
flavor = "tap-preferred";
|
||||
bindings = <&kp>, <&kp>;
|
||||
};
|
||||
|
||||
tdm: tap_dance_mixed {
|
||||
compatible = "zmk,behavior-tap-dance";
|
||||
label = "TAP_DANCE_MOD";
|
||||
#binding-cells = <0>;
|
||||
tapping-term-ms = <200>;
|
||||
bindings = <&ht LSHIFT A>, <&ht LALT B>, <&ht LGUI C>;
|
||||
};
|
||||
|
||||
tdb: tap_dance_basic {
|
||||
compatible = "zmk,behavior-tap-dance";
|
||||
label = "TAP_DANCE_BASIC";
|
||||
#binding-cells = <0>;
|
||||
tapping-term-ms = <200>;
|
||||
bindings = <&kp N1>, <&kp N2>, <&kp N3>;
|
||||
};
|
||||
|
||||
td2: tap_dance_basic_2 {
|
||||
compatible = "zmk,behavior-tap-dance";
|
||||
label = "TAP_DANCE_BASIC_2";
|
||||
#binding-cells = <0>;
|
||||
tapping-term-ms = <200>;
|
||||
bindings = <&kp A>, <&kp B>, <&kp C>;
|
||||
};
|
||||
|
||||
tds: tap_dance_single {
|
||||
compatible = "zmk,behavior-tap-dance";
|
||||
label = "TAP_DANCE_SINGlE";
|
||||
#binding-cells = <0>;
|
||||
tapping-term-ms = <200>;
|
||||
bindings = <&kp S>;
|
||||
};
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
label ="Default keymap";
|
||||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&tdm &tds
|
||||
&tdb &td2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user