zmk-config-ninepad/config/ninepad.keymap
2024-07-05 12:44:19 -05:00

158 lines
3.5 KiB
Text

#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
/ {
behaviors {
lgui1_1: lgui1_1 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI1_1";
bindings = <&kp LG(N1)>, <&to 1> ;
};
lgui2_2: lgui2_2 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI2_2";
bindings = <&kp LG(N2)>, <&to 2> ;
};
lgui3_3: lgui3_3 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI3_3";
bindings = <&kp LG(N3)>, <&to 3> ;
};
lgui4_4: lgui4_4 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI4_4";
bindings = <&kp LG(N4)>, <&to 4> ;
};
lgui5_5: lgui5_5 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI5_5";
bindings = <&kp LG(N5)>, <&to 5>, <&kp K_PLAY_PAUSE>;
};
lgui6_6: lgui6_6 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI6_6";
bindings = <&kp LG(N6)>, <&to 6>;
};
lgui7_7: lgui7_7 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI7_7";
bindings = <&kp LG(N7)>, <&to 7>;
};
lgui8_8: lgui8_8 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI8_8";
bindings = <&kp LG(N8)>, <&to 8>;
};
lgui9_9: lgui9_9 {
compatible = "zmk,behavior-tap-dance";
label = "LGUI9_9";
bindings = <&kp LG(N9)>, <&to 9>;
};
lgui3_media: lgui3_media {
compatible = "zmk,behavior-tap-dance";
label = "LGUI3_MEDIA";
#binding-cells = <0>;
bindings = <&kp LG(NUMBER_3)>, <&to 1>, <&kp K_PLAY_PAUSE>;
};
};
combos { compatible = "zmk,combos"; };
keymap {
compatible = "zmk,keymap";
label = "ninepad";
# layer 0
default_layer {
label = "Default";
bindings = <
&lgui7_7 &lgui8_8 &lgui9_9
&lgui4_4 &lgui5_5 &lgui6_6
&lgui1_1 &lgui2_2 &lgui3_3
>;
};
# layer 1
media {
bindings = <
&kp K_PREVIOUS &kp K_VOL_UP &kp RS(K_NEXT)
&kp K_PLAY_PAUSE &kp K_VOL_DN &trans
&to 0 &trans &trans
>;
};
# layer 2
bt_layer {
label = "bt";
bindings = <
&bootloader &none &bootloader
&none &kp A &bt BT_CLR
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2
>;
};
# layer 3
minecraft_1 {
bindings = <
&kp Q &kp W &kp E
&kp A &kp S &kp D
&kp LSHFT &kp LCTRL &kp SPACE
>;
};
# layer 4
minecraft_2 {
bindings = <
&kp Q &trans &trans
&kp ESCAPE &kp F &kp LS(TILDE)
&to 0 &trans &trans
>;
};
# layer 5
arrows {
bindings = <
&kp PG_DN &kp UP &kp PG_UP
&kp LEFT &kp UP &kp RIGHT
&kp HOME &kp ESC &kp END
>;
};
# layer 6
mouse {
bindings = <
&trans &trans &trans
&trans &trans &trans
&trans &trans &trans
>;
};
# layer 7
reset {
bindings = <
&trans &trans &to 0
&trans &trans &trans
&trans &trans &bootloader
>;
};
# layer 8
numpad {
bindings = <
&kp N7 &kp N8 &kp N9
&kp N4 &kp N5 &kp N6
&kp N1 &kp N2 &kp N3
>;
};
};
};