Skip to content

Commit

Permalink
fix 1
Browse files Browse the repository at this point in the history
  • Loading branch information
englmaxi authored Sep 22, 2024
1 parent caf81d7 commit 2919e81
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
10 changes: 5 additions & 5 deletions config/keymap/behaviors.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

#define MASKED(NAME, DISPLAY_NAME, MODS, BINDING) \
NAME: NAME { \
compatible = "zmk,behavior-mod-morph"; \
compatible = "zmk,behavior-mod-morph"; \
#binding-cells = <0>; \
bindings = <BINDING>, <BINDING>; \
mods = <MODS>; \
Expand All @@ -140,7 +140,7 @@
SM(sqt_dqt, Sqt-Dqt, &kp DE_SQT, &kp DE_DQT)
CM(qt_grv, Qt-Grv, &sqt_dqt, &kp DE_ACUTE)
SM(sqt_dqt_macro, Macro Sqt-Dqt, &sqt_macro, &dqt_macro)
SM(grv_dgrv, Grv-DGrqu &kp DE_GRAVE, &dgrv_macro)
SM(grv_dgrv, Grv-DGrqu, &kp DE_GRAVE, &dgrv_macro)

SM(lpar_lbkt, LPar-LBkt, &kp DE_LPAR, &kp DE_LBKT)
SM(rpar_rbkt, RPar-LBkt, &kp DE_RPAR, &kp DE_RBKT)
Expand Down Expand Up @@ -173,9 +173,9 @@
behaviors {
TD(td_sqt_dqt, Sqt-Dqt, &sqt_dqt, &sqt_dqt_macro)

TD(bts_0, BT0 Sel-Disc &bts 0, &bt BT_DISC 0)
TD(bts_1, BT1 Sel-Disc &bts 1, &bt BT_DISC 1)
TD(bts_2, BT2 Sel-Disc &bts 2, &bt BT_DISC 2)
TD(bts_0, BT0 Sel-Disc, &bts 0, &bt BT_DISC 0)
TD(bts_1, BT1 Sel-Disc, &bts 1, &bt BT_DISC 1)
TD(bts_2, BT2 Sel-Disc, &bts 2, &bt BT_DISC 2)

TD(kns_lock, CLCK-NLCK-SLCK, &kp CLCK, &kp KP_NLCK, &kp SLCK)

Expand Down
32 changes: 17 additions & 15 deletions config/keymap/macros.dtsi
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@

#define AP(NAME, SYM1, SYM2) \
MASKED(NAME ## _sym1_masked, (MOD_RSFT|MOD_LSFT), SYM1) \
MASKED(NAME ## _sym2_masked, (MOD_RSFT|MOD_LSFT), SYM2) \
ZMK_MACRO(NAME, \
bindings \
= <& ## NAME ## _sym1_masked> \
, <& ## NAME ## _sym2_masked> \
, <&left_masked>; \
#define AP(NAME, DISPLAY_NAME, SYM1, SYM2) \
MASKED(NAME ## _sym1_masked, DISPLAY_NAME (Base 1), (MOD_RSFT|MOD_LSFT), SYM1) \
MASKED(NAME ## _sym2_masked, DISPLAY_NAME (Base 2), (MOD_RSFT|MOD_LSFT), SYM2) \
ZMK_MACRO(NAME, \
bindings \
= <& ## NAME ## _sym1_masked> \
, <& ## NAME ## _sym2_masked> \
, <&left_masked>; \
display-name = "Macro DISPLAY_NAME"; \
)

/ {
macros {
AP(par_macro, &kp DE_LPAR, &kp DE_RPAR) // ( ) <-
AP(bkt_macro, &kp DE_LBKT, &kp DE_RBKT) // [ ] <-
AP(sqt_macro, &kp DE_SQT, &kp DE_SQT) // ' ' <-
AP(dqt_macro, &kp DE_DQT, &kp DE_DQT) // " " <-
AP(dgrv_macro, &kp DE_GRAVE, &kp DE_GRAVE) // ` ` <-
AP(brc_macro, &kp DE_LBRC, &kp DE_RBRC) // { } <-
AP(lgt_macro, &kp DE_LT, &kp DE_GT) // < > <-
AP(par_macro, ( ) <-, &kp DE_LPAR, &kp DE_RPAR)
AP(bkt_macro, [ ] <-, &kp DE_LBKT, &kp DE_RBKT)
AP(sqt_macro, ' ' <-, &kp DE_SQT, &kp DE_SQT)
AP(dqt_macro, " " <-, &kp DE_DQT, &kp DE_DQT)
AP(dgrv_macro, ` ` <-, &kp DE_GRAVE, &kp DE_GRAVE)
AP(brc_macro, { } <-, &kp DE_LBRC, &kp DE_RBRC)
AP(lgt_macro, < > <-, &kp DE_LT, &kp DE_GT)

ZMK_MACRO(qu,
bindings
= <&kp Q>
, <&u_masked>;
display-name = "Macro Qu";
)

ZMK_MACRO(r_mods,
Expand Down

0 comments on commit 2919e81

Please sign in to comment.