|
3 | 3 | #include <dt-bindings/zmk/bt.h>
|
4 | 4 | #include <dt-bindings/zmk/outputs.h>
|
5 | 5 |
|
6 |
| -#define DEFAULT 0 |
7 |
| -#define MAC 1 |
8 |
| -#define LOWER 2 |
9 |
| -#define RAISE 3 |
10 |
| -#define ADJUST 4 |
| 6 | +#define DEFAULT 0 // Default layer |
| 7 | +#define L_MAC 1 // Mac overlay |
| 8 | +#define L_L 2 // Lower layer |
| 9 | +#define L_GAME 3 // Gaming overlay |
| 10 | +#define L_SET 4 // Settings layer |
11 | 11 |
|
12 |
| -#define HYPER(key) LS(LC(LA(LG(key)))) |
13 |
| -#define MEH(key) LS(LC(LA(key))) |
| 12 | +// Modifiers |
| 13 | +#define HYPER(key) LS(LC(LA(LG(key)))) // LSHFT+LCTRL+LALT+LGUI |
| 14 | +#define MEH(key) LS(LC(LA(key))) // LSHFT+LCTRL+LALT |
| 15 | +#define GC(key) LG(LC(key)) // LGUI+LCTRL |
| 16 | + |
| 17 | +// Shortcuts |
| 18 | +#define SP SPACE |
| 19 | +#define ALTGR RALT |
| 20 | + |
| 21 | +#define BRI_DN C_BRIGHTNESS_DEC |
| 22 | +#define BRI_UP C_BRIGHTNESS_INC |
| 23 | +#define VOL_UP C_VOLUME_UP |
| 24 | +#define VOL_DN C_VOLUME_DOWN |
| 25 | + |
| 26 | +#define BT0 BT_SEL 0 |
| 27 | +#define BT1 BT_SEL 1 |
| 28 | +#define BT2 BT_SEL 2 |
| 29 | +#define BT3 BT_SEL 3 |
| 30 | +#define BT4 BT_SEL 4 |
14 | 31 |
|
15 | 32 | &sl {
|
16 |
| - release-after-ms = <5000>; |
| 33 | + release-after-ms = <5000>; |
17 | 34 | };
|
18 | 35 |
|
19 | 36 |
|
20 | 37 | &kscan0 {
|
21 |
| - debounce-press-ms = <30>; |
22 |
| - debounce-release-ms = <30>; |
| 38 | + debounce-press-ms = <30>; |
| 39 | + debounce-release-ms = <30>; |
23 | 40 | };
|
24 | 41 |
|
25 | 42 | / {
|
26 |
| - keymap { |
27 |
| - compatible = "zmk,keymap"; |
| 43 | + keymap { |
| 44 | + compatible = "zmk,keymap"; |
| 45 | + |
| 46 | + default_layer { |
| 47 | + display-name = "Default"; |
| 48 | + bindings = < |
| 49 | +&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS |
| 50 | +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH |
| 51 | +< L_L CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT |
| 52 | +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT |
| 53 | + &kp GRAVE &kp BSLH &kp LEFT &kp RIGHT &kp DOWN &kp UP &kp LBKT &kp RBKT |
| 54 | + &kp ALTGR &kp MINUS &kp LBKT &kp RBKT |
| 55 | + &kp EQUAL &kp BSPC |
| 56 | + &kp LCTRL &kp LALT &kp LGUI &kp DEL &kp RET &kp SP |
| 57 | + >; |
| 58 | + }; |
28 | 59 |
|
29 |
| - default_layer { |
30 |
| - display-name = "Default"; |
31 |
| - bindings = < |
32 |
| - &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &tog RAISE |
33 |
| - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH |
34 |
| - < LOWER CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT |
35 |
| - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT |
36 |
| - &kp LGUI &kp BSLH &kp LEFT &kp RIGHT &kp DOWN &kp UP &kp LBKT &kp RBKT |
37 |
| - &kp EQUAL &kp MINUS &kp LBKT &kp RBKT |
38 |
| - &kp GRAVE &kp BSPC |
39 |
| - &kp LCTRL &kp LALT &kp RALT &kp DEL &kp RET &kp SPACE |
40 |
| - >; |
41 |
| - }; |
| 60 | + mac_layer { |
| 61 | + display-name = "Mac"; |
| 62 | + bindings = < |
| 63 | +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
| 64 | +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
| 65 | +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
| 66 | +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
| 67 | + &trans &trans &trans &trans &trans &trans &trans &trans |
| 68 | + &trans &trans &trans &trans |
| 69 | + &trans &trans |
| 70 | + &kp LGUI &kp LALT &kp LCTRL &trans &trans &trans |
| 71 | + >; |
| 72 | + }; |
42 | 73 |
|
43 |
| - mac_layer { |
44 |
| - display-name = "Mac"; |
45 |
| - bindings = < |
46 |
| - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
47 |
| - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
48 |
| - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
49 |
| - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
50 |
| - &trans &trans &trans &trans &trans &trans &trans &trans |
51 |
| - &trans &trans &trans &trans |
52 |
| - &trans &trans |
53 |
| - &kp LGUI &kp LALT &kp LCTRL &trans &trans &trans |
54 |
| - >; |
55 |
| - }; |
| 74 | + lower_layer { |
| 75 | + display-name = "Lower"; |
| 76 | + bindings = < |
| 77 | +&kp F12 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 |
| 78 | +&sl L_SET &kp LC(1) &kp LC(PG_UP) &kp LC(PG_DN) &kp LC(9) &none &none &kp LC(1) &kp LC(PG_UP) &kp LC(PG_DN) &kp LC(9) &sl L_SET |
| 79 | +&trans &none &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &trans |
| 80 | +&trans &kp LG(TAB) &kp GC(LEFT) &kp GC(RIGHT) &kp MEH(N) &kp MEH(M) &kp MEH(N) &kp MEH(M) &kp GC(LEFT) &kp GC(RIGHT) &kp LG(TAB) &trans |
| 81 | + &none &kp C_PP &kp C_PREV &kp C_NEXT &kp VOL_DN &kp VOL_UP &kp C_MUTE &none |
| 82 | + &kp BRI_UP &kp BRI_DN &kp PSCRN &kp INS |
| 83 | + &kp HOME &kp PG_UP |
| 84 | + &trans &trans &kp END &kp PG_DN &trans &trans |
| 85 | + >; |
| 86 | + }; |
56 | 87 |
|
57 |
| - lower_layer { |
58 |
| - display-name = "Lower"; |
59 |
| - bindings = < |
60 |
| - &kp F12 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 |
61 |
| - &sl ADJUST &none &none &none &none &none &none &kp LC(1) &kp LC(PG_UP) &kp LC(PG_DN) &kp LC(9) &none |
62 |
| - &trans &none &none &none &none &none &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &none |
63 |
| - &trans &none &none &none &none &none &kp MEH(N) &kp MEH(M) &kp LG(LC(LEFT)) &kp LG(LC(RIGHT)) &kp LG(TAB) &trans |
64 |
| - &none &kp C_PP &kp C_PREV &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &none |
65 |
| - &kp C_BRI_UP &kp C_BRI_DN &kp PSCRN &kp INS |
66 |
| - &kp HOME &kp PG_UP |
67 |
| - &trans &trans &kp END &kp PG_DN &trans &trans |
68 |
| - >; }; |
| 88 | + game_layer { |
| 89 | + display-name = "Gaming"; |
| 90 | + bindings = < |
| 91 | +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
| 92 | +&kp TAB &kp T &kp Q &kp W &kp E &kp R &trans &trans &trans &trans &trans &trans |
| 93 | +&kp G &kp LSHFT &kp A &kp S &kp D &kp F &trans &trans &trans &trans &trans &trans |
| 94 | +&kp M &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
| 95 | + &kp COMMA &kp DOT &trans &trans &trans &trans &trans &trans |
| 96 | + &kp I &kp M &trans &trans |
| 97 | + &kp BSLH &trans |
| 98 | + &kp SP &kp LCTRL &kp LALT &trans &trans &trans |
| 99 | + >; |
| 100 | + }; |
69 | 101 |
|
70 |
| - raise_layer { |
71 |
| - display-name = "Gaming"; |
72 |
| - bindings = < |
73 |
| - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
74 |
| - &kp TAB &kp T &kp Q &kp W &kp E &kp R &trans &trans &trans &trans &trans &trans |
75 |
| - &kp G &kp LSHFT &kp A &kp S &kp D &kp F &trans &trans &trans &trans &trans &trans |
76 |
| - &kp M &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
77 |
| - &kp COMMA &kp DOT &trans &trans &trans &trans &trans &trans |
78 |
| - &trans &trans &trans &trans |
79 |
| - &kp BSLH &trans |
80 |
| - &kp SPACE &kp LCTRL &kp LALT &trans &trans &trans |
81 |
| - >; |
82 |
| - }; |
| 102 | + ettings_layer { |
| 103 | + display-name = "Settings"; |
| 104 | + bindings = < |
| 105 | +&none &bt BT0 &bt BT1 &bt BT2 &bt BT3 &bt BT4 &none &none &none &none &none &none |
| 106 | +&trans &out OUT_USB &out OUT_BLE &none &sys_reset &none &none &sys_reset &none &none &none &none |
| 107 | +&trans &tog L_MAC &tog L_SH &none &none &tog L_GAME &none &none &none &none &none &none |
| 108 | +&none &none &bt BT_CLR &none &none &bootloader &bootloader &none &none &none &none &none |
| 109 | + &none &none &none &none &none &none &none &none |
| 110 | + &none &none &none &none |
| 111 | + &none &none |
| 112 | + &none &none &none &none &none &none |
| 113 | + >; |
| 114 | + }; |
83 | 115 |
|
84 |
| - adjust_layer { |
85 |
| - display-name = "Adjust"; |
86 |
| - bindings = < |
87 |
| - &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &none &none &none |
88 |
| - &trans &out OUT_USB &out OUT_BLE &none &sys_reset &tog MAC &none &sys_reset &none &none &none &none |
89 |
| - &trans &none &none &none &none &none &none &none &none &none &none &none |
90 |
| - &none &none &bt BT_CLR &none &none &bootloader &bootloader &none &none &none &none &none |
91 |
| - &none &none &none &none &none &none &none &none |
92 |
| - &none &none &none &none |
93 |
| - &none &none |
94 |
| - &none &none &none &none &none &none |
95 |
| - >; |
96 |
| - }; |
97 |
| - }; |
| 116 | + }; |
98 | 117 | };
|
0 commit comments