diff options
Diffstat (limited to 'keyboards/aleblazer')
-rw-r--r-- | keyboards/aleblazer/zodiark/config.h | 75 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/info.json | 85 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/default/config.h | 22 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/default/keymap.c | 329 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/default/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/slimoled/config.h | 22 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c | 332 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/slimoled/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/via/config.h | 22 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/via/encoder.c | 36 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/via/keymap.c | 52 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/via/oled.c | 79 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/readme.md | 23 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/rules.mk | 24 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/zodiark.c | 54 | ||||
-rw-r--r-- | keyboards/aleblazer/zodiark/zodiark.h | 38 |
17 files changed, 1197 insertions, 0 deletions
diff --git a/keyboards/aleblazer/zodiark/config.h b/keyboards/aleblazer/zodiark/config.h new file mode 100644 index 000000000..84795f024 --- /dev/null +++ b/keyboards/aleblazer/zodiark/config.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #pragma once | ||
18 | |||
19 | #include "config_common.h" | ||
20 | |||
21 | /* USB Device descriptor parameter */ | ||
22 | #define VENDOR_ID 0xF901 | ||
23 | #define PRODUCT_ID 0xF902 | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER Aleblazer | ||
26 | #define PRODUCT Zodiark | ||
27 | |||
28 | #define NO_ACTION_MACRO | ||
29 | |||
30 | #define SOFT_SERIAL_PIN D3 | ||
31 | #define SERIAL_USE_MULTI_TRANSACTION | ||
32 | #define SELECT_SOFT_SERIAL_SPEED 1 | ||
33 | |||
34 | /* key matrix size */ | ||
35 | #define MATRIX_ROWS 10 | ||
36 | #define MATRIX_COLS 7 | ||
37 | #define DIODE_DIRECTION COL2ROW | ||
38 | |||
39 | #define ENCODERS_PAD_A { D2 } | ||
40 | #define ENCODERS_PAD_B { D4 } | ||
41 | #define ENCODERS_PAD_A_RIGHT { D4 } | ||
42 | #define ENCODERS_PAD_B_RIGHT { D2 } | ||
43 | #define ENCODER_RESOLUTION 3 | ||
44 | |||
45 | /* key matrix pins */ | ||
46 | #define MATRIX_ROW_PINS { C6, D7, E6, B4, F4 } | ||
47 | #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } | ||
48 | |||
49 | /* Set 0 if debouncing isn't needed */ | ||
50 | #define DEBOUNCE 5 | ||
51 | |||
52 | #define RGB_DI_PIN B5 | ||
53 | |||
54 | #ifdef RGBLIGHT_ENABLE | ||
55 | #define RGBLED_NUM 68 | ||
56 | #define RGBLIGHT_SPLIT | ||
57 | #define RGBLED_SPLIT { 34, 34 } | ||
58 | #define RGBLIGHT_LIMIT_VAL 170 | ||
59 | #define RGBLIGHT_ANIMATIONS | ||
60 | #define RGBLIGHT_HUE_STEP 8 | ||
61 | #define RGBLIGHT_SAT_STEP 8 | ||
62 | #define RGBLIGHT_VAL_STEP 8 | ||
63 | #endif | ||
64 | |||
65 | #ifdef RGB_MATRIX_ENABLE | ||
66 | #define DRIVER_LED_TOTAL 68 | ||
67 | #define RGB_MATRIX_SPLIT { 34, 34 } | ||
68 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. | ||
69 | #define RGB_MATRIX_KEYPRESSES | ||
70 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
71 | #define RGB_MATRIX_HUE_STEP 8 | ||
72 | #define RGB_MATRIX_SAT_STEP 8 | ||
73 | #define RGB_MATRIX_VAL_STEP 8 | ||
74 | #define RGB_MATRIX_SPD_STEP 10 | ||
75 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/info.json b/keyboards/aleblazer/zodiark/info.json new file mode 100644 index 000000000..89e3deb41 --- /dev/null +++ b/keyboards/aleblazer/zodiark/info.json | |||
@@ -0,0 +1,85 @@ | |||
1 | { | ||
2 | "keyboard_name": "zodiark", | ||
3 | "url": "https://github.com/Aleblazer/qmk_firmware/tree/master/keyboards/zodiark", | ||
4 | "maintainer": "Aleblazer", | ||
5 | "layouts": { | ||
6 | "LAYOUT": { | ||
7 | "layout": [ | ||
8 | {"x":0, "y":0.53}, | ||
9 | {"x":1, "y":0.53}, | ||
10 | {"x":2, "y":0.125}, | ||
11 | {"x":3, "y":0}, | ||
12 | {"x":4, "y":0.125}, | ||
13 | {"x":5, "y":0.25}, | ||
14 | {"x":12, "y":0.25}, | ||
15 | {"x":13, "y":0.125}, | ||
16 | {"x":14, "y":0}, | ||
17 | {"x":15, "y":0.125}, | ||
18 | {"x":16, "y":0.53}, | ||
19 | {"x":17, "y":0.53}, | ||
20 | |||
21 | {"x":0, "y":1.53}, | ||
22 | {"x":1, "y":1.53}, | ||
23 | {"x":2, "y":1.125}, | ||
24 | {"x":3, "y":1}, | ||
25 | {"x":4, "y":1.125}, | ||
26 | {"x":5, "y":1.25}, | ||
27 | {"x":6, "y":1.7}, | ||
28 | {"x":11, "y":1.7}, | ||
29 | {"x":12, "y":1.25}, | ||
30 | {"x":13, "y":1.125}, | ||
31 | {"x":14, "y":1}, | ||
32 | {"x":15, "y":1.125}, | ||
33 | {"x":16, "y":1.53}, | ||
34 | {"x":17, "y":1.53}, | ||
35 | |||
36 | {"x":0, "y":2.53}, | ||
37 | {"x":1, "y":2.53}, | ||
38 | {"x":2, "y":2.125}, | ||
39 | {"x":3, "y":2}, | ||
40 | {"x":4, "y":2.125}, | ||
41 | {"x":5, "y":2.25}, | ||
42 | {"x":6, "y":2.7}, | ||
43 | {"x":11, "y":2.7}, | ||
44 | {"x":12, "y":2.25}, | ||
45 | {"x":13, "y":2.125}, | ||
46 | {"x":14, "y":2}, | ||
47 | {"x":15, "y":2.125}, | ||
48 | {"x":16, "y":2.53}, | ||
49 | {"x":17, "y":2.53}, | ||
50 | |||
51 | {"x":0, "y":3.53}, | ||
52 | {"x":1, "y":3.53}, | ||
53 | {"x":2, "y":3.125}, | ||
54 | {"x":3, "y":3}, | ||
55 | {"x":4, "y":3.125}, | ||
56 | {"x":5, "y":3.25}, | ||
57 | {"x":6.5, "y":4.25}, | ||
58 | {"x":7.5, "y":4.25}, | ||
59 | {"x":9.5, "y":4.25}, | ||
60 | {"x":10.5, "y":4.25}, | ||
61 | {"x":12, "y":3.25}, | ||
62 | {"x":13, "y":3.125}, | ||
63 | {"x":14, "y":3}, | ||
64 | {"x":15, "y":3.125}, | ||
65 | {"x":16, "y":3.53}, | ||
66 | {"x":17, "y":3.53}, | ||
67 | |||
68 | {"x":0, "y":4.53}, | ||
69 | {"x":1, "y":4.53}, | ||
70 | {"x":2, "y":4.125}, | ||
71 | {"x":3, "y":4}, | ||
72 | {"x":4, "y":4.125}, | ||
73 | {"x":6, "y":5.25, "w":1.5}, | ||
74 | {"x":7.5, "y":5.25}, | ||
75 | {"x":9.5, "y":5.25}, | ||
76 | {"x":10.5, "y":5.25, "w":1.5}, | ||
77 | {"x":13, "y":4.125}, | ||
78 | {"x":14, "y":4}, | ||
79 | {"x":15, "y":4.125}, | ||
80 | {"x":16, "y":4.53}, | ||
81 | {"x":17, "y":4.53} | ||
82 | ] | ||
83 | } | ||
84 | } | ||
85 | } | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/default/config.h b/keyboards/aleblazer/zodiark/keymaps/default/config.h new file mode 100644 index 000000000..2e8732ecc --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/default/config.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #pragma once | ||
18 | |||
19 | #ifdef OLED_ENABLE | ||
20 | #define OLED_DISPLAY_128X64 | ||
21 | #define OLED_TIMEOUT 400000 | ||
22 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c new file mode 100644 index 000000000..c6a81c67f --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c | |||
@@ -0,0 +1,329 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | This program is free software: you can redistribute it and/or modify | ||
4 | it under the terms of the GNU General Public License as published by | ||
5 | the Free Software Foundation, either version 3 of the License, or | ||
6 | (at your option) any later version. | ||
7 | This program is distributed in the hope that it will be useful, | ||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | GNU General Public License for more details. | ||
11 | You should have received a copy of the GNU General Public License | ||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
13 | */ | ||
14 | #include QMK_KEYBOARD_H | ||
15 | |||
16 | enum sofle_layers { | ||
17 | /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */ | ||
18 | _QWERTY, | ||
19 | _COLEMAK, | ||
20 | _LOWER, | ||
21 | _RAISE, | ||
22 | _ADJUST, | ||
23 | }; | ||
24 | |||
25 | enum custom_keycodes { | ||
26 | KC_QWERTY = SAFE_RANGE, | ||
27 | KC_COLEMAK, | ||
28 | KC_LOWER, | ||
29 | KC_RAISE, | ||
30 | KC_ADJUST, | ||
31 | KC_PRVWD, | ||
32 | KC_NXTWD, | ||
33 | KC_LSTRT, | ||
34 | KC_LEND, | ||
35 | KC_DLINE | ||
36 | }; | ||
37 | |||
38 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
39 | |||
40 | [_QWERTY] = LAYOUT( | ||
41 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
42 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
43 | KC_ADJUST, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_EQL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
44 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
45 | KC_LCTL, KC_LALT, KC_LGUI, LALT(KC_TAB), KC_LOWER, KC_SPC, KC_ENT, KC_ENT, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
46 | ), | ||
47 | |||
48 | [_LOWER] = LAYOUT( | ||
49 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
50 | KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, | ||
51 | KC_CAPS, KC_P4, KC_P5, KC_P6, KC_NLCK, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_NLCK, | ||
52 | _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, | ||
53 | _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ | ||
54 | ), | ||
55 | |||
56 | [_RAISE] = LAYOUT( | ||
57 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
58 | KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, | ||
59 | KC_CAPS, KC_P4, KC_P5, KC_P6, KC_NLCK, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_NLCK, | ||
60 | _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, | ||
61 | _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ | ||
62 | ), | ||
63 | |||
64 | [_ADJUST] = LAYOUT( | ||
65 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
66 | _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, KC_F12, | ||
67 | _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, | ||
68 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, | ||
69 | _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD | ||
70 | ) | ||
71 | |||
72 | }; | ||
73 | #ifdef OLED_ENABLE | ||
74 | |||
75 | static void render_logo(void) { | ||
76 | static const char PROGMEM qmk_logo[] = { | ||
77 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | ||
78 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | ||
79 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 | ||
80 | }; | ||
81 | |||
82 | oled_write_P(qmk_logo, false); | ||
83 | } | ||
84 | |||
85 | static void print_status_narrow(void) { | ||
86 | // Print current mode | ||
87 | oled_write_P(PSTR("\n\n"), false); | ||
88 | oled_write_ln_P(PSTR("MODE"), false); | ||
89 | oled_write_ln_P(PSTR(""), false); | ||
90 | if (keymap_config.swap_lctl_lgui) { | ||
91 | oled_write_ln_P(PSTR("MAC"), false); | ||
92 | } else { | ||
93 | oled_write_ln_P(PSTR("WIN"), false); | ||
94 | } | ||
95 | |||
96 | switch (get_highest_layer(default_layer_state)) { | ||
97 | case _QWERTY: | ||
98 | oled_write_ln_P(PSTR("Qwrt"), false); | ||
99 | break; | ||
100 | case _COLEMAK: | ||
101 | oled_write_ln_P(PSTR("Clmk"), false); | ||
102 | break; | ||
103 | default: | ||
104 | oled_write_P(PSTR("Undef"), false); | ||
105 | } | ||
106 | oled_write_P(PSTR("\n\n"), false); | ||
107 | // Print current layer | ||
108 | oled_write_ln_P(PSTR("LAYER"), false); | ||
109 | switch (get_highest_layer(layer_state)) { | ||
110 | case _COLEMAK: | ||
111 | case _QWERTY: | ||
112 | oled_write_P(PSTR("Base\n"), false); | ||
113 | break; | ||
114 | case _RAISE: | ||
115 | oled_write_P(PSTR("Raise"), false); | ||
116 | break; | ||
117 | case _LOWER: | ||
118 | oled_write_P(PSTR("Lower"), false); | ||
119 | break; | ||
120 | case _ADJUST: | ||
121 | oled_write_P(PSTR("Adj\n"), false); | ||
122 | break; | ||
123 | default: | ||
124 | oled_write_ln_P(PSTR("Undef"), false); | ||
125 | } | ||
126 | oled_write_P(PSTR("\n\n"), false); | ||
127 | led_t led_usb_state = host_keyboard_led_state(); | ||
128 | oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); | ||
129 | } | ||
130 | |||
131 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
132 | if (is_keyboard_master()) { | ||
133 | return OLED_ROTATION_90; | ||
134 | } | ||
135 | return rotation; | ||
136 | } | ||
137 | |||
138 | bool oled_task_user(void) { | ||
139 | if (is_keyboard_master()) { | ||
140 | print_status_narrow(); | ||
141 | } else { | ||
142 | render_logo(); | ||
143 | } | ||
144 | return false; | ||
145 | } | ||
146 | |||
147 | #endif | ||
148 | |||
149 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
150 | switch (keycode) { | ||
151 | case KC_QWERTY: | ||
152 | if (record->event.pressed) { | ||
153 | set_single_persistent_default_layer(_QWERTY); | ||
154 | } | ||
155 | return false; | ||
156 | case KC_COLEMAK: | ||
157 | if (record->event.pressed) { | ||
158 | set_single_persistent_default_layer(_COLEMAK); | ||
159 | } | ||
160 | return false; | ||
161 | case KC_LOWER: | ||
162 | if (record->event.pressed) { | ||
163 | layer_on(_LOWER); | ||
164 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
165 | } else { | ||
166 | layer_off(_LOWER); | ||
167 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
168 | } | ||
169 | return false; | ||
170 | case KC_RAISE: | ||
171 | if (record->event.pressed) { | ||
172 | layer_on(_RAISE); | ||
173 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
174 | } else { | ||
175 | layer_off(_RAISE); | ||
176 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
177 | } | ||
178 | return false; | ||
179 | case KC_ADJUST: | ||
180 | if (record->event.pressed) { | ||
181 | layer_on(_ADJUST); | ||
182 | } else { | ||
183 | layer_off(_ADJUST); | ||
184 | } | ||
185 | return false; | ||
186 | case KC_PRVWD: | ||
187 | if (record->event.pressed) { | ||
188 | if (keymap_config.swap_lctl_lgui) { | ||
189 | register_mods(mod_config(MOD_LALT)); | ||
190 | register_code(KC_LEFT); | ||
191 | } else { | ||
192 | register_mods(mod_config(MOD_LCTL)); | ||
193 | register_code(KC_LEFT); | ||
194 | } | ||
195 | } else { | ||
196 | if (keymap_config.swap_lctl_lgui) { | ||
197 | unregister_mods(mod_config(MOD_LALT)); | ||
198 | unregister_code(KC_LEFT); | ||
199 | } else { | ||
200 | unregister_mods(mod_config(MOD_LCTL)); | ||
201 | unregister_code(KC_LEFT); | ||
202 | } | ||
203 | } | ||
204 | break; | ||
205 | case KC_NXTWD: | ||
206 | if (record->event.pressed) { | ||
207 | if (keymap_config.swap_lctl_lgui) { | ||
208 | register_mods(mod_config(MOD_LALT)); | ||
209 | register_code(KC_RIGHT); | ||
210 | } else { | ||
211 | register_mods(mod_config(MOD_LCTL)); | ||
212 | register_code(KC_RIGHT); | ||
213 | } | ||
214 | } else { | ||
215 | if (keymap_config.swap_lctl_lgui) { | ||
216 | unregister_mods(mod_config(MOD_LALT)); | ||
217 | unregister_code(KC_RIGHT); | ||
218 | } else { | ||
219 | unregister_mods(mod_config(MOD_LCTL)); | ||
220 | unregister_code(KC_RIGHT); | ||
221 | } | ||
222 | } | ||
223 | break; | ||
224 | case KC_LSTRT: | ||
225 | if (record->event.pressed) { | ||
226 | if (keymap_config.swap_lctl_lgui) { | ||
227 | //CMD-arrow on Mac, but we have CTL and GUI swapped | ||
228 | register_mods(mod_config(MOD_LCTL)); | ||
229 | register_code(KC_LEFT); | ||
230 | } else { | ||
231 | register_code(KC_HOME); | ||
232 | } | ||
233 | } else { | ||
234 | if (keymap_config.swap_lctl_lgui) { | ||
235 | unregister_mods(mod_config(MOD_LCTL)); | ||
236 | unregister_code(KC_LEFT); | ||
237 | } else { | ||
238 | unregister_code(KC_HOME); | ||
239 | } | ||
240 | } | ||
241 | break; | ||
242 | case KC_LEND: | ||
243 | if (record->event.pressed) { | ||
244 | if (keymap_config.swap_lctl_lgui) { | ||
245 | //CMD-arrow on Mac, but we have CTL and GUI swapped | ||
246 | register_mods(mod_config(MOD_LCTL)); | ||
247 | register_code(KC_RIGHT); | ||
248 | } else { | ||
249 | register_code(KC_END); | ||
250 | } | ||
251 | } else { | ||
252 | if (keymap_config.swap_lctl_lgui) { | ||
253 | unregister_mods(mod_config(MOD_LCTL)); | ||
254 | unregister_code(KC_RIGHT); | ||
255 | } else { | ||
256 | unregister_code(KC_END); | ||
257 | } | ||
258 | } | ||
259 | break; | ||
260 | case KC_DLINE: | ||
261 | if (record->event.pressed) { | ||
262 | register_mods(mod_config(MOD_LCTL)); | ||
263 | register_code(KC_BSPC); | ||
264 | } else { | ||
265 | unregister_mods(mod_config(MOD_LCTL)); | ||
266 | unregister_code(KC_BSPC); | ||
267 | } | ||
268 | break; | ||
269 | case KC_COPY: | ||
270 | if (record->event.pressed) { | ||
271 | register_mods(mod_config(MOD_LCTL)); | ||
272 | register_code(KC_C); | ||
273 | } else { | ||
274 | unregister_mods(mod_config(MOD_LCTL)); | ||
275 | unregister_code(KC_C); | ||
276 | } | ||
277 | return false; | ||
278 | case KC_PASTE: | ||
279 | if (record->event.pressed) { | ||
280 | register_mods(mod_config(MOD_LCTL)); | ||
281 | register_code(KC_V); | ||
282 | } else { | ||
283 | unregister_mods(mod_config(MOD_LCTL)); | ||
284 | unregister_code(KC_V); | ||
285 | } | ||
286 | return false; | ||
287 | case KC_CUT: | ||
288 | if (record->event.pressed) { | ||
289 | register_mods(mod_config(MOD_LCTL)); | ||
290 | register_code(KC_X); | ||
291 | } else { | ||
292 | unregister_mods(mod_config(MOD_LCTL)); | ||
293 | unregister_code(KC_X); | ||
294 | } | ||
295 | return false; | ||
296 | break; | ||
297 | case KC_UNDO: | ||
298 | if (record->event.pressed) { | ||
299 | register_mods(mod_config(MOD_LCTL)); | ||
300 | register_code(KC_Z); | ||
301 | } else { | ||
302 | unregister_mods(mod_config(MOD_LCTL)); | ||
303 | unregister_code(KC_Z); | ||
304 | } | ||
305 | return false; | ||
306 | } | ||
307 | return true; | ||
308 | } | ||
309 | |||
310 | #ifdef ENCODER_ENABLE | ||
311 | |||
312 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
313 | if (index == 0) { | ||
314 | if (clockwise) { | ||
315 | tap_code(KC_VOLU); | ||
316 | } else { | ||
317 | tap_code(KC_VOLD); | ||
318 | } | ||
319 | } else if (index == 1) { | ||
320 | if (clockwise) { | ||
321 | rgblight_step(); | ||
322 | } else { | ||
323 | rgblight_step_reverse(); | ||
324 | } | ||
325 | } | ||
326 | return true; | ||
327 | } | ||
328 | |||
329 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/default/rules.mk b/keyboards/aleblazer/zodiark/keymaps/default/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/default/rules.mk | |||
@@ -0,0 +1 @@ | |||
RGBLIGHT_ENABLE = yes | |||
diff --git a/keyboards/aleblazer/zodiark/keymaps/slimoled/config.h b/keyboards/aleblazer/zodiark/keymaps/slimoled/config.h new file mode 100644 index 000000000..e2df253c3 --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/slimoled/config.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #pragma once | ||
18 | |||
19 | #ifdef OLED_ENABLE | ||
20 | #define OLED_DISPLAY_128X32 | ||
21 | #define OLED_TIMEOUT 400000 | ||
22 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c new file mode 100644 index 000000000..ca8f91f1d --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c | |||
@@ -0,0 +1,332 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | enum sofle_layers { | ||
20 | /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */ | ||
21 | _QWERTY, | ||
22 | _COLEMAK, | ||
23 | _LOWER, | ||
24 | _RAISE, | ||
25 | _ADJUST, | ||
26 | }; | ||
27 | |||
28 | enum custom_keycodes { | ||
29 | KC_QWERTY = SAFE_RANGE, | ||
30 | KC_COLEMAK, | ||
31 | KC_LOWER, | ||
32 | KC_RAISE, | ||
33 | KC_ADJUST, | ||
34 | KC_PRVWD, | ||
35 | KC_NXTWD, | ||
36 | KC_LSTRT, | ||
37 | KC_LEND, | ||
38 | KC_DLINE | ||
39 | }; | ||
40 | |||
41 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
42 | |||
43 | [_QWERTY] = LAYOUT( | ||
44 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
45 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
46 | KC_ADJUST, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_EQL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
47 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
48 | KC_LCTL, KC_LALT, KC_LGUI, LALT(KC_TAB), KC_LOWER, KC_SPC, KC_ENT, KC_ENT, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
49 | ), | ||
50 | |||
51 | [_LOWER] = LAYOUT( | ||
52 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
53 | KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, | ||
54 | KC_CAPS, KC_P4, KC_P5, KC_P6, KC_NLCK, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_NLCK, | ||
55 | _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, | ||
56 | _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ | ||
57 | ), | ||
58 | |||
59 | [_RAISE] = LAYOUT( | ||
60 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
61 | KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, | ||
62 | KC_CAPS, KC_P4, KC_P5, KC_P6, KC_NLCK, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_NLCK, | ||
63 | _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, | ||
64 | _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ | ||
65 | ), | ||
66 | |||
67 | [_ADJUST] = LAYOUT( | ||
68 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
69 | _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, KC_F12, | ||
70 | _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, | ||
71 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, | ||
72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD | ||
73 | ) | ||
74 | |||
75 | }; | ||
76 | #ifdef OLED_ENABLE | ||
77 | |||
78 | static void render_logo(void) { | ||
79 | static const char PROGMEM qmk_logo[] = { | ||
80 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | ||
81 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | ||
82 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 | ||
83 | }; | ||
84 | |||
85 | oled_write_P(qmk_logo, false); | ||
86 | } | ||
87 | |||
88 | static void print_status_narrow(void) { | ||
89 | // Print current mode | ||
90 | oled_write_P(PSTR("\n\n"), false); | ||
91 | oled_write_ln_P(PSTR("MODE"), false); | ||
92 | oled_write_ln_P(PSTR(""), false); | ||
93 | if (keymap_config.swap_lctl_lgui) { | ||
94 | oled_write_ln_P(PSTR("MAC"), false); | ||
95 | } else { | ||
96 | oled_write_ln_P(PSTR("WIN"), false); | ||
97 | } | ||
98 | |||
99 | switch (get_highest_layer(default_layer_state)) { | ||
100 | case _QWERTY: | ||
101 | oled_write_ln_P(PSTR("Qwrt"), false); | ||
102 | break; | ||
103 | case _COLEMAK: | ||
104 | oled_write_ln_P(PSTR("Clmk"), false); | ||
105 | break; | ||
106 | default: | ||
107 | oled_write_P(PSTR("Undef"), false); | ||
108 | } | ||
109 | oled_write_P(PSTR("\n\n"), false); | ||
110 | // Print current layer | ||
111 | oled_write_ln_P(PSTR("LAYER"), false); | ||
112 | switch (get_highest_layer(layer_state)) { | ||
113 | case _COLEMAK: | ||
114 | case _QWERTY: | ||
115 | oled_write_P(PSTR("Base\n"), false); | ||
116 | break; | ||
117 | case _RAISE: | ||
118 | oled_write_P(PSTR("Raise"), false); | ||
119 | break; | ||
120 | case _LOWER: | ||
121 | oled_write_P(PSTR("Lower"), false); | ||
122 | break; | ||
123 | case _ADJUST: | ||
124 | oled_write_P(PSTR("Adj\n"), false); | ||
125 | break; | ||
126 | default: | ||
127 | oled_write_ln_P(PSTR("Undef"), false); | ||
128 | } | ||
129 | oled_write_P(PSTR("\n\n"), false); | ||
130 | led_t led_usb_state = host_keyboard_led_state(); | ||
131 | oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); | ||
132 | } | ||
133 | |||
134 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
135 | if (is_keyboard_master()) { | ||
136 | return OLED_ROTATION_90; | ||
137 | } | ||
138 | return rotation; | ||
139 | } | ||
140 | |||
141 | bool oled_task_user(void) { | ||
142 | if (is_keyboard_master()) { | ||
143 | print_status_narrow(); | ||
144 | } else { | ||
145 | render_logo(); | ||
146 | } | ||
147 | return false; | ||
148 | } | ||
149 | |||
150 | #endif | ||
151 | |||
152 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
153 | switch (keycode) { | ||
154 | case KC_QWERTY: | ||
155 | if (record->event.pressed) { | ||
156 | set_single_persistent_default_layer(_QWERTY); | ||
157 | } | ||
158 | return false; | ||
159 | case KC_COLEMAK: | ||
160 | if (record->event.pressed) { | ||
161 | set_single_persistent_default_layer(_COLEMAK); | ||
162 | } | ||
163 | return false; | ||
164 | case KC_LOWER: | ||
165 | if (record->event.pressed) { | ||
166 | layer_on(_LOWER); | ||
167 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
168 | } else { | ||
169 | layer_off(_LOWER); | ||
170 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
171 | } | ||
172 | return false; | ||
173 | case KC_RAISE: | ||
174 | if (record->event.pressed) { | ||
175 | layer_on(_RAISE); | ||
176 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
177 | } else { | ||
178 | layer_off(_RAISE); | ||
179 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
180 | } | ||
181 | return false; | ||
182 | case KC_ADJUST: | ||
183 | if (record->event.pressed) { | ||
184 | layer_on(_ADJUST); | ||
185 | } else { | ||
186 | layer_off(_ADJUST); | ||
187 | } | ||
188 | return false; | ||
189 | case KC_PRVWD: | ||
190 | if (record->event.pressed) { | ||
191 | if (keymap_config.swap_lctl_lgui) { | ||
192 | register_mods(mod_config(MOD_LALT)); | ||
193 | register_code(KC_LEFT); | ||
194 | } else { | ||
195 | register_mods(mod_config(MOD_LCTL)); | ||
196 | register_code(KC_LEFT); | ||
197 | } | ||
198 | } else { | ||
199 | if (keymap_config.swap_lctl_lgui) { | ||
200 | unregister_mods(mod_config(MOD_LALT)); | ||
201 | unregister_code(KC_LEFT); | ||
202 | } else { | ||
203 | unregister_mods(mod_config(MOD_LCTL)); | ||
204 | unregister_code(KC_LEFT); | ||
205 | } | ||
206 | } | ||
207 | break; | ||
208 | case KC_NXTWD: | ||
209 | if (record->event.pressed) { | ||
210 | if (keymap_config.swap_lctl_lgui) { | ||
211 | register_mods(mod_config(MOD_LALT)); | ||
212 | register_code(KC_RIGHT); | ||
213 | } else { | ||
214 | register_mods(mod_config(MOD_LCTL)); | ||
215 | register_code(KC_RIGHT); | ||
216 | } | ||
217 | } else { | ||
218 | if (keymap_config.swap_lctl_lgui) { | ||
219 | unregister_mods(mod_config(MOD_LALT)); | ||
220 | unregister_code(KC_RIGHT); | ||
221 | } else { | ||
222 | unregister_mods(mod_config(MOD_LCTL)); | ||
223 | unregister_code(KC_RIGHT); | ||
224 | } | ||
225 | } | ||
226 | break; | ||
227 | case KC_LSTRT: | ||
228 | if (record->event.pressed) { | ||
229 | if (keymap_config.swap_lctl_lgui) { | ||
230 | //CMD-arrow on Mac, but we have CTL and GUI swapped | ||
231 | register_mods(mod_config(MOD_LCTL)); | ||
232 | register_code(KC_LEFT); | ||
233 | } else { | ||
234 | register_code(KC_HOME); | ||
235 | } | ||
236 | } else { | ||
237 | if (keymap_config.swap_lctl_lgui) { | ||
238 | unregister_mods(mod_config(MOD_LCTL)); | ||
239 | unregister_code(KC_LEFT); | ||
240 | } else { | ||
241 | unregister_code(KC_HOME); | ||
242 | } | ||
243 | } | ||
244 | break; | ||
245 | case KC_LEND: | ||
246 | if (record->event.pressed) { | ||
247 | if (keymap_config.swap_lctl_lgui) { | ||
248 | //CMD-arrow on Mac, but we have CTL and GUI swapped | ||
249 | register_mods(mod_config(MOD_LCTL)); | ||
250 | register_code(KC_RIGHT); | ||
251 | } else { | ||
252 | register_code(KC_END); | ||
253 | } | ||
254 | } else { | ||
255 | if (keymap_config.swap_lctl_lgui) { | ||
256 | unregister_mods(mod_config(MOD_LCTL)); | ||
257 | unregister_code(KC_RIGHT); | ||
258 | } else { | ||
259 | unregister_code(KC_END); | ||
260 | } | ||
261 | } | ||
262 | break; | ||
263 | case KC_DLINE: | ||
264 | if (record->event.pressed) { | ||
265 | register_mods(mod_config(MOD_LCTL)); | ||
266 | register_code(KC_BSPC); | ||
267 | } else { | ||
268 | unregister_mods(mod_config(MOD_LCTL)); | ||
269 | unregister_code(KC_BSPC); | ||
270 | } | ||
271 | break; | ||
272 | case KC_COPY: | ||
273 | if (record->event.pressed) { | ||
274 | register_mods(mod_config(MOD_LCTL)); | ||
275 | register_code(KC_C); | ||
276 | } else { | ||
277 | unregister_mods(mod_config(MOD_LCTL)); | ||
278 | unregister_code(KC_C); | ||
279 | } | ||
280 | return false; | ||
281 | case KC_PASTE: | ||
282 | if (record->event.pressed) { | ||
283 | register_mods(mod_config(MOD_LCTL)); | ||
284 | register_code(KC_V); | ||
285 | } else { | ||
286 | unregister_mods(mod_config(MOD_LCTL)); | ||
287 | unregister_code(KC_V); | ||
288 | } | ||
289 | return false; | ||
290 | case KC_CUT: | ||
291 | if (record->event.pressed) { | ||
292 | register_mods(mod_config(MOD_LCTL)); | ||
293 | register_code(KC_X); | ||
294 | } else { | ||
295 | unregister_mods(mod_config(MOD_LCTL)); | ||
296 | unregister_code(KC_X); | ||
297 | } | ||
298 | return false; | ||
299 | break; | ||
300 | case KC_UNDO: | ||
301 | if (record->event.pressed) { | ||
302 | register_mods(mod_config(MOD_LCTL)); | ||
303 | register_code(KC_Z); | ||
304 | } else { | ||
305 | unregister_mods(mod_config(MOD_LCTL)); | ||
306 | unregister_code(KC_Z); | ||
307 | } | ||
308 | return false; | ||
309 | } | ||
310 | return true; | ||
311 | } | ||
312 | |||
313 | #ifdef ENCODER_ENABLE | ||
314 | |||
315 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
316 | if (index == 0) { | ||
317 | if (clockwise) { | ||
318 | tap_code(KC_VOLU); | ||
319 | } else { | ||
320 | tap_code(KC_VOLD); | ||
321 | } | ||
322 | } else if (index == 1) { | ||
323 | if (clockwise) { | ||
324 | rgblight_step(); | ||
325 | } else { | ||
326 | rgblight_step_reverse(); | ||
327 | } | ||
328 | } | ||
329 | return true; | ||
330 | } | ||
331 | |||
332 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/slimoled/rules.mk b/keyboards/aleblazer/zodiark/keymaps/slimoled/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/slimoled/rules.mk | |||
@@ -0,0 +1 @@ | |||
RGBLIGHT_ENABLE = yes | |||
diff --git a/keyboards/aleblazer/zodiark/keymaps/via/config.h b/keyboards/aleblazer/zodiark/keymaps/via/config.h new file mode 100644 index 000000000..2e8732ecc --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/via/config.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #pragma once | ||
18 | |||
19 | #ifdef OLED_ENABLE | ||
20 | #define OLED_DISPLAY_128X64 | ||
21 | #define OLED_TIMEOUT 400000 | ||
22 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/via/encoder.c b/keyboards/aleblazer/zodiark/keymaps/via/encoder.c new file mode 100644 index 000000000..c08cfed5c --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/via/encoder.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | This program is free software: you can redistribute it and/or modify | ||
4 | it under the terms of the GNU General Public License as published by | ||
5 | the Free Software Foundation, either version 3 of the License, or | ||
6 | (at your option) any later version. | ||
7 | This program is distributed in the hope that it will be useful, | ||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | GNU General Public License for more details. | ||
11 | You should have received a copy of the GNU General Public License | ||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
13 | */ | ||
14 | |||
15 | //Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via. | ||
16 | |||
17 | #ifdef ENCODER_ENABLE | ||
18 | |||
19 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
20 | if (index == 0) { | ||
21 | if (clockwise) { | ||
22 | tap_code(KC_VOLU); | ||
23 | } else { | ||
24 | tap_code(KC_VOLD); | ||
25 | } | ||
26 | } else if (index == 1) { | ||
27 | if (clockwise) { | ||
28 | tap_code(KC_PGDOWN); | ||
29 | } else { | ||
30 | tap_code(KC_PGUP); | ||
31 | } | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
35 | |||
36 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/via/keymap.c b/keyboards/aleblazer/zodiark/keymaps/via/keymap.c new file mode 100644 index 000000000..1159afb43 --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/via/keymap.c | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | This program is free software: you can redistribute it and/or modify | ||
4 | it under the terms of the GNU General Public License as published by | ||
5 | the Free Software Foundation, either version 3 of the License, or | ||
6 | (at your option) any later version. | ||
7 | This program is distributed in the hope that it will be useful, | ||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | GNU General Public License for more details. | ||
11 | You should have received a copy of the GNU General Public License | ||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
13 | */ | ||
14 | #include QMK_KEYBOARD_H | ||
15 | #include "oled.c" | ||
16 | #include "encoder.c" | ||
17 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | |||
20 | [0] = LAYOUT( | ||
21 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
22 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
23 | MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_EQL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
24 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
25 | KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(1), KC_SPC, KC_ENT, KC_ENT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
26 | ), | ||
27 | |||
28 | [1] = LAYOUT( | ||
29 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
30 | KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, | ||
31 | KC_CAPS, KC_P4, KC_P5, KC_P6, KC_NLCK, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_NLCK, | ||
32 | _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, | ||
33 | _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ | ||
34 | ), | ||
35 | |||
36 | [2] = LAYOUT( | ||
37 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
38 | KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, | ||
39 | KC_CAPS, KC_P4, KC_P5, KC_P6, KC_NLCK, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_NLCK, | ||
40 | _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, | ||
41 | _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ | ||
42 | ), | ||
43 | |||
44 | [3] = LAYOUT( | ||
45 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
46 | _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, KC_F12, | ||
47 | _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, | ||
48 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, | ||
49 | _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD | ||
50 | ) | ||
51 | |||
52 | }; | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/via/oled.c b/keyboards/aleblazer/zodiark/keymaps/via/oled.c new file mode 100644 index 000000000..8642bacb0 --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/via/oled.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | This program is free software: you can redistribute it and/or modify | ||
4 | it under the terms of the GNU General Public License as published by | ||
5 | the Free Software Foundation, either version 3 of the License, or | ||
6 | (at your option) any later version. | ||
7 | This program is distributed in the hope that it will be useful, | ||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | GNU General Public License for more details. | ||
11 | You should have received a copy of the GNU General Public License | ||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
13 | */ | ||
14 | |||
15 | #ifdef OLED_ENABLE | ||
16 | |||
17 | static void render_logo(void) { | ||
18 | static const char PROGMEM qmk_logo[] = { | ||
19 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | ||
20 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | ||
21 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 | ||
22 | }; | ||
23 | |||
24 | oled_write_P(qmk_logo, false); | ||
25 | } | ||
26 | |||
27 | static void print_status_narrow(void) { | ||
28 | // Print current mode | ||
29 | oled_write_P(PSTR("\n\n"), false); | ||
30 | |||
31 | switch (get_highest_layer(layer_state)) { | ||
32 | case 0: | ||
33 | oled_write_ln_P(PSTR("Qwrt"), false); | ||
34 | break; | ||
35 | default: | ||
36 | oled_write_P(PSTR("Mod\n"), false); | ||
37 | break; | ||
38 | } | ||
39 | oled_write_P(PSTR("\n\n"), false); | ||
40 | // Print current layer | ||
41 | oled_write_ln_P(PSTR("LAYER"), false); | ||
42 | switch (get_highest_layer(layer_state)) { | ||
43 | case 0: | ||
44 | oled_write_P(PSTR("Base\n"), false); | ||
45 | break; | ||
46 | case 1: | ||
47 | oled_write_P(PSTR("Raise"), false); | ||
48 | break; | ||
49 | case 2: | ||
50 | oled_write_P(PSTR("Lower"), false); | ||
51 | break; | ||
52 | case 3: | ||
53 | oled_write_P(PSTR("Adjust"), false); | ||
54 | break; | ||
55 | default: | ||
56 | oled_write_ln_P(PSTR("Undef"), false); | ||
57 | } | ||
58 | oled_write_P(PSTR("\n\n"), false); | ||
59 | led_t led_usb_state = host_keyboard_led_state(); | ||
60 | oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); | ||
61 | } | ||
62 | |||
63 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
64 | if (is_keyboard_master()) { | ||
65 | return OLED_ROTATION_90; | ||
66 | } | ||
67 | return rotation; | ||
68 | } | ||
69 | |||
70 | bool oled_task_user(void) { | ||
71 | if (is_keyboard_master()) { | ||
72 | print_status_narrow(); | ||
73 | } else { | ||
74 | render_logo(); | ||
75 | } | ||
76 | return false; | ||
77 | } | ||
78 | |||
79 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/keymaps/via/rules.mk b/keyboards/aleblazer/zodiark/keymaps/via/rules.mk new file mode 100644 index 000000000..76d3c49ff --- /dev/null +++ b/keyboards/aleblazer/zodiark/keymaps/via/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | RGBLIGHT_ENABLE = yes | ||
2 | VIA_ENABLE = yes | ||
diff --git a/keyboards/aleblazer/zodiark/readme.md b/keyboards/aleblazer/zodiark/readme.md new file mode 100644 index 000000000..392744ded --- /dev/null +++ b/keyboards/aleblazer/zodiark/readme.md | |||
@@ -0,0 +1,23 @@ | |||
1 | # Zodiark Keyboard | ||
2 | |||
3 |  | ||
4 | |||
5 | A split keyboard with 5x7 including a thumbcluster, encoders on each side, per key RGB, and 2x I2C headers per side, supporiting 1.3"/.96" 128x64 OLEDs (the 1.3" is an SSH1106 OLED, refer to QMK documentation for limitations), .91" 128x32 OLEDs. | ||
6 | |||
7 | * Keyboard Maintainer: [Aleblazer](https://github.com/Aleblazer/), [Discord Link](https://discord.gg/BCSbXwskVt) | ||
8 | * Hardware Supported: Pro Micro and derivatives | ||
9 | * Hardware Availability: Pending Group Buy - [Discord Link](https://discord.gg/BCSbXwskVt) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make aleblazer/zodiark:default | ||
14 | |||
15 | Flashing example for this keyboard: | ||
16 | |||
17 | make aleblazer/zodiark:default:flash | ||
18 | |||
19 | Remove TRRS cable from halves, plug into one side, press reset button when asked. Repeat process on the other side. | ||
20 | |||
21 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
22 | |||
23 | Credit to Sofle and Josef Adamcik <[email protected]> for OLED and layer code. | ||
diff --git a/keyboards/aleblazer/zodiark/rules.mk b/keyboards/aleblazer/zodiark/rules.mk new file mode 100644 index 000000000..5f68f998d --- /dev/null +++ b/keyboards/aleblazer/zodiark/rules.mk | |||
@@ -0,0 +1,24 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = caterina | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | NKRO_ENABLE = no # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
17 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
18 | AUDIO_ENABLE = no # Audio output | ||
19 | OLED_ENABLE = yes | ||
20 | OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C | ||
21 | ENCODER_ENABLE = yes | ||
22 | SPLIT_KEYBOARD = yes | ||
23 | LTO_ENABLE = yes | ||
24 | RGB_MATRIX_DRIVER = WS2812 | ||
diff --git a/keyboards/aleblazer/zodiark/zodiark.c b/keyboards/aleblazer/zodiark/zodiark.c new file mode 100644 index 000000000..d3893ada0 --- /dev/null +++ b/keyboards/aleblazer/zodiark/zodiark.c | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #include "zodiark.h" | ||
18 | |||
19 | #ifdef RGB_MATRIX_ENABLE | ||
20 | led_config_t g_led_config = { { | ||
21 | // Key Matrix to LED Index | ||
22 | // Left Hand | ||
23 | { 5, 4, 3, 2, 1, 0, 12 }, | ||
24 | { 6, 7, 8, 9, 10, 11, 13 }, | ||
25 | { 19, 18, 17, 16, 15, 14, 26 }, | ||
26 | { 20, 21, 22, 23, 24, 25, NO_LED }, | ||
27 | { 33, 32, 31, 30, 29, 28, 27}, | ||
28 | // Right Hand | ||
29 | { 39, 38, 37, 36, 35, 34, 46 }, | ||
30 | { 40, 41, 42, 43, 44, 45, 47 }, | ||
31 | { 53, 52, 51, 50, 49, 48, 60 }, | ||
32 | { 54, 55, 56, 57, 58, 59, NO_LED }, | ||
33 | { 67, 66, 65, 64, 63, 62, 61 }, | ||
34 | |||
35 | |||
36 | }, { | ||
37 | // LED Index to Physical Position | ||
38 | // Left Hand | ||
39 | { 93, 0 }, { 74, 0 }, { 56, 0 }, { 37, 0 }, { 19, 0 }, { 0, 0 }, { 0, 16 }, | ||
40 | { 19, 16 }, { 37, 16 }, { 56, 16 }, { 74, 16 }, { 93, 16 }, { 112, 24 }, { 112, 40 }, | ||
41 | { 93, 32 }, { 74, 32 }, { 56, 32 }, { 37, 32 }, { 19, 32 }, { 0, 32 }, { 0, 48 }, | ||
42 | { 19, 48 }, { 37, 48 }, { 56, 48 }, { 74, 48 }, { 93, 48 }, { 112, 52 }, | ||
43 | { 112, 64 }, { 93, 64 }, { 74, 64 }, { 56, 64 }, { 37, 64 }, { 19, 64 }, { 0, 64 }, | ||
44 | // Right Hand | ||
45 | { 132, 0 }, { 150, 0 }, { 169, 0 }, { 187, 0 }, { 206, 0 }, { 224, 0 }, { 224, 16 }, | ||
46 | { 206, 16 }, { 187, 16 }, { 169, 16 }, { 150, 16 }, { 132, 16 }, { 113, 24 }, { 113, 40 }, | ||
47 | { 132, 32 }, { 150, 32 }, { 169, 32 }, { 187, 32 }, { 206, 32 }, { 224, 32 }, { 224, 48 }, | ||
48 | { 206, 48 }, { 187, 48 }, { 169, 48 }, { 150, 48 }, { 132, 48 }, { 113, 52 }, | ||
49 | { 113, 64 }, { 132, 64 }, { 150, 64 }, { 169, 64 }, { 187, 64 }, { 206, 64 }, { 224, 64 }, | ||
50 | }, { | ||
51 | // LED Index to Flag | ||
52 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 | ||
53 | } }; | ||
54 | #endif | ||
diff --git a/keyboards/aleblazer/zodiark/zodiark.h b/keyboards/aleblazer/zodiark/zodiark.h new file mode 100644 index 000000000..5c25cea54 --- /dev/null +++ b/keyboards/aleblazer/zodiark/zodiark.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | Copyright 2021 Spencer Deven <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #pragma once | ||
18 | #include "quantum.h" | ||
19 | |||
20 | #define LAYOUT( \ | ||
21 | L00, L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, R06, \ | ||
22 | L10, L11, L12, L13, L14, L15, L06, R00, R11, R12, R13, R14, R15, R16, \ | ||
23 | L20, L21, L22, L23, L24, L25, L16, R10, R21, R22, R23, R24, R25, R26, \ | ||
24 | L30, L31, L32, L33, L34, L35, L26, L36, R30, R20, R31, R32, R33, R34, R35, R36, \ | ||
25 | L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ | ||
26 | ) \ | ||
27 | { \ | ||
28 | { L00, L01, L02, L03, L04, L05, L06 }, \ | ||
29 | { L10, L11, L12, L13, L14, L15, L16 }, \ | ||
30 | { L20, L21, L22, L23, L24, L25, L26 }, \ | ||
31 | { L30, L31, L32, L33, L34, L35, L36 }, \ | ||
32 | { L40, L41, L42, L43, L44, L45, L46 }, \ | ||
33 | { R06, R05, R04, R03, R02, R01, R00 }, \ | ||
34 | { R16, R15, R14, R13, R12, R11, R10 }, \ | ||
35 | { R26, R25, R24, R23, R22, R21, R20 }, \ | ||
36 | { R36, R35, R34, R33, R32, R31, R30 }, \ | ||
37 | { R46, R45, R44, R43, R42, R41, R40 } \ | ||
38 | } | ||