Skip to content

Commit

Permalink
use ZMK_LAYER and ZMK_MACRO
Browse files Browse the repository at this point in the history
  • Loading branch information
englmaxi authored and github-actions[bot] committed Nov 20, 2023
1 parent ca7e84b commit 3b03111
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 149 deletions.
115 changes: 28 additions & 87 deletions config/cradio.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -162,148 +162,89 @@ MAKE_HRM(hmr_par_lgt, &kp, &par_lgt, KEYS_L THUMBS)

/ {
macros {
par_macro: par_macro {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
ZMK_MACRO(par_macro,
bindings = <&kp DE_LPAR &kp DE_RPAR &kp LEFT>;
label = "PAR_MACRO";
};
)

bkt_macro: bkt_macro {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
ZMK_MACRO(bkt_macro,
bindings = <&kp DE_LBKT &kp DE_RBKT &kp LEFT>;
label = "BKT_MACRO";
};
)

sqt_macro: sqt_macro {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
ZMK_MACRO(sqt_macro,
bindings = <&kp DE_SQT &kp DE_SQT &kp LEFT>;
label = "SQT_MACRO";
};
)

dqt_macro: dqt_macro {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
ZMK_MACRO(dqt_macro,
bindings =
<&kp DE_DQT &kp DE_DQT>,
<&macro_release>,
<&kp LSHFT>,
<&macro_tap>,
<&kp LEFT>;
)

label = "DQT_MACRO";
};

brc_macro: brc_macro {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
ZMK_MACRO(brc_macro,
bindings = <&kp DE_LBRC &kp DE_RBRC &kp LEFT>;
label = "BRC_MACRO";
};
)

lgt_macro: lgt_macro {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
ZMK_MACRO(lgt_macro,
bindings =
<&kp DE_LT &kp DE_GT>,
<&macro_release>,
<&kp LSHFT>,
<&macro_tap>,
<&kp LEFT>;

label = "LGT_MACRO";
};
)
};
};

keymap {
compatible = "zmk,keymap";
ZMK_CONDITIONAL_LAYER(NAV NUM, HW)

base_layer {
bindings = <
ZMK_LAYER(base_layer,
&kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp DE_Y &td_sqt_dqt
&hml LGUI A &hml LALT R &hml LCTRL S &hml LSHIFT T &kp G &kp M &hmr RSHFT N &hmr LCTRL E &hmr LALT I &hmr LGUI O
&kp DE_Z &kp X &kp C &lt 6 D &kp V &kp K &kp H &kp DE_COMMA &kp DE_DOT &qexcl
&mo NAV &mt_td_scw LSHFT 0 &lt HW SPACE &mo NUM
>;

label = "DEF";
};
)

nav_layer {
bindings = <
ZMK_LAYER(nav_layer,
&kp ESC &kp LC(W) &kp LC(F) &kp BSPC &kp INS &trans &kp PG_DN &kp PG_UP &trans &trans
&sk LGUI &sk LALT &sk LCTRL &sk LSHFT &sk RALT &ht_home 0 LEFT &ht LC(END) DOWN &ht LC(HOME) UP &ht_end 0 RIGHT &kp PAUSE_BREAK
&kp LC(DE_Z) &kp LC(X) &kp LC(INS) &trans &kp LS(INS) &kp RET &ht LC(BSPC) BSPC &kp TAB &ht LC(DEL) DEL &kp PSCRN
&trans &trans &trans &trans
>;

label = "NAV";
};
)

num_layer {
bindings = <
ZMK_LAYER(num_layer,
&trans &trans &trans &trans &trans &kp DE_DOT &kp N7 &kp N8 &kp N9 &kp BSPC
&trans &trans &trans &trans &trans &kp DE_COMMA &kp N4 &kp N5 &kp N6 &kp RET
&trans &trans &trans &trans &trans &kp N0 &kp N1 &kp N2 &kp N3 &trans
&trans &trans &trans &trans
>;

label = "NUM";
};
)

fun_layer {
bindings = <
ZMK_LAYER(fun_layer,
&trans &kp C_VOL_DN &kp C_MUTE &kp C_VOL_UP &kp C_BRI_UP &kp F12 &kp F7 &kp F8 &kp F9 &kp LC(DE_PLUS)
&trans &trans &trans &trans &kp C_BRI_DN &kp F11 &kp F4 &kp F5 &kp F6 &kp LC(DE_MINUS)
&trans &kp C_PREV &kp C_PP &kp C_NEXT &trans &kp F10 &kp F1 &kp F2 &kp F3 &kp LC(N0)
&trans &trans &trans &trans
>;

label = "FUN";
};
)

hw_layer {
bindings = <
ZMK_LAYER(hw_layer,
&bootloader &trans &trans &trans &trans &trans &trans &trans &trans &bootloader
&trans &trans &out OUT_USB &out OUT_TOG &trans &trans &bt BT_NXT &out OUT_BLE &bt BT_CLR &trans
&trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans
&trans &trans &trans &trans
>;

label = "HW";
};
)

ger_layer {
bindings = <
ZMK_LAYER(ger_layer,
&trans &trans &trans &trans &trans &trans &trans &kp DE_U_UMLAUT &kp DE_ACUTE &kp DE_GRAVE
&kp DE_A_UMLAUT &trans &kp DE_ESZETT &trans &trans &trans &trans &trans &trans &kp DE_O_UMLAUT
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans
>;

label = "GER";
};
)

mouse_layer {
bindings = <
ZMK_LAYER(mouse_layer,
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &mkp MB4 &mkp MB3 &mkp MB5 &trans
&trans &trans &mkp LCLK &mkp RCLK
>;

label = "MSE";
};
};

conditional_layers {
compatible = "zmk,conditional-layers";

fun_cond {
if-layers = <1 2>;
then-layer = <4>;
};
};
};
)
38 changes: 19 additions & 19 deletions keymap-drawer/cradio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3b03111

Please sign in to comment.