-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
1 parent
9650e40
commit ae249be
Showing
11 changed files
with
256 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2024 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include <dt-bindings/zmk/behaviors.h> | ||
|
||
/ { | ||
behaviors { | ||
#if ZMK_BEHAVIOR_OMIT(TAPDANCE) | ||
/omit-if-no-ref/ | ||
#endif | ||
td: tap_dance_kp { | ||
compatible = "zmk,behavior-tap-dance-param"; | ||
#binding-cells = <2>; | ||
bindings = <&kp PLACEHOLDER>, <&kp PLACEHOLDER>; | ||
display-name = "Tap-Dance"; | ||
tapping-term-ms = <200>; | ||
binding-params = <BINDING_PARAM(1,0) BINDING_PARAM(2,0)>; | ||
}; | ||
}; | ||
}; |
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,6 @@ | ||
# Copyright (c) 2024 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
properties: | ||
binding-params: | ||
type: array |
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,10 @@ | ||
# Copyright (c) 2024 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
properties: | ||
bindings: | ||
type: phandle-array | ||
required: true | ||
tapping-term-ms: | ||
type: int | ||
default: 200 |
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,8 @@ | ||
# Copyright (c) 2024 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
description: Tap Dance Behavior | ||
|
||
compatible: "zmk,behavior-tap-dance-param" | ||
|
||
include: [two_param.yaml, tap_dance_base.yaml, binding_params.yaml] |
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,2 @@ | ||
s/.*hid_listener_keycode/kp/p | ||
s/.*on_tap_dance_binding/td_binding/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,63 @@ | ||
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 | ||
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 | ||
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 0x06 implicit_mods 0x00 explicit_mods 0x00 | ||
td_binding_released: 0 tap dance keybind released | ||
kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 | ||
td_binding_pressed: 1 created new tap dance | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 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: 1 created new tap dance | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 tap dance keybind released | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 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: 1 created new tap dance | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 tap dance keybind released | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 tap dance keybind released | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 tap dance keybind released | ||
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 | ||
td_binding_pressed: 1 created new tap dance | ||
td_binding_pressed: 1 tap dance pressed | ||
kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
td_binding_released: 1 tap dance keybind released | ||
kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
td_binding_pressed: 1 created new tap dance | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 tap dance keybind released | ||
td_binding_pressed: 1 tap dance pressed | ||
kp_pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 | ||
td_binding_released: 1 tap dance keybind released | ||
kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 | ||
td_binding_pressed: 1 created new tap dance | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 tap dance keybind released | ||
td_binding_pressed: 1 tap dance pressed | ||
td_binding_released: 1 tap dance keybind released | ||
td_binding_pressed: 1 tap dance pressed | ||
kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 | ||
td_binding_released: 1 tap dance keybind released | ||
kp_released: usage_page 0x07 keycode 0x05 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,89 @@ | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
|
||
#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"; | ||
#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-param"; | ||
#binding-cells = <2>; | ||
tapping-term-ms = <100>; | ||
bindings = <&ht PLACEHOLDER PLACEHOLDER>, <&ht C PLACEHOLDER>, <&ht PLACEHOLDER D>; | ||
binding-params = <BINDING_PARAM(2,1) BINDING_PARAM(0,1) BINDING_PARAM(2,0)>; | ||
}; | ||
|
||
td2: tap_dance_basic { | ||
compatible = "zmk,behavior-tap-dance-param"; | ||
#binding-cells = <2>; | ||
tapping-term-ms = <100>; | ||
bindings = <&kp PLACEHOLDER>, <&kp B>, <&kp PLACEHOLDER>; | ||
binding-params = <BINDING_PARAM(1,0) BINDING_PARAM(0,0) BINDING_PARAM(2,0)>; | ||
}; | ||
}; | ||
|
||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&td2 A C &tdm A B | ||
&trans &trans >; | ||
}; | ||
}; | ||
}; | ||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_RELEASE(0,0,110) | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_RELEASE(0,0,110) | ||
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,110) | ||
|
||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,110) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,110) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,110) | ||
|
||
ZMK_MOCK_PRESS(0,1,410) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_PRESS(0,1,410) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_PRESS(0,1,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
ZMK_MOCK_PRESS(0,1,410) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
>; | ||
}; |