aboutsummaryrefslogtreecommitdiff
path: root/config/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'config/util.h')
-rw-r--r--config/util.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/config/util.h b/config/util.h
index a658ea1..f515d75 100644
--- a/config/util.h
+++ b/config/util.h
@@ -1,4 +1,4 @@
-// Copyright 2024 [email protected]
+// Copyright 2025 [email protected]
// SPDX-License-Identifier: MIT
// clang-format off
@@ -9,13 +9,12 @@ combo_##name { \
key-positions = <keypos>; \
};
-#define TAP_DANCE(name, keypress1, keypress2) \
-td_##name: name { \
- compatible = "zmk,behavior-tap-dance"; \
- label = ###name; \
- #binding-cells = <0>; \
- tapping-term-ms = <200>; \
- bindings = <keypress1>, <keypress2>; \
+#define TAP_DANCE(name, kp1, kp2, kp3) \
+td_##name: name { \
+ compatible = "zmk,behavior-tap-dance"; \
+ #binding-cells = <0>; \
+ tapping-term-ms = <200>; \
+ bindings = <kp1>, <kp2>, <kp3>; \
};
#define HRML(k1,k2,k3,k4) &hm LALT k1 &hm LGUI k2 &hm LCTRL k3 &hm LSHFT k4
@@ -29,7 +28,6 @@ td_##name: name { \
behaviors {
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
- label = "HOMEROW_MODS";
#binding-cells = <2>;
tapping-term-ms = <130>;
quick-tap-ms = <160>;
@@ -39,30 +37,33 @@ td_##name: name { \
pnp: play_next_prev {
compatible = "zmk,behavior-tap-dance";
- label = "PLAY_NEXT_PREV";
#binding-cells = <0>;
tapping-term-ms = <210>;
bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>;
};
- TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC)
- TAP_DANCE(brkt, &kp LBKT, &kp RBKT)
- TAP_DANCE(min_dash, &kp MINUS, &emdash)
+ TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC, &none)
+ TAP_DANCE(brkt, &kp LBKT, &kp RBKT, &none)
+ TAP_DANCE(min_dash, &kp MINUS, &dbl_min, &emdash)
};
macros {
updir: updir {
- label = "UP_DIR";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&macro_tap &kp DOT &kp DOT &kp FSLH>;
};
+ dbl_min: dbl_min {
+ compatible = "zmk,behavior-macro";
+ #binding-cells = <0>;
+ bindings = <&macro_tap &kp MINUS &kp MINUS>;
+ };
emdash: emdash {
- label = "EM_DASH";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&macro_press &kp LSHFT &kp LCTRL>,
<&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
- <&macro_release &kp LSHFT &kp LCTRL>;
+ <&macro_release &kp LSHFT &kp LCTRL>,
+ <&macro_tap &kp SPACE &kp SPACE>;
};
};
};