Skip to content

Commit

Permalink
Create macros.dtsi
Browse files Browse the repository at this point in the history
  • Loading branch information
jr5x1 authored Jun 18, 2024
1 parent d9a97a9 commit 95a8a74
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions config/includes/macros.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Make sure settings.dtsi is included before this file

/*
* Type Personal Email Macro
*
* Usage:
* - &m_type_email_p - Send macro
* - &ht_type_email 0 AT_SIGN - Send macro on hold / Send @ on tap
* - &td_at_email - Send at on tap, personal email on double tap and work email on tripple tap
*/
/ {
macros {

m_type_email_p: type_email_p {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <30>;
tap-ms = <40>;
bindings = <
&kp N &kp I &kp L
&kp AT_SIGN
&kp N &kp I &kp L &kp M &kp A &kp I &kp L
&kp DOT
&kp C &kp O
>;
};

m_type_email_w: type_email_w {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <30>;
tap-ms = <40>;
bindings = <
&kp H &kp O &kp S &kp T &kp M &kp A &kp S &kp T &kp E &kp R
&kp AT_SIGN
&kp I &kp N &kp F &kp U &kp S &kp E &kp D
&kp I &kp N &kp S &kp I &kp G &kp H &kp T
&kp DOT
&kp C &kp O &kp M
>;
};

m_type_md_code_block: m_type_md_code_block {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
// wait-ms = <20>;
// tap-ms = <20>;
bindings = <
&kp GRAVE &kp GRAVE &kp GRAVE &kp LS(RET)
&kp GRAVE &kp GRAVE &kp GRAVE &kp UP
>;
};
};


behaviors {

ht_type_email: ht_type_email {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
tapping-term-ms = <300>;
quick-tap-ms = <200>;
flavor = "tap-preferred";
bindings = <&m_type_email_p>, <&kp>;
};

td_at_email: td_at_email {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <300>;
bindings = <&kp AT_SIGN>, <&m_type_email_p>, <&m_type_email_w>;
};

};
};

0 comments on commit 95a8a74

Please sign in to comment.