forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commit of the following: commit 386b5d1 Author: urob <[email protected]> Date: Mon Jul 25 22:07:13 2022 -0400 Update expected test output Explicit mods no longer clear implicit mods that are being held. See zmkfirmware#1114 (comment) for details commit b4dad62 Author: urob <[email protected]> Date: Sun Jul 24 11:08:39 2022 -0400 Explain how to fully disable masked_mods commit 00a0235 Author: urob <[email protected]> Date: Sun Jul 24 11:05:44 2022 -0400 Add mod-morph tests commit bfba42f Author: urob <[email protected]> Date: Sun Jul 24 02:17:34 2022 -0400 Fix doc formatting commit 67412ed Author: urob <[email protected]> Date: Sun Jul 24 01:50:54 2022 -0400 Fix clang-format commit ebc127d Author: urob <[email protected]> Date: Sun Jul 24 01:04:13 2022 -0400 Update docs for mod-morph commit 44297de Author: urob <[email protected]> Date: Sun Jul 24 00:24:18 2022 -0400 Set masked-mods to mods if unspecified commit 7c647b0 Author: urob <[email protected]> Date: Mon Jul 18 20:31:24 2022 -0400 Trigger-mods are unused commit 4cf66a4 Author: urob <[email protected]> Date: Mon Jul 18 19:57:46 2022 -0400 Don't mask implicit mods commit 89dac4c Author: Kostas Karachalios <[email protected]> Date: Tue Jun 28 09:43:02 2022 +0200 Add some whitespace for clarity commit e96f516 Merge: 2cac694 ef3eb33 Author: Kostas Karachalios <[email protected]> Date: Mon Jun 27 21:11:20 2022 +0200 Merge remote-tracking branch 'origin/main' into masked-mod-morphs-untested commit 2cac694 Author: Kostas Karachalios <[email protected]> Date: Thu Feb 3 19:00:03 2022 +0100 feat(behaviors): Allow mod-morph to swallow mods Revert "fix(hid): Implicit mods on non-key page events" This reverts commit 6ef1e70. masked mods Unrevert "fix(hid): Implicit mods on non-key page events" Fix docs Lint code with clang-format
- Loading branch information
Showing
18 changed files
with
499 additions
and
10 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 |
---|---|---|
|
@@ -14,3 +14,6 @@ properties: | |
mods: | ||
type: int | ||
required: true | ||
masked_mods: | ||
type: int | ||
required: false |
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
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,4 @@ | ||
s/.*hid_listener_keycode_//p | ||
s/.*hid_register_mod/reg/p | ||
s/.*hid_unregister_mod/unreg/p | ||
s/.*zmk_hid_.*Modifiers set to /mods: Modifiers set to /p |
58 changes: 58 additions & 0 deletions
58
app/tests/mod-morph/default_mask_no_implicit/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,58 @@ | ||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x00 | ||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x00 | ||
pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 | ||
reg: Modifier 1 count 1 | ||
reg: Modifiers set to 0x02 | ||
mods: Modifiers set to 0x02 | ||
mods: Modifiers set to 0x00 | ||
pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x02 | ||
released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x02 | ||
released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 | ||
unreg: Modifier 1 count: 0 | ||
unreg: Modifier 1 released | ||
unreg: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x00 | ||
pressed: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 | ||
reg: Modifier 2 count 1 | ||
reg: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x04 | ||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x04 | ||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x04 | ||
released: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 | ||
unreg: Modifier 2 count: 0 | ||
unreg: Modifier 2 released | ||
unreg: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x00 | ||
pressed: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 | ||
reg: Modifier 2 count 1 | ||
reg: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x04 | ||
pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 | ||
reg: Modifier 1 count 1 | ||
reg: Modifiers set to 0x06 | ||
mods: Modifiers set to 0x06 | ||
mods: Modifiers set to 0x04 | ||
pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x06 | ||
released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x06 | ||
released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 | ||
unreg: Modifier 1 count: 0 | ||
unreg: Modifier 1 released | ||
unreg: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x04 | ||
released: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 | ||
unreg: Modifier 2 count: 0 | ||
unreg: Modifier 2 released | ||
unreg: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x00 |
56 changes: 56 additions & 0 deletions
56
app/tests/mod-morph/default_mask_no_implicit/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,56 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
|
||
|
||
&kscan { | ||
events = < | ||
/* A */ | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
|
||
/* B */ | ||
ZMK_MOCK_PRESS(1,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
|
||
/* LALT + A */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
|
||
/* LALT + B */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(1,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
>; | ||
}; | ||
|
||
/ { | ||
behaviors { | ||
mod_morph: mod_morph { | ||
compatible = "zmk,behavior-mod-morph"; | ||
label = "MOD_MORPH_TEST"; | ||
#binding-cells = <0>; | ||
bindings = <&kp A>, <&kp B>; | ||
mods = <(MOD_LSFT|MOD_RSFT)>; | ||
}; | ||
}; | ||
|
||
keymap { | ||
compatible = "zmk,keymap"; | ||
label ="Default keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&kp LEFT_ALT &mod_morph | ||
&kp LEFT_SHIFT &kp RIGHT_SHIFT | ||
>; | ||
}; | ||
}; | ||
}; |
4 changes: 4 additions & 0 deletions
4
app/tests/mod-morph/default_mask_yes_implicit/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_//p | ||
s/.*hid_register_mod/reg/p | ||
s/.*hid_unregister_mod/unreg/p | ||
s/.*zmk_hid_.*Modifiers set to /mods: Modifiers set to /p |
58 changes: 58 additions & 0 deletions
58
app/tests/mod-morph/default_mask_yes_implicit/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,58 @@ | ||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x00 | ||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x00 | ||
pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 | ||
reg: Modifier 1 count 1 | ||
reg: Modifiers set to 0x02 | ||
mods: Modifiers set to 0x02 | ||
mods: Modifiers set to 0x00 | ||
pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x02 explicit_mods 0x00 | ||
mods: Modifiers set to 0x02 | ||
mods: Modifiers set to 0x02 | ||
released: usage_page 0x07 keycode 0x05 implicit_mods 0x02 explicit_mods 0x00 | ||
mods: Modifiers set to 0x02 | ||
released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 | ||
unreg: Modifier 1 count: 0 | ||
unreg: Modifier 1 released | ||
unreg: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x00 | ||
pressed: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 | ||
reg: Modifier 2 count 1 | ||
reg: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x04 | ||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x04 | ||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
mods: Modifiers set to 0x04 | ||
released: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 | ||
unreg: Modifier 2 count: 0 | ||
unreg: Modifier 2 released | ||
unreg: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x00 | ||
pressed: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 | ||
reg: Modifier 2 count 1 | ||
reg: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x04 | ||
pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 | ||
reg: Modifier 1 count 1 | ||
reg: Modifiers set to 0x06 | ||
mods: Modifiers set to 0x06 | ||
mods: Modifiers set to 0x04 | ||
pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x02 explicit_mods 0x00 | ||
mods: Modifiers set to 0x06 | ||
mods: Modifiers set to 0x06 | ||
released: usage_page 0x07 keycode 0x05 implicit_mods 0x02 explicit_mods 0x00 | ||
mods: Modifiers set to 0x06 | ||
released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 | ||
unreg: Modifier 1 count: 0 | ||
unreg: Modifier 1 released | ||
unreg: Modifiers set to 0x04 | ||
mods: Modifiers set to 0x04 | ||
released: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 | ||
unreg: Modifier 2 count: 0 | ||
unreg: Modifier 2 released | ||
unreg: Modifiers set to 0x00 | ||
mods: Modifiers set to 0x00 |
56 changes: 56 additions & 0 deletions
56
app/tests/mod-morph/default_mask_yes_implicit/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,56 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
|
||
|
||
&kscan { | ||
events = < | ||
/* A */ | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
|
||
/* LSFT + B */ | ||
ZMK_MOCK_PRESS(1,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
|
||
/* LALT + A */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
|
||
/* LALT + LSFT + B */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(1,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_RELEASE(1,0,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
>; | ||
}; | ||
|
||
/ { | ||
behaviors { | ||
mod_morph: mod_morph { | ||
compatible = "zmk,behavior-mod-morph"; | ||
label = "MOD_MORPH_TEST"; | ||
#binding-cells = <0>; | ||
bindings = <&kp A>, <&kp LS(B)>; | ||
mods = <(MOD_LSFT|MOD_RSFT)>; | ||
}; | ||
}; | ||
|
||
keymap { | ||
compatible = "zmk,keymap"; | ||
label ="Default keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&kp LEFT_ALT &mod_morph | ||
&kp LEFT_SHIFT &kp RIGHT_SHIFT | ||
>; | ||
}; | ||
}; | ||
}; |
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_//p | ||
s/.*hid_register_mod/reg/p | ||
s/.*hid_unregister_mod/unreg/p | ||
s/.*zmk_hid_.*Modifiers set to /mods: Modifiers set to /p |
Oops, something went wrong.