-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix(combos): hold-taps must observe released combo events
- Loading branch information
1 parent
fdf25c7
commit 013f865
Showing
4 changed files
with
53 additions
and
1 deletion.
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
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,2 @@ | ||
s/.*hid_listener_keycode_//p | ||
s/.*combo//p |
2 changes: 2 additions & 0 deletions
2
app/tests/combo/combos-and-holdtaps-2/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,2 @@ | ||
pressed: usage_page 0x07 keycode 0xe0 mods 0x00 | ||
pressed: usage_page 0x07 keycode 0xe4 mods 0x00 |
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,48 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan-mock.h> | ||
|
||
&mt { | ||
flavor = "hold-preferred"; | ||
}; | ||
|
||
/* This test verifies that hold-tap keys can observe | ||
* events which were released from combos. | ||
*/ | ||
/ { | ||
behaviors { | ||
combo_one { | ||
compatible = "zmk,behavior-combo"; | ||
label = "COMBO_ONE"; | ||
timeout-ms = <100>; | ||
key-positions = <0 2>; | ||
bindings = <&kp Y>; | ||
}; | ||
combo_two { | ||
compatible = "zmk,behavior-combo"; | ||
label = "COMBO_TWO"; | ||
timeout-ms = <100>; | ||
key-positions = <1 3>; | ||
bindings = <&kp Z>; | ||
}; | ||
}; | ||
|
||
keymap { | ||
compatible = "zmk,keymap"; | ||
label ="Default keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&mt LEFT_CONTROL A &mt RIGHT_CONTROL B | ||
&none &none | ||
>; | ||
}; | ||
}; | ||
}; | ||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,0) | ||
ZMK_MOCK_PRESS(0,1,300) | ||
>; | ||
}; |