Skip to content

Commit

Permalink
add ZMK_MACRO_DTL
Browse files Browse the repository at this point in the history
  • Loading branch information
englmaxi committed Nov 20, 2023
1 parent f8a0a13 commit bd4e1aa
Showing 1 changed file with 41 additions and 36 deletions.
77 changes: 41 additions & 36 deletions config/cradio.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -160,43 +160,48 @@ MAKE_HRM(hmr_lpar_lt, &kp, &lpar_lt, KEYS_L THUMBS)
MAKE_HRM(hmr_rpar_gt, &kp, &rpar_gt, KEYS_L THUMBS)
MAKE_HRM(hmr_par_lgt, &kp, &par_lgt, KEYS_L THUMBS)

/ {
macros {
ZMK_MACRO(par_macro,
bindings = <&kp DE_LPAR &kp DE_RPAR &kp LEFT>;
)

ZMK_MACRO(bkt_macro,
bindings = <&kp DE_LBKT &kp DE_RBKT &kp LEFT>;
)

ZMK_MACRO(sqt_macro,
bindings = <&kp DE_SQT &kp DE_SQT &kp LEFT>;
)

ZMK_MACRO(dqt_macro,
bindings =
<&kp DE_DQT &kp DE_DQT>,
<&macro_release>,
<&kp LSHFT>,
<&macro_tap>,
<&kp LEFT>;
)

ZMK_MACRO(brc_macro,
bindings = <&kp DE_LBRC &kp DE_RBRC &kp LEFT>;
)

ZMK_MACRO(lgt_macro,
bindings =
<&kp DE_LT &kp DE_GT>,
<&macro_release>,
<&kp LSHFT>,
<&macro_tap>,
<&kp LEFT>;
)
// macros
#define ZMK_MACRO_DTL(name,...) \
/ { \
macros { \
ZMK_MACRO(name, \
__VA__ARGS__ \
) \
}; \
};
};

ZMK_MACRO_DTL(par_macro,
bindings = <&kp DE_LPAR &kp DE_RPAR &kp LEFT>;
)
ZMK_MACRO_DTL(bkt_macro,
bindings = <&kp DE_LBKT &kp DE_RBKT &kp LEFT>;
)

ZMK_MACRO_DTL(sqt_macro,
bindings = <&kp DE_SQT &kp DE_SQT &kp LEFT>;
)

ZMK_MACRO_DTL(dqt_macro,
bindings =
<&kp DE_DQT &kp DE_DQT>,
<&macro_release>,
<&kp LSHFT>,
<&macro_tap>,
<&kp LEFT>;
)

ZMK_MACRO_DTL(brc_macro,
bindings = <&kp DE_LBRC &kp DE_RBRC &kp LEFT>;
)

ZMK_MACRO_DTL(lgt_macro,
bindings =
<&kp DE_LT &kp DE_GT>,
<&macro_release>,
<&kp LSHFT>,
<&macro_tap>,
<&kp LEFT>;
)

ZMK_CONDITIONAL_LAYER(NAV NUM, HW)

Expand Down

0 comments on commit bd4e1aa

Please sign in to comment.