diff options
author | Monksoffunk <monksoffunk@users.noreply.github.com> | 2018-10-27 13:23:49 +0900 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-10-26 21:23:49 -0700 |
commit | 23cd9f4dee791464196faaf6692599325cfe6f3c (patch) | |
tree | 51a18c3beaa8f1937b1aa1efd5209ca8583b944a /keyboards/zinc/keymaps | |
parent | 73e92ef0c06de389d39d3ca0a8c98da2196ebec7 (diff) | |
download | qmk_firmware-23cd9f4dee791464196faaf6692599325cfe6f3c.tar.gz qmk_firmware-23cd9f4dee791464196faaf6692599325cfe6f3c.zip |
Keyboard: Add new keyboard Zinc (#4245)
* Add Zinc keyboard
* Fix photo
* Fix readme.md
* Fix RGB LED init of monks/keymap.c
* Fix default keymap and readme.jp
* Fix change DEFS of RGB ANIMATIONS to LED_ANIMATIONS
* Add EOL
* Use serial_config_simpleapi.h
* Fix comment char
* Fix error handling in split_scomm.c : mtei works
* Fix keymaps
* Remove DISABLE_LEADER definition
* Remove pro_micro.h
* Add 2 spaces after Hardware name
* Fix keymaps
- remove audio codes
- change LAYOUT to LAYOUT_ortho_4X12
- change "persistent_default_layer_set" to core function
* Use the Community Layouts feature
- with some clean up
Diffstat (limited to 'keyboards/zinc/keymaps')
-rw-r--r-- | keyboards/zinc/keymaps/default/config.h | 38 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/default/keymap.c | 306 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/default/readme_jp.md | 123 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/default/rules.mk | 98 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/monks/config.h | 38 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/monks/keymap.c | 255 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/monks/readme_jp.md | 103 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/monks/rules.mk | 100 |
8 files changed, 1061 insertions, 0 deletions
diff --git a/keyboards/zinc/keymaps/default/config.h b/keyboards/zinc/keymaps/default/config.h new file mode 100644 index 000000000..4dcb0724f --- /dev/null +++ b/keyboards/zinc/keymaps/default/config.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | This is the c configuration file for the keymap | ||
3 | |||
4 | Copyright 2018 monksoffunk | ||
5 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
6 | Copyright 2015 Jack Humbert | ||
7 | |||
8 | This program is free software: you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation, either version 2 of the License, or | ||
11 | (at your option) any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | ||
21 | |||
22 | #pragma once | ||
23 | // if you need more program area, try uncomment follow line | ||
24 | #include "serial_config_simpleapi.h" | ||
25 | |||
26 | // place overrides here | ||
27 | // Selection of RGBLIGHT MODE to use. | ||
28 | #if defined(LED_ANIMATIONS) | ||
29 | #define RGBLIGHT_EFFECT_BREATHING | ||
30 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
31 | #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
32 | #define RGBLIGHT_EFFECT_SNAKE | ||
33 | #define RGBLIGHT_EFFECT_KNIGHT | ||
34 | #define RGBLIGHT_EFFECT_CHRISTMAS | ||
35 | #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
36 | //#define RGBLIGHT_EFFECT_RGB_TEST | ||
37 | //#define RGBLIGHT_EFFECT_ALTERNATING | ||
38 | #endif | ||
diff --git a/keyboards/zinc/keymaps/default/keymap.c b/keyboards/zinc/keymaps/default/keymap.c new file mode 100644 index 000000000..7729914ec --- /dev/null +++ b/keyboards/zinc/keymaps/default/keymap.c | |||
@@ -0,0 +1,306 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | extern keymap_config_t keymap_config; | ||
4 | |||
5 | #ifdef RGBLIGHT_ENABLE | ||
6 | //Following line allows macro to read current RGB settings | ||
7 | extern rgblight_config_t rgblight_config; | ||
8 | rgblight_config_t RGB_current_config; | ||
9 | #endif | ||
10 | |||
11 | extern uint8_t is_master; | ||
12 | |||
13 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
14 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
15 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
16 | // entirely and just use numbers. | ||
17 | enum layer_number { | ||
18 | _QWERTY = 0, | ||
19 | _COLEMAK, | ||
20 | _DVORAK, | ||
21 | _LOWER, | ||
22 | _RAISE, | ||
23 | _ADJUST | ||
24 | }; | ||
25 | |||
26 | enum custom_keycodes { | ||
27 | QWERTY = SAFE_RANGE, | ||
28 | COLEMAK, | ||
29 | DVORAK, | ||
30 | LOWER, | ||
31 | RAISE, | ||
32 | ADJUST, | ||
33 | BACKLIT, | ||
34 | KANA, | ||
35 | EISU, | ||
36 | RGBRST | ||
37 | }; | ||
38 | |||
39 | enum macro_keycodes { | ||
40 | KC_SAMPLEMACRO, | ||
41 | }; | ||
42 | |||
43 | //Macros | ||
44 | #define M_SAMPLE M(KC_SAMPLEMACRO) | ||
45 | |||
46 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ | ||
47 | /* Qwerty | ||
48 | * ,-----------------------------------------. ,-----------------------------------------. | ||
49 | * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | ||
50 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
51 | * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
52 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
53 | * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | | ||
54 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
55 | * | Esc |ADJUST| Win | Alt |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | ||
56 | * `-----------------------------------------' `-----------------------------------------' | ||
57 | */ | ||
58 | [_QWERTY] = LAYOUT_ortho_4x12( | ||
59 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ | ||
60 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ | ||
61 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ | ||
62 | KC_ESC, ADJUST, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
63 | ), | ||
64 | |||
65 | /* Colemak | ||
66 | * ,-----------------------------------------. ,-----------------------------------------. | ||
67 | * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | | ||
68 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
69 | * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | | ||
70 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
71 | * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | | ||
72 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
73 | * | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | ||
74 | * `-----------------------------------------' `-----------------------------------------' | ||
75 | */ | ||
76 | [_COLEMAK] = LAYOUT_ortho_4x12( \ | ||
77 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ | ||
78 | KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ | ||
79 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ | ||
80 | KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
81 | ), | ||
82 | |||
83 | /* Dvorak | ||
84 | * ,-----------------------------------------. ,-----------------------------------------. | ||
85 | * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | | ||
86 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
87 | * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | | ||
88 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
89 | * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | | ||
90 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
91 | * | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | ||
92 | * `-----------------------------------------' `-----------------------------------------' | ||
93 | */ | ||
94 | [_DVORAK] = LAYOUT_ortho_4x12( \ | ||
95 | KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ | ||
96 | KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ | ||
97 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ | ||
98 | KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | ||
99 | ), | ||
100 | |||
101 | /* Lower | ||
102 | * ,-----------------------------------------. ,-----------------------------------------. | ||
103 | * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
104 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
105 | * | | | | | | | | - | _ | + | { | } | | | | ||
106 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
107 | * | | | | | | | | | | | Home | End | | | ||
108 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
109 | * | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
110 | * `-----------------------------------------' `-----------------------------------------' | ||
111 | */ | ||
112 | [_LOWER] = LAYOUT_ortho_4x12( \ | ||
113 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ | ||
114 | _______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ | ||
115 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, \ | ||
116 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ | ||
117 | ), | ||
118 | |||
119 | /* Raise | ||
120 | * ,-----------------------------------------. ,-----------------------------------------. | ||
121 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
122 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
123 | * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | ||
124 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
125 | * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | ||
126 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
127 | * | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
128 | * `-----------------------------------------' `-----------------------------------------' | ||
129 | */ | ||
130 | [_RAISE] = LAYOUT_ortho_4x12( \ | ||
131 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | ||
132 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ | ||
133 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ | ||
134 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ | ||
135 | ), | ||
136 | |||
137 | /* Adjust (Lower + Raise) | ||
138 | * ,-----------------------------------------. ,-----------------------------------------. | ||
139 | * | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | | ||
140 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
141 | * | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
142 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
143 | * | | MODE | HUE- | SAT- | VAL- | | | | | | | | | | ||
144 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
145 | * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End | | ||
146 | * `-----------------------------------------' `-----------------------------------------' | ||
147 | */ | ||
148 | [_ADJUST] = LAYOUT_ortho_4x12( \ | ||
149 | _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \ | ||
150 | _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\ | ||
151 | _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,\ | ||
152 | _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ | ||
153 | ) | ||
154 | }; | ||
155 | |||
156 | // define variables for reactive RGB | ||
157 | bool TOG_STATUS = false; | ||
158 | |||
159 | // Setting ADJUST layer RGB back to default | ||
160 | void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { | ||
161 | if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { | ||
162 | #ifdef RGBLIGHT_ENABLE | ||
163 | rgblight_mode_noeeprom(RGB_current_config.mode); | ||
164 | #endif | ||
165 | layer_on(layer3); | ||
166 | } else { | ||
167 | layer_off(layer3); | ||
168 | } | ||
169 | } | ||
170 | |||
171 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
172 | switch (keycode) { | ||
173 | case QWERTY: | ||
174 | if (record->event.pressed) { | ||
175 | set_single_persistent_default_layer(_QWERTY); | ||
176 | } | ||
177 | return false; | ||
178 | break; | ||
179 | case COLEMAK: | ||
180 | if (record->event.pressed) { | ||
181 | set_single_persistent_default_layer(_COLEMAK); | ||
182 | } | ||
183 | return false; | ||
184 | break; | ||
185 | case DVORAK: | ||
186 | if (record->event.pressed) { | ||
187 | set_single_persistent_default_layer(_DVORAK); | ||
188 | } | ||
189 | return false; | ||
190 | break; | ||
191 | |||
192 | case LOWER: | ||
193 | if (record->event.pressed) { | ||
194 | //not sure how to have keyboard check mode and set it to a variable, so my work around | ||
195 | //uses another variable that would be set to true after the first time a reactive key is pressed. | ||
196 | if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false | ||
197 | } else { | ||
198 | TOG_STATUS = !TOG_STATUS; | ||
199 | #ifdef RGBLIGHT_ENABLE | ||
200 | rgblight_mode_noeeprom(16); | ||
201 | #endif | ||
202 | } | ||
203 | layer_on(_LOWER); | ||
204 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
205 | } else { | ||
206 | #ifdef RGBLIGHT_ENABLE | ||
207 | rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change | ||
208 | #endif | ||
209 | TOG_STATUS = false; | ||
210 | layer_off(_LOWER); | ||
211 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
212 | } | ||
213 | return false; | ||
214 | break; | ||
215 | |||
216 | case RAISE: | ||
217 | if (record->event.pressed) { | ||
218 | //not sure how to have keyboard check mode and set it to a variable, so my work around | ||
219 | //uses another variable that would be set to true after the first time a reactive key is pressed. | ||
220 | if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false | ||
221 | } else { | ||
222 | TOG_STATUS = !TOG_STATUS; | ||
223 | #ifdef RGBLIGHT_ENABLE | ||
224 | rgblight_mode_noeeprom(15); | ||
225 | #endif | ||
226 | } | ||
227 | layer_on(_RAISE); | ||
228 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
229 | } else { | ||
230 | #ifdef RGBLIGHT_ENABLE | ||
231 | rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change | ||
232 | #endif | ||
233 | layer_off(_RAISE); | ||
234 | TOG_STATUS = false; | ||
235 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
236 | } | ||
237 | return false; | ||
238 | break; | ||
239 | |||
240 | case ADJUST: | ||
241 | if (record->event.pressed) { | ||
242 | layer_on(_ADJUST); | ||
243 | } else { | ||
244 | layer_off(_ADJUST); | ||
245 | } | ||
246 | return false; | ||
247 | break; | ||
248 | //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released | ||
249 | case RGB_MOD: | ||
250 | #ifdef RGBLIGHT_ENABLE | ||
251 | if (record->event.pressed) { | ||
252 | rgblight_mode_noeeprom(RGB_current_config.mode); | ||
253 | rgblight_step(); | ||
254 | RGB_current_config.mode = rgblight_config.mode; | ||
255 | } | ||
256 | #endif | ||
257 | return false; | ||
258 | break; | ||
259 | |||
260 | case EISU: | ||
261 | if (record->event.pressed) { | ||
262 | if(keymap_config.swap_lalt_lgui==false){ | ||
263 | register_code(KC_LANG2); | ||
264 | }else{ | ||
265 | SEND_STRING(SS_LALT("`")); | ||
266 | } | ||
267 | } else { | ||
268 | unregister_code(KC_LANG2); | ||
269 | } | ||
270 | return false; | ||
271 | break; | ||
272 | case KANA: | ||
273 | if (record->event.pressed) { | ||
274 | if(keymap_config.swap_lalt_lgui==false){ | ||
275 | register_code(KC_LANG1); | ||
276 | }else{ | ||
277 | SEND_STRING(SS_LALT("`")); | ||
278 | } | ||
279 | } else { | ||
280 | unregister_code(KC_LANG1); | ||
281 | } | ||
282 | return false; | ||
283 | break; | ||
284 | |||
285 | case RGBRST: | ||
286 | #ifdef RGBLIGHT_ENABLE | ||
287 | if (record->event.pressed) { | ||
288 | eeconfig_update_rgblight_default(); | ||
289 | rgblight_enable(); | ||
290 | RGB_current_config = rgblight_config; | ||
291 | } | ||
292 | #endif | ||
293 | break; | ||
294 | } | ||
295 | return true; | ||
296 | } | ||
297 | |||
298 | |||
299 | void matrix_init_user(void) { | ||
300 | #ifdef RGBLIGHT_ENABLE | ||
301 | rgblight_init(); | ||
302 | RGB_current_config = rgblight_config; | ||
303 | #endif | ||
304 | } | ||
305 | |||
306 | |||
diff --git a/keyboards/zinc/keymaps/default/readme_jp.md b/keyboards/zinc/keymaps/default/readme_jp.md new file mode 100644 index 000000000..f6e91f0c8 --- /dev/null +++ b/keyboards/zinc/keymaps/default/readme_jp.md | |||
@@ -0,0 +1,123 @@ | |||
1 | # The Default Zinc Layout | ||
2 | ## 配列 | ||
3 | |||
4 | ### Qwerty配列 | ||
5 | |||
6 | ``` | ||
7 | ,-----------------------------------------. ,-----------------------------------------. | ||
8 | | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | ||
9 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
10 | | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
11 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
12 | | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | | ||
13 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
14 | | Esc | Fn | Alt | Win |Lower |Space | | Space| Raise| Left | Down | Up | Right| | ||
15 | `------------------------------------------ ------------------------------------------' | ||
16 | ``` | ||
17 | |||
18 | ### Colemak | ||
19 | |||
20 | ``` | ||
21 | ,-----------------------------------------. ,-----------------------------------------. | ||
22 | | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | | ||
23 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
24 | | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | | ||
25 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
26 | | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | | ||
27 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
28 | | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | ||
29 | `------------------------------------------ ------------------------------------------' | ||
30 | ``` | ||
31 | |||
32 | ### Dvorak | ||
33 | |||
34 | ``` | ||
35 | ,-----------------------------------------. ,-----------------------------------------. | ||
36 | | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | | ||
37 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
38 | | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | | ||
39 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
40 | | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | | ||
41 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
42 | | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | ||
43 | `-----------------------------------------' `-----------------------------------------' | ||
44 | ``` | ||
45 | |||
46 | |||
47 | ## コンパイルの仕方 | ||
48 | |||
49 | コンパイルは、qmk_firmware のトップディレクトリで行います。 | ||
50 | |||
51 | ``` | ||
52 | $ cd qmk_firmware | ||
53 | ``` | ||
54 | qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 | ||
55 | |||
56 | ``` | ||
57 | $ make zinc:default | ||
58 | ``` | ||
59 | |||
60 | キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 | ||
61 | |||
62 | ``` | ||
63 | $ make zinc:default:avrdude | ||
64 | ``` | ||
65 | |||
66 | コンパイル結果と中間生成物を消去したい場合は以下のようにします。 | ||
67 | |||
68 | ``` | ||
69 | $ make zinc:default:clean | ||
70 | ``` | ||
71 | |||
72 | ## カスタマイズ | ||
73 | |||
74 | コマンドラインからオプションを指定してビルドすることが出来ます。 | ||
75 | |||
76 | ``` | ||
77 | # Zinc keyboard 'default' keymap: convenient command line option | ||
78 | make ZINC=<options> zinc:defualt | ||
79 | # option= back | under | na | ios | ||
80 | # ex. | ||
81 | # make ZINC=under zinc:defualt | ||
82 | # make ZINC=under,ios zinc:defualt | ||
83 | # make ZINC=back zinc:default | ||
84 | # make ZINC=back,na zinc:default | ||
85 | # make ZINC=back,ios zinc:default | ||
86 | ``` | ||
87 | |||
88 | あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/default/rules.mk` の以下の部分を直接編集して機能を有効化してください。 | ||
89 | |||
90 | ``` | ||
91 | # Zinc keyboard customize | ||
92 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | ||
93 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | ||
94 | LED_ANIMATIONS = yes # LED animations | ||
95 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
96 | |||
97 | |||
98 | ``` | ||
99 | |||
100 | ## RGB backlight を有効にする | ||
101 | |||
102 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
103 | ``` | ||
104 | LED_BACK_ENABLE = yes # LED backlight (Enable SK6812mini backlight) | ||
105 | ``` | ||
106 | |||
107 | |||
108 | ## RGB Underglow を有効にする | ||
109 | |||
110 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
111 | ``` | ||
112 | LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) | ||
113 | ``` | ||
114 | |||
115 | |||
116 | ## iPad/iPhoneサポートを有効にする。 | ||
117 | |||
118 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
119 | RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone にも接続できるようになります。 | ||
120 | |||
121 | ``` | ||
122 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
123 | ``` \ No newline at end of file | ||
diff --git a/keyboards/zinc/keymaps/default/rules.mk b/keyboards/zinc/keymaps/default/rules.mk new file mode 100644 index 000000000..2dcefc001 --- /dev/null +++ b/keyboards/zinc/keymaps/default/rules.mk | |||
@@ -0,0 +1,98 @@ | |||
1 | |||
2 | # Build Options | ||
3 | # change to "no" to disable the options, or define them in the Makefile in | ||
4 | # the appropriate keymap folder that will get included automatically | ||
5 | # | ||
6 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
7 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
8 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
9 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
10 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
11 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
13 | MIDI_ENABLE = no # MIDI controls | ||
14 | AUDIO_ENABLE = no # Audio output on port C6 | ||
15 | UNICODE_ENABLE = no # Unicode | ||
16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
17 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
18 | SWAP_HANDS_ENABLE = no # Enable one-hand typing | ||
19 | |||
20 | define ZINC_CUSTOMISE_MSG | ||
21 | $(info Zinc customize) | ||
22 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) | ||
23 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) | ||
24 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) | ||
25 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) | ||
26 | endef | ||
27 | |||
28 | # Zinc keyboard customize | ||
29 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | ||
30 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | ||
31 | LED_ANIMATIONS = yes # LED animations | ||
32 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
33 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
34 | |||
35 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | ||
36 | #### Do not enable these with audio at the same time. | ||
37 | |||
38 | ### Zinc keyboard 'default' keymap: convenient command line option | ||
39 | ## make ZINC=<options> zinc:defualt | ||
40 | ## option= back | under | na | ios | ||
41 | ## ex. | ||
42 | ## make ZINC=under zinc:defualt | ||
43 | ## make ZINC=under,ios zinc:defualt | ||
44 | ## make ZINC=back zinc:default | ||
45 | ## make ZINC=back,na zinc:default | ||
46 | ## make ZINC=back,ios zinc:default | ||
47 | |||
48 | ifneq ($(strip $(ZINC)),) | ||
49 | ifeq ($(findstring back,$(ZINC)), back) | ||
50 | LED_BACK_ENABLE = yes | ||
51 | else ifeq ($(findstring under,$(ZINC)), under) | ||
52 | LED_UNDERGLOW_ENABLE = yes | ||
53 | endif | ||
54 | ifeq ($(findstring na,$(ZINC)), na) | ||
55 | LED_ANIMATIONS = no | ||
56 | endif | ||
57 | ifeq ($(findstring ios,$(ZINC)), ios) | ||
58 | IOS_DEVICE_ENABLE = yes | ||
59 | endif | ||
60 | $(eval $(call ZINC_CUSTOMISE_MSG)) | ||
61 | $(info ) | ||
62 | endif | ||
63 | |||
64 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | ||
65 | RGBLIGHT_ENABLE = yes | ||
66 | OPT_DEFS += -DRGBLED_BACK | ||
67 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
68 | $(eval $(call ZINC_CUSTOMISE_MSG)) | ||
69 | $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') | ||
70 | endif | ||
71 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
72 | RGBLIGHT_ENABLE = yes | ||
73 | else | ||
74 | RGBLIGHT_ENABLE = no | ||
75 | endif | ||
76 | |||
77 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | ||
78 | OPT_DEFS += -DIOS_DEVICE_ENABLE | ||
79 | endif | ||
80 | |||
81 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | ||
82 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS | ||
83 | OPT_DEFS += -DLED_ANIMATIONS | ||
84 | |||
85 | endif | ||
86 | |||
87 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
88 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
89 | endif | ||
90 | |||
91 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
92 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
93 | |||
94 | |||
95 | # Uncomment these for debugging | ||
96 | # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) | ||
97 | # $(info -- OPT_DEFS=$(OPT_DEFS)) | ||
98 | # $(info ) | ||
diff --git a/keyboards/zinc/keymaps/monks/config.h b/keyboards/zinc/keymaps/monks/config.h new file mode 100644 index 000000000..4dcb0724f --- /dev/null +++ b/keyboards/zinc/keymaps/monks/config.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | This is the c configuration file for the keymap | ||
3 | |||
4 | Copyright 2018 monksoffunk | ||
5 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
6 | Copyright 2015 Jack Humbert | ||
7 | |||
8 | This program is free software: you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation, either version 2 of the License, or | ||
11 | (at your option) any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | ||
21 | |||
22 | #pragma once | ||
23 | // if you need more program area, try uncomment follow line | ||
24 | #include "serial_config_simpleapi.h" | ||
25 | |||
26 | // place overrides here | ||
27 | // Selection of RGBLIGHT MODE to use. | ||
28 | #if defined(LED_ANIMATIONS) | ||
29 | #define RGBLIGHT_EFFECT_BREATHING | ||
30 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
31 | #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
32 | #define RGBLIGHT_EFFECT_SNAKE | ||
33 | #define RGBLIGHT_EFFECT_KNIGHT | ||
34 | #define RGBLIGHT_EFFECT_CHRISTMAS | ||
35 | #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
36 | //#define RGBLIGHT_EFFECT_RGB_TEST | ||
37 | //#define RGBLIGHT_EFFECT_ALTERNATING | ||
38 | #endif | ||
diff --git a/keyboards/zinc/keymaps/monks/keymap.c b/keyboards/zinc/keymaps/monks/keymap.c new file mode 100644 index 000000000..5fd7c6aa8 --- /dev/null +++ b/keyboards/zinc/keymaps/monks/keymap.c | |||
@@ -0,0 +1,255 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | extern keymap_config_t keymap_config; | ||
4 | |||
5 | #ifdef RGBLIGHT_ENABLE | ||
6 | //Following line allows macro to read current RGB settings | ||
7 | extern rgblight_config_t rgblight_config; | ||
8 | rgblight_config_t RGB_current_config; | ||
9 | #endif | ||
10 | |||
11 | extern uint8_t is_master; | ||
12 | |||
13 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
14 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
15 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
16 | // entirely and just use numbers. | ||
17 | enum layer_number { | ||
18 | _QWERTY = 0, | ||
19 | _LOWER, | ||
20 | _RAISE, | ||
21 | _ADJUST | ||
22 | }; | ||
23 | |||
24 | enum custom_keycodes { | ||
25 | QWERTY = SAFE_RANGE, | ||
26 | COLEMAK, | ||
27 | DVORAK, | ||
28 | LOWER, | ||
29 | RAISE, | ||
30 | ADJUST, | ||
31 | BACKLIT, | ||
32 | KANA, | ||
33 | EISU, | ||
34 | RGBRST | ||
35 | }; | ||
36 | |||
37 | enum macro_keycodes { | ||
38 | KC_SAMPLEMACRO, | ||
39 | }; | ||
40 | |||
41 | |||
42 | //Macros | ||
43 | #define M_SAMPLE M(KC_SAMPLEMACRO) | ||
44 | |||
45 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ | ||
46 | /* Qwerty | ||
47 | * ,-----------------------------------------. ,-----------------------------------------. | ||
48 | * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | ||
49 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
50 | * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
51 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
52 | * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | | ||
53 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
54 | * | Esc |ADJUST| Alt | GUI |LOWER |Space | | Space| RAISE| KANA | Left | Down | Right| | ||
55 | * `-----------------------------------------' `-----------------------------------------' | ||
56 | */ | ||
57 | [_QWERTY] = LAYOUT_ortho_4x12( | ||
58 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ | ||
59 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ | ||
60 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ | ||
61 | KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_RGHT \ | ||
62 | ), | ||
63 | |||
64 | /* Lower | ||
65 | * ,-----------------------------------------. ,-----------------------------------------. | ||
66 | * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
67 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
68 | * | | | | | | | | - | _ | + | { | } | | | | ||
69 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
70 | * | | | | | | | | | | | | UP | | | ||
71 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
72 | * | | | | | | | | | | | | | | | ||
73 | * `-----------------------------------------' `-----------------------------------------' | ||
74 | */ | ||
75 | [_LOWER] = LAYOUT_ortho_4x12( \ | ||
76 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ | ||
77 | _______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ | ||
78 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, \ | ||
79 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
80 | ), | ||
81 | |||
82 | /* Raise | ||
83 | * ,-----------------------------------------. ,-----------------------------------------. | ||
84 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
85 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
86 | * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | ||
87 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
88 | * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | ? | | | ||
89 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
90 | * | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
91 | * `-----------------------------------------' `-----------------------------------------' | ||
92 | */ | ||
93 | [_RAISE] = LAYOUT_ortho_4x12( \ | ||
94 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | ||
95 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ | ||
96 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, S(KC_SLSH), _______, \ | ||
97 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ | ||
98 | ), | ||
99 | |||
100 | /* Adjust (Lower + Raise) | ||
101 | * ,-----------------------------------------. ,-----------------------------------------. | ||
102 | * | | Reset|RGBRST| | | | | | | | | | Ins | | ||
103 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
104 | * | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
105 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
106 | * | | MODE | HUE- | SAT- | VAL- | | | | | | |PageUp| | | ||
107 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
108 | * | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | | ||
109 | * `-----------------------------------------' `-----------------------------------------' | ||
110 | */ | ||
111 | [_ADJUST] = LAYOUT_ortho_4x12( \ | ||
112 | _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ | ||
113 | _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\ | ||
114 | _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, KC_PGUP, _______,\ | ||
115 | _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KANA, KC_HOME, KC_PGDN, KC_END\ | ||
116 | ) | ||
117 | }; | ||
118 | |||
119 | // define variables for reactive RGB | ||
120 | bool TOG_STATUS = false; | ||
121 | |||
122 | // Setting ADJUST layer RGB back to default | ||
123 | void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { | ||
124 | if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { | ||
125 | #ifdef RGBLIGHT_ENABLE | ||
126 | rgblight_mode_noeeprom(RGB_current_config.mode); | ||
127 | #endif | ||
128 | layer_on(layer3); | ||
129 | } else { | ||
130 | layer_off(layer3); | ||
131 | } | ||
132 | } | ||
133 | |||
134 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
135 | switch (keycode) { | ||
136 | case QWERTY: | ||
137 | if (record->event.pressed) { | ||
138 | set_single_persistent_default_layer(_QWERTY); | ||
139 | } | ||
140 | return false; | ||
141 | break; | ||
142 | |||
143 | case LOWER: | ||
144 | if (record->event.pressed) { | ||
145 | //not sure how to have keyboard check mode and set it to a variable, so my work around | ||
146 | //uses another variable that would be set to true after the first time a reactive key is pressed. | ||
147 | if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false | ||
148 | } else { | ||
149 | TOG_STATUS = !TOG_STATUS; | ||
150 | #ifdef RGBLIGHT_ENABLE | ||
151 | rgblight_mode_noeeprom(16); | ||
152 | #endif | ||
153 | } | ||
154 | layer_on(_LOWER); | ||
155 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
156 | } else { | ||
157 | #ifdef RGBLIGHT_ENABLE | ||
158 | rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change | ||
159 | #endif | ||
160 | TOG_STATUS = false; | ||
161 | layer_off(_LOWER); | ||
162 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
163 | } | ||
164 | return false; | ||
165 | break; | ||
166 | |||
167 | case RAISE: | ||
168 | if (record->event.pressed) { | ||
169 | //not sure how to have keyboard check mode and set it to a variable, so my work around | ||
170 | //uses another variable that would be set to true after the first time a reactive key is pressed. | ||
171 | if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false | ||
172 | } else { | ||
173 | TOG_STATUS = !TOG_STATUS; | ||
174 | #ifdef RGBLIGHT_ENABLE | ||
175 | rgblight_mode_noeeprom(15); | ||
176 | #endif | ||
177 | } | ||
178 | layer_on(_RAISE); | ||
179 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
180 | } else { | ||
181 | #ifdef RGBLIGHT_ENABLE | ||
182 | rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change | ||
183 | #endif | ||
184 | layer_off(_RAISE); | ||
185 | TOG_STATUS = false; | ||
186 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
187 | } | ||
188 | return false; | ||
189 | break; | ||
190 | |||
191 | case ADJUST: | ||
192 | if (record->event.pressed) { | ||
193 | layer_on(_ADJUST); | ||
194 | } else { | ||
195 | layer_off(_ADJUST); | ||
196 | } | ||
197 | return false; | ||
198 | break; | ||
199 | //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released | ||
200 | case RGB_MOD: | ||
201 | #ifdef RGBLIGHT_ENABLE | ||
202 | if (record->event.pressed) { | ||
203 | rgblight_mode_noeeprom(RGB_current_config.mode); | ||
204 | rgblight_step(); | ||
205 | RGB_current_config.mode = rgblight_config.mode; | ||
206 | } | ||
207 | #endif | ||
208 | return false; | ||
209 | break; | ||
210 | |||
211 | case EISU: | ||
212 | if (record->event.pressed) { | ||
213 | if(keymap_config.swap_lalt_lgui==false){ | ||
214 | register_code(KC_LANG2); | ||
215 | }else{ | ||
216 | SEND_STRING(SS_LALT("`")); | ||
217 | } | ||
218 | } else { | ||
219 | unregister_code(KC_LANG2); | ||
220 | } | ||
221 | return false; | ||
222 | break; | ||
223 | case KANA: | ||
224 | if (record->event.pressed) { | ||
225 | if(keymap_config.swap_lalt_lgui==false){ | ||
226 | register_code(KC_LANG1); | ||
227 | }else{ | ||
228 | SEND_STRING(SS_LALT("`")); | ||
229 | } | ||
230 | } else { | ||
231 | unregister_code(KC_LANG1); | ||
232 | } | ||
233 | return false; | ||
234 | break; | ||
235 | |||
236 | case RGBRST: | ||
237 | #ifdef RGBLIGHT_ENABLE | ||
238 | if (record->event.pressed) { | ||
239 | eeconfig_update_rgblight_default(); | ||
240 | rgblight_enable(); | ||
241 | RGB_current_config = rgblight_config; | ||
242 | } | ||
243 | #endif | ||
244 | break; | ||
245 | } | ||
246 | return true; | ||
247 | } | ||
248 | |||
249 | |||
250 | void matrix_init_user(void) { | ||
251 | #ifdef RGBLIGHT_ENABLE | ||
252 | rgblight_init(); | ||
253 | RGB_current_config = rgblight_config; | ||
254 | #endif | ||
255 | } | ||
diff --git a/keyboards/zinc/keymaps/monks/readme_jp.md b/keyboards/zinc/keymaps/monks/readme_jp.md new file mode 100644 index 000000000..680e2866c --- /dev/null +++ b/keyboards/zinc/keymaps/monks/readme_jp.md | |||
@@ -0,0 +1,103 @@ | |||
1 | # monksoffunk's personal zinc Layout | ||
2 | ## 配列 | ||
3 | |||
4 | ### Qwerty配列 | ||
5 | |||
6 | ``` | ||
7 | ,-----------------------------------------. ,-----------------------------------------. | ||
8 | | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | ||
9 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
10 | | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
11 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
12 | | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | | ||
13 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
14 | | Esc |ADJUST| Alt | GUI |LOWER |Space | | Space| RAISE| KANA | Left | Down | Right| | ||
15 | `------------------------------------------ ------------------------------------------' | ||
16 | ``` | ||
17 | |||
18 | KANAキーを独立させ、UPキーをLOWER+スラッシュに当てています。そのほかデフォルトからレイヤーをかなりいじっています。 | ||
19 | また、RGB LEDがアンコメントしてありますので、実装していない場合はソースを見て適宜コメントアウトしてください。 | ||
20 | |||
21 | ## コンパイルの仕方 | ||
22 | |||
23 | コンパイルは、qmk_firmware のトップディレクトリで行います。 | ||
24 | |||
25 | ``` | ||
26 | $ cd qmk_firmware | ||
27 | ``` | ||
28 | qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 | ||
29 | |||
30 | ``` | ||
31 | $ make zinc:monks | ||
32 | ``` | ||
33 | |||
34 | キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 | ||
35 | |||
36 | ``` | ||
37 | $ make zinc:monks:avrdude | ||
38 | ``` | ||
39 | |||
40 | コンパイル結果と中間生成物を消去したい場合は以下のようにします。 | ||
41 | |||
42 | ``` | ||
43 | $ make zinc:monks:clean | ||
44 | ``` | ||
45 | |||
46 | なお、avrdudeではなくQMK Toolbox(GUIツール)を使う方法もあります。 | ||
47 | |||
48 | https://github.com/qmk/qmk_toolbox/releases | ||
49 | |||
50 | その場合は、$ make zinc:monksでビルドした成果物をQMK Toolboxから指定してください。 | ||
51 | |||
52 | ## カスタマイズ | ||
53 | |||
54 | コマンドラインからオプションを指定してビルドすることが出来ます。 | ||
55 | |||
56 | ``` | ||
57 | # Zinc keyboard 'monks' keymap: convenient command line option | ||
58 | make ZINC=<options> zinc:monks | ||
59 | # option= back | under | na | ios | ||
60 | # ex. | ||
61 | # make ZINC=under zinc:monks | ||
62 | # make ZINC=under,ios zinc:monks | ||
63 | # make ZINC=back zinc:monks | ||
64 | # make ZINC=back,na zinc:monks | ||
65 | # make ZINC=back,ios zinc:monks | ||
66 | ``` | ||
67 | |||
68 | あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/monks/rules.mk` の以下の部分を編集して機能を有効化してください。 | ||
69 | |||
70 | ``` | ||
71 | # Zinc keyboard customize | ||
72 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | ||
73 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | ||
74 | LED_ANIMATIONS = yes # LED animations | ||
75 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
76 | |||
77 | |||
78 | ``` | ||
79 | |||
80 | ## RGB backlight を有効にする | ||
81 | |||
82 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
83 | ``` | ||
84 | LED_BACK_ENABLE = yes # LED backlight (Enable SK6812mini backlight) | ||
85 | ``` | ||
86 | |||
87 | |||
88 | ## RGB Underglow を有効にする | ||
89 | |||
90 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
91 | ``` | ||
92 | LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight) | ||
93 | ``` | ||
94 | |||
95 | |||
96 | ## iPad/iPhoneサポートを有効にする。 | ||
97 | |||
98 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
99 | RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone にも接続できるようになります。 | ||
100 | |||
101 | ``` | ||
102 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
103 | ``` \ No newline at end of file | ||
diff --git a/keyboards/zinc/keymaps/monks/rules.mk b/keyboards/zinc/keymaps/monks/rules.mk new file mode 100644 index 000000000..a5335def8 --- /dev/null +++ b/keyboards/zinc/keymaps/monks/rules.mk | |||
@@ -0,0 +1,100 @@ | |||
1 | |||
2 | # Build Options | ||
3 | # change to "no" to disable the options, or define them in the Makefile in | ||
4 | # the appropriate keymap folder that will get included automatically | ||
5 | # | ||
6 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
7 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
8 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
9 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
10 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
11 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
13 | MIDI_ENABLE = no # MIDI controls | ||
14 | AUDIO_ENABLE = no # Audio output on port C6 | ||
15 | UNICODE_ENABLE = no # Unicode | ||
16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
17 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
18 | SWAP_HANDS_ENABLE = no # Enable one-hand typing | ||
19 | |||
20 | define ZINC_CUSTOMISE_MSG | ||
21 | $(info Zinc customize) | ||
22 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) | ||
23 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) | ||
24 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) | ||
25 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) | ||
26 | endef | ||
27 | |||
28 | # Zinc keyboard customize | ||
29 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | ||
30 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | ||
31 | LED_ANIMATIONS = yes # LED animations | ||
32 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
33 | Link_Time_Optimization = no # if firmware size over limit, try this option | ||
34 | |||
35 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | ||
36 | #### Do not enable these with audio at the same time. | ||
37 | |||
38 | ### Zinc keyboard 'default' keymap: convenient command line option | ||
39 | ## make ZINC=<options> zinc:defualt | ||
40 | ## option= back | under | na | ios | ||
41 | ## ex. | ||
42 | ## make ZINC=under zinc:defualt | ||
43 | ## make ZINC=under,ios zinc:defualt | ||
44 | ## make ZINC=back zinc:default | ||
45 | ## make ZINC=back,na zinc:default | ||
46 | ## make ZINC=back,ios zinc:default | ||
47 | |||
48 | ifneq ($(strip $(ZINC)),) | ||
49 | ifeq ($(findstring back,$(ZINC)), back) | ||
50 | LED_BACK_ENABLE = yes | ||
51 | else ifeq ($(findstring under,$(ZINC)), under) | ||
52 | LED_UNDERGLOW_ENABLE = yes | ||
53 | endif | ||
54 | ifeq ($(findstring na,$(ZINC)), na) | ||
55 | LED_ANIMATIONS = no | ||
56 | endif | ||
57 | ifeq ($(findstring ios,$(ZINC)), ios) | ||
58 | IOS_DEVICE_ENABLE = yes | ||
59 | endif | ||
60 | $(eval $(call ZINC_CUSTOMISE_MSG)) | ||
61 | $(info ) | ||
62 | endif | ||
63 | |||
64 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | ||
65 | RGBLIGHT_ENABLE = yes | ||
66 | OPT_DEFS += -DRGBLED_BACK | ||
67 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
68 | $(eval $(call ZINC_CUSTOMISE_MSG)) | ||
69 | $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') | ||
70 | endif | ||
71 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
72 | RGBLIGHT_ENABLE = yes | ||
73 | else | ||
74 | RGBLIGHT_ENABLE = no | ||
75 | endif | ||
76 | |||
77 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | ||
78 | OPT_DEFS += -DIOS_DEVICE_ENABLE | ||
79 | endif | ||
80 | |||
81 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | ||
82 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS | ||
83 | OPT_DEFS += -DLED_ANIMATIONS | ||
84 | endif | ||
85 | |||
86 | ifeq ($(strip $(Link_Time_Optimization)),yes) | ||
87 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | ||
88 | endif | ||
89 | |||
90 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
91 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
92 | |||
93 | ifndef QUANTUM_DIR | ||
94 | include ../../../../Makefile | ||
95 | endif | ||
96 | |||
97 | # Uncomment these for debugging | ||
98 | # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) | ||
99 | # $(info -- OPT_DEFS=$(OPT_DEFS)) | ||
100 | # $(info ) | ||