forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply global-quick-tap-ms PR zmkfirmware#1387
- Loading branch information
1 parent
a61eac9
commit 324f072
Showing
16 changed files
with
161 additions
and
33 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
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 @@ | ||
s/.*hid_listener_keycode_//p |
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,14 @@ | ||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
pressed: usage_page 0x07 keycode 0x1B implicit_mods 0x00 explicit_mods 0x00 | ||
released: usage_page 0x07 keycode 0x1B implicit_mods 0x00 explicit_mods 0x00 | ||
pressed: usage_page 0x07 keycode 0x1B implicit_mods 0x00 explicit_mods 0x00 | ||
released: usage_page 0x07 keycode 0x1B implicit_mods 0x00 explicit_mods 0x00 | ||
pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 | ||
pressed: usage_page 0x07 keycode 0x1C implicit_mods 0x00 explicit_mods 0x00 | ||
released: usage_page 0x07 keycode 0x1C implicit_mods 0x00 explicit_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,64 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan-mock.h> | ||
|
||
/ { | ||
combos { | ||
compatible = "zmk,combos"; | ||
combo_one { | ||
timeout-ms = <50>; | ||
key-positions = <0 1>; | ||
bindings = <&kp X>; | ||
global-quick-tap-ms = <100>; | ||
}; | ||
|
||
combo_two { | ||
timeout-ms = <50>; | ||
key-positions = <0 2>; | ||
bindings = <&kp Y>; | ||
}; | ||
}; | ||
|
||
keymap { | ||
compatible = "zmk,keymap"; | ||
label ="Default keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&kp A &kp B | ||
&kp C &kp D | ||
>; | ||
}; | ||
}; | ||
}; | ||
|
||
&kscan { | ||
events = < | ||
/* Tap A */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_RELEASE(0,0,60) | ||
/* Quick Tap A and B */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_RELEASE(0,1,200) | ||
/* Combo One */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
/* Combo One Again (shouldn't quick tap) */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
/* Tap A */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_RELEASE(0,0,60) | ||
/* Combo 2 */ | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(1,0,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_RELEASE(1,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
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
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
Oops, something went wrong.