Skip to content

Commit c28bcc7

Browse files
rgb macro
1 parent 7598253 commit c28bcc7

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

config/corne.keymap

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <behaviors.dtsi>
88
#include <dt-bindings/zmk/bt.h>
99
#include <dt-bindings/zmk/keys.h>
10+
#include <dt-bindings/zmk/rgb.h>
1011

1112
/ {
1213
combos {
@@ -18,6 +19,24 @@
1819
};
1920
};
2021

22+
macros {
23+
rgblayer: rgblayer {
24+
compatible = "zmk,behavior-macro-two-param";
25+
#binding-cells = <2>;
26+
bindings =
27+
<&macro_param_2to2 &rgb_ug RGB_COLOR_HSB_CMD MACRO_PLACEHOLDER &macro_param_1to1>,
28+
<&macro_press>,
29+
<&mo MACRO_PLACEHOLDER>,
30+
<&macro_pause_for_release>,
31+
<&macro_release>,
32+
<&macro_param_1to1 &mo MACRO_PLACEHOLDER>,
33+
<&macro_tap>,
34+
<&rgb_ug RGB_TOG>;
35+
36+
label = "RGBLAYER";
37+
};
38+
};
39+
2140
keymap {
2241
compatible = "zmk,keymap";
2342

@@ -29,10 +48,10 @@
2948
// | GUI | LWR | SPC | | ENT | RSE | ALT |
3049

3150
bindings = <
32-
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
33-
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
34-
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
35-
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
51+
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
52+
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
53+
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
54+
&kp LGUI &mo 1 &rgblayer RGB_COLOR_HSB_VAL(0,88,50) 1 &kp RET &mo 2 &kp RALT
3655
>;
3756
};
3857

0 commit comments

Comments
 (0)