forked from moergo-sc/zmk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yuanbin Shen
committed
Jun 6, 2023
1 parent
3e8f475
commit c72396a
Showing
21 changed files
with
209 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,5 @@ properties: | |
type: array | ||
required: false | ||
default: [] | ||
hold-trigger-on-release: | ||
type: boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/events.patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
12 changes: 12 additions & 0 deletions
12
app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ht_binding_pressed: 0 new undecided hold_tap | ||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 | ||
ht_decide: 0 decided hold-interrupt (balanced decision moment other-key-up) | ||
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 (balanced decision moment key-up) | ||
kp_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00 | ||
kp_pressed: usage_page 0x07 keycode 0x08 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 |
17 changes: 17 additions & 0 deletions
17
app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include "../behavior_keymap.dtsi" | ||
|
||
&ht_bal { hold-trigger-on-release; }; | ||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) // mod 1 | ||
ZMK_MOCK_PRESS(0,1,10) // mod 2 | ||
ZMK_MOCK_PRESS(1,1,10) // not trigger position | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
>; | ||
}; |
4 changes: 4 additions & 0 deletions
4
app/tests/hold-tap/balanced/7-positional/on-release-trigger/events.patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
12 changes: 12 additions & 0 deletions
12
app/tests/hold-tap/balanced/7-positional/on-release-trigger/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ht_binding_pressed: 0 new undecided hold_tap | ||
ht_decide: 0 decided hold-interrupt (balanced decision moment other-key-up) | ||
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 hold-interrupt (balanced decision moment other-key-up) | ||
kp_pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_released: usage_page 0x07 keycode 0xE0 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 |
17 changes: 17 additions & 0 deletions
17
app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include "../behavior_keymap.dtsi" | ||
|
||
&ht_bal { hold-trigger-on-release; }; | ||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) // mod 1 | ||
ZMK_MOCK_PRESS(0,1,10) // mod 2 | ||
ZMK_MOCK_PRESS(1,0,10) // trigger position | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
>; | ||
}; |
4 changes: 4 additions & 0 deletions
4
app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/events.patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
12 changes: 12 additions & 0 deletions
12
app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ht_binding_pressed: 0 new undecided hold_tap | ||
ht_decide: 0 decided hold-interrupt (hold-preferred 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 hold-interrupt (hold-preferred decision moment other-key-down) | ||
kp_pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_pressed: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_released: usage_page 0x07 keycode 0xE0 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 |
17 changes: 17 additions & 0 deletions
17
app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include "../behavior_keymap.dtsi" | ||
|
||
&ht_hold { hold-trigger-on-release; }; | ||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) // mod 1 | ||
ZMK_MOCK_PRESS(0,1,10) // mod 2 | ||
ZMK_MOCK_PRESS(1,1,10) // not trigger position | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
>; | ||
}; |
4 changes: 4 additions & 0 deletions
4
app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/events.patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
12 changes: 12 additions & 0 deletions
12
app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ht_binding_pressed: 0 new undecided hold_tap | ||
ht_decide: 0 decided hold-interrupt (hold-preferred 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 hold-interrupt (hold-preferred decision moment other-key-down) | ||
kp_pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_released: usage_page 0x07 keycode 0xE0 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 |
17 changes: 17 additions & 0 deletions
17
app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include "../behavior_keymap.dtsi" | ||
|
||
&ht_hold { hold-trigger-on-release; }; | ||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) // mod 1 | ||
ZMK_MOCK_PRESS(0,1,10) // mod 2 | ||
ZMK_MOCK_PRESS(1,0,10) // trigger position | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
>; | ||
}; |
4 changes: 4 additions & 0 deletions
4
app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/events.patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
12 changes: 12 additions & 0 deletions
12
app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ht_binding_pressed: 0 new undecided hold_tap | ||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 | ||
ht_decide: 0 decided tap (tap-preferred decision moment key-up) | ||
kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 | ||
ht_binding_pressed: 1 new undecided hold_tap | ||
ht_decide: 1 decided tap (tap-preferred decision moment key-up) | ||
kp_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00 | ||
kp_pressed: usage_page 0x07 keycode 0x08 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 0x09 implicit_mods 0x00 explicit_mods 0x00 | ||
ht_binding_released: 0 cleaning up hold-tap |
17 changes: 17 additions & 0 deletions
17
app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include "../behavior_keymap.dtsi" | ||
|
||
&tp { hold-trigger-on-release; }; | ||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) // mod 1 | ||
ZMK_MOCK_PRESS(0,1,10) // mod 2 | ||
ZMK_MOCK_PRESS(1,1,10) // not trigger position | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
>; | ||
}; |
4 changes: 4 additions & 0 deletions
4
app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/events.patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
12 changes: 12 additions & 0 deletions
12
app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ht_binding_pressed: 0 new undecided hold_tap | ||
ht_decide: 0 decided tap (tap-preferred decision moment key-up) | ||
kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 | ||
ht_binding_pressed: 1 new undecided hold_tap | ||
ht_decide: 1 decided tap (tap-preferred decision moment key-up) | ||
kp_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00 | ||
kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 | ||
kp_released: usage_page 0x07 keycode 0x07 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 0x09 implicit_mods 0x00 explicit_mods 0x00 | ||
ht_binding_released: 0 cleaning up hold-tap |
17 changes: 17 additions & 0 deletions
17
app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include "../behavior_keymap.dtsi" | ||
|
||
&tp { hold-trigger-on-release; }; | ||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) // mod 1 | ||
ZMK_MOCK_PRESS(0,1,10) // mod 2 | ||
ZMK_MOCK_PRESS(1,0,10) // trigger position | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters