aboutsummaryrefslogtreecommitdiff
path: root/keyboards/zinc/keymaps
diff options
context:
space:
mode:
authorginjake <hsginjake123@gmail.com>2018-12-30 01:19:34 +0900
committerDrashna Jaelre <drashna@live.com>2018-12-29 08:19:34 -0800
commitcc7bf108a93416036e3cd4d3e129abd56dfa9350 (patch)
tree1c1116685905b1617d3860ea43645a25c0da0ba7 /keyboards/zinc/keymaps
parentbb1b44132514fc30de7de77f2c6a80b8c7ba0416 (diff)
downloadqmk_firmware-cc7bf108a93416036e3cd4d3e129abd56dfa9350.tar.gz
qmk_firmware-cc7bf108a93416036e3cd4d3e129abd56dfa9350.zip
Keymap: add ginjake keymap for the zinc keyboard (#4741)
* サンシャインぴっかぴかモード実装 * サンシャインぴっかぴかモード
Diffstat (limited to 'keyboards/zinc/keymaps')
-rw-r--r--keyboards/zinc/keymaps/ginjake/config.h38
-rw-r--r--keyboards/zinc/keymaps/ginjake/keymap.c368
-rw-r--r--keyboards/zinc/keymaps/ginjake/readme_jp.md123
-rw-r--r--keyboards/zinc/keymaps/ginjake/rules.mk98
4 files changed, 627 insertions, 0 deletions
diff --git a/keyboards/zinc/keymaps/ginjake/config.h b/keyboards/zinc/keymaps/ginjake/config.h
new file mode 100644
index 000000000..4dcb0724f
--- /dev/null
+++ b/keyboards/zinc/keymaps/ginjake/config.h
@@ -0,0 +1,38 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2018 monksoffunk
5Copyright 2012 Jun Wako <wakojun@gmail.com>
6Copyright 2015 Jack Humbert
7
8This program is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along 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/ginjake/keymap.c b/keyboards/zinc/keymaps/ginjake/keymap.c
new file mode 100644
index 000000000..323d2c7d4
--- /dev/null
+++ b/keyboards/zinc/keymaps/ginjake/keymap.c
@@ -0,0 +1,368 @@
1#include QMK_KEYBOARD_H
2
3extern keymap_config_t keymap_config;
4
5#ifdef RGBLIGHT_ENABLE
6//Following line allows macro to read current RGB settings
7extern rgblight_config_t rgblight_config;
8rgblight_config_t RGB_current_config;
9#endif
10
11extern 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.
17enum layer_number {
18 _QWERTY = 0,
19 _COLEMAK,
20 _DVORAK,
21 _LOWER,
22 _RAISE,
23 _ADJUST
24};
25
26enum 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 AQOURS, //サンシャインぴっかぴかモード
38};
39
40#ifdef RGBLIGHT_ENABLE
41 //9色に変化するLEDのHSV各パラメータ
42 int aqours_h[] = { 26, 340, 150, 0, 199, 220, 53, 265, 322};
43 int aqours_s[] = {255, 165, 255, 255, 255, 350, 255, 255, 255};
44 int aqours_v[] = {255, 255, 255, 255, 255, 255, 255, 255, 255};
45 const int NEXT_COLOR_TIME = 2400; //次の色に切り替わるまでの時間
46 const int NEXT_CHANGE_TARGET_TIME = 100; //次のキーに色が伝播するまでの時間
47 bool aqours_mode = false;
48 int aqours_next_color_timer_count = 0;
49 int aqours_num = 0;
50 int target_col = 0;
51
52 //keyのmatrixの位置とLEDの番号を紐づける
53 int combined_key_to_led[] =
54 {
55 0,1,2,3,4,5,
56 11,10,9,8,7,6,
57 12,13,14,15,16,17,
58 23,22,21,20,19,18
59 };
60#endif
61
62enum macro_keycodes {
63 KC_SAMPLEMACRO,
64};
65
66//Macros
67#define M_SAMPLE M(KC_SAMPLEMACRO)
68
69const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \
70 /* Qwerty
71 * ,-----------------------------------------. ,-----------------------------------------.
72 * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
73 * |------+------+------+------+------+------| |------+------+------+------+------+------|
74 * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
75 * |------+------+------+------+------+------| |------+------+------+------+------+------|
76 * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
77 * |------+------+------+------+------+------| |------+------+------+------+------+------|
78 * | Esc |ADJUST| Win | Alt |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
79 * `-----------------------------------------' `-----------------------------------------'
80 */
81[_QWERTY] = LAYOUT_ortho_4x12(
82 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
83 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
84 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
85 KC_ESC, ADJUST, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
86 ),
87
88 /* Colemak
89 * ,-----------------------------------------. ,-----------------------------------------.
90 * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
91 * |------+------+------+------+------+------| |------+------+------+------+------+------|
92 * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
93 * |------+------+------+------+------+------| |------+------+------+------+------+------|
94 * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter |
95 * |------+------+------+------+------+------| |------+------+------+------+------+------|
96 * | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
97 * `-----------------------------------------' `-----------------------------------------'
98 */
99 [_COLEMAK] = LAYOUT_ortho_4x12( \
100 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
101 KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
102 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
103 KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
104 ),
105
106 /* Dvorak
107 * ,-----------------------------------------. ,-----------------------------------------.
108 * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del |
109 * |------+------+------+------+------+------| |------+------+------+------+------+------|
110 * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / |
111 * |------+------+------+------+------+------| |------+------+------+------+------+------|
112 * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter |
113 * |------+------+------+------+------+------| |------+------+------+------+------+------|
114 * | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
115 * `-----------------------------------------' `-----------------------------------------'
116 */
117 [_DVORAK] = LAYOUT_ortho_4x12( \
118 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
119 KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
120 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
121 KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
122 ),
123
124 /* Lower
125 * ,-----------------------------------------. ,-----------------------------------------.
126 * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
127 * |------+------+------+------+------+------| |------+------+------+------+------+------|
128 * | | | | | | | | - | _ | + | { | } | | |
129 * |------+------+------+------+------+------| |------+------+------+------+------+------|
130 * | | | | | | | | | | | Home | End | |
131 * |------+------+------+------+------+------| |------+------+------+------+------+------|
132 * | | | | | | | | | | Next | Vol- | Vol+ | Play |
133 * `-----------------------------------------' `-----------------------------------------'
134 */
135 [_LOWER] = LAYOUT_ortho_4x12( \
136 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
137 _______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, \
139 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
140 ),
141
142 /* Raise
143 * ,-----------------------------------------. ,-----------------------------------------.
144 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
145 * |------+------+------+------+------+------| |------+------+------+------+------+------|
146 * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
147 * |------+------+------+------+------+------| |------+------+------+------+------+------|
148 * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | |
149 * |------+------+------+------+------+------| |------+------+------+------+------+------|
150 * | | | | | | | | | | Next | Vol- | Vol+ | Play |
151 * `-----------------------------------------' `-----------------------------------------'
152 */
153 [_RAISE] = LAYOUT_ortho_4x12( \
154 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
155 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
156 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \
157 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
158 ),
159
160 /* Adjust (Lower + Raise)
161 * ,-----------------------------------------. ,-----------------------------------------.
162 * | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins |
163 * |------+------+------+------+------+------| |------+------+------+------+------+------|
164 * |AQOURS|RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause |
165 * |------+------+------+------+------+------| |------+------+------+------+------+------|
166 * | | MODE | HUE- | SAT- | VAL- | | | | | | | | |
167 * |------+------+------+------+------+------| |------+------+------+------+------+------|
168 * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End |
169 * `-----------------------------------------' `-----------------------------------------'
170 */
171 [_ADJUST] = LAYOUT_ortho_4x12( \
172 _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \
173 AQOURS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\
174 _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,\
175 _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KC_HOME, KC_PGDN, KC_PGUP, KC_END\
176 )
177};
178
179// define variables for reactive RGB
180bool TOG_STATUS = false;
181
182// Setting ADJUST layer RGB back to default
183void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
184 if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
185 #ifdef RGBLIGHT_ENABLE
186 rgblight_mode_noeeprom(RGB_current_config.mode);
187 #endif
188 layer_on(layer3);
189 } else {
190 layer_off(layer3);
191 }
192}
193
194bool process_record_user(uint16_t keycode, keyrecord_t *record) {
195 switch (keycode) {
196 case QWERTY:
197 if (record->event.pressed) {
198 set_single_persistent_default_layer(_QWERTY);
199 }
200 return false;
201 break;
202 case COLEMAK:
203 if (record->event.pressed) {
204 set_single_persistent_default_layer(_COLEMAK);
205 }
206 return false;
207 break;
208 case DVORAK:
209 if (record->event.pressed) {
210 set_single_persistent_default_layer(_DVORAK);
211 }
212 return false;
213 break;
214
215 case LOWER:
216 if (record->event.pressed) {
217 //not sure how to have keyboard check mode and set it to a variable, so my work around
218 //uses another variable that would be set to true after the first time a reactive key is pressed.
219 if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
220 } else {
221 TOG_STATUS = !TOG_STATUS;
222 #ifdef RGBLIGHT_ENABLE
223 rgblight_mode_noeeprom(16);
224 #endif
225 }
226 layer_on(_LOWER);
227 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
228 } else {
229 #ifdef RGBLIGHT_ENABLE
230 rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change
231 #endif
232 TOG_STATUS = false;
233 layer_off(_LOWER);
234 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
235 }
236 return false;
237 break;
238
239 case RAISE:
240 if (record->event.pressed) {
241 //not sure how to have keyboard check mode and set it to a variable, so my work around
242 //uses another variable that would be set to true after the first time a reactive key is pressed.
243 if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
244 } else {
245 TOG_STATUS = !TOG_STATUS;
246 #ifdef RGBLIGHT_ENABLE
247 rgblight_mode_noeeprom(15);
248 #endif
249 }
250 layer_on(_RAISE);
251 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
252 } else {
253 #ifdef RGBLIGHT_ENABLE
254 rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change
255 #endif
256 layer_off(_RAISE);
257 TOG_STATUS = false;
258 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
259 }
260 return false;
261 break;
262
263 case ADJUST:
264 if (record->event.pressed) {
265 layer_on(_ADJUST);
266 } else {
267 layer_off(_ADJUST);
268 }
269 return false;
270 break;
271 //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
272 case RGB_MOD:
273 #ifdef RGBLIGHT_ENABLE
274 if (record->event.pressed) {
275 rgblight_mode_noeeprom(RGB_current_config.mode);
276 rgblight_step();
277 RGB_current_config.mode = rgblight_config.mode;
278 }
279 #endif
280 return false;
281 break;
282
283 case EISU:
284 if (record->event.pressed) {
285 if(keymap_config.swap_lalt_lgui==false){
286 register_code(KC_LANG2);
287 }else{
288 SEND_STRING(SS_LALT("`"));
289 }
290 } else {
291 unregister_code(KC_LANG2);
292 }
293 return false;
294 break;
295 case KANA:
296 if (record->event.pressed) {
297 if(keymap_config.swap_lalt_lgui==false){
298 register_code(KC_LANG1);
299 }else{
300 SEND_STRING(SS_LALT("`"));
301 }
302 } else {
303 unregister_code(KC_LANG1);
304 }
305 return false;
306 break;
307 case AQOURS:
308 #ifdef RGBLIGHT_ENABLE
309 if (record->event.pressed) {
310 aqours_mode = !aqours_mode;
311 }
312 #endif
313 break;
314 case RGBRST:
315 #ifdef RGBLIGHT_ENABLE
316 if (record->event.pressed) {
317 eeconfig_update_rgblight_default();
318 rgblight_enable();
319 RGB_current_config = rgblight_config;
320 }
321 #endif
322 break;
323 }
324 return true;
325}
326
327#ifdef RGBLIGHT_ENABLE
328
329 void aqours_led(void) {
330 aqours_next_color_timer_count++;
331 //一定間隔で色が変化
332 if (aqours_next_color_timer_count > NEXT_COLOR_TIME) {
333 aqours_num++;
334 aqours_next_color_timer_count = 0;
335 target_col = 0;
336 if (aqours_num == sizeof(aqours_h) / sizeof(int)) {
337 aqours_num = 0;
338 }
339 }
340
341 //キー毎に時間差で色が変化していく
342 if (aqours_next_color_timer_count % NEXT_CHANGE_TARGET_TIME == 0) {
343 if (target_col < MATRIX_COLS) {
344 sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[target_col]);
345 sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[11 - target_col]);
346 sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[12 + target_col]);
347 sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[23 - target_col]);
348 target_col++;
349 rgblight_set();
350 }
351 }
352 }
353#endif
354
355void matrix_scan_user(void) {
356 #ifdef RGBLIGHT_ENABLE
357 if (aqours_mode) {
358 aqours_led();
359 }
360 #endif
361}
362
363void matrix_init_user(void) {
364 #ifdef RGBLIGHT_ENABLE
365 rgblight_init();
366 RGB_current_config = rgblight_config;
367 #endif
368}
diff --git a/keyboards/zinc/keymaps/ginjake/readme_jp.md b/keyboards/zinc/keymaps/ginjake/readme_jp.md
new file mode 100644
index 000000000..f6e91f0c8
--- /dev/null
+++ b/keyboards/zinc/keymaps/ginjake/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```
54qmk_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
78make 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
92LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight)
93LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight)
94LED_ANIMATIONS = yes # LED animations
95IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
96
97
98```
99
100## RGB backlight を有効にする
101
102rules.mk の下記の部分を編集して no を yes に変更してください。
103```
104LED_BACK_ENABLE = yes # LED backlight (Enable SK6812mini backlight)
105```
106
107
108## RGB Underglow を有効にする
109
110rules.mk の下記の部分を編集して no を yes に変更してください。
111```
112LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
113```
114
115
116## iPad/iPhoneサポートを有効にする。
117
118rules.mk の下記の部分を編集して no を yes に変更してください。
119RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone にも接続できるようになります。
120
121```
122IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
123``` \ No newline at end of file
diff --git a/keyboards/zinc/keymaps/ginjake/rules.mk b/keyboards/zinc/keymaps/ginjake/rules.mk
new file mode 100644
index 000000000..2dcefc001
--- /dev/null
+++ b/keyboards/zinc/keymaps/ginjake/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#
6BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
7MOUSEKEY_ENABLE = no # Mouse keys(+4700)
8EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
9CONSOLE_ENABLE = no # Console for debug(+400)
10COMMAND_ENABLE = no # Commands for debug and configuration
11NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
12BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
13MIDI_ENABLE = no # MIDI controls
14AUDIO_ENABLE = no # Audio output on port C6
15UNICODE_ENABLE = no # Unicode
16BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
17RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
18SWAP_HANDS_ENABLE = no # Enable one-hand typing
19
20define 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))
26endef
27
28# Zinc keyboard customize
29LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight)
30LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight)
31LED_ANIMATIONS = yes # LED animations
32IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
33Link_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
48ifneq ($(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 )
62endif
63
64ifeq ($(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
71else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
72 RGBLIGHT_ENABLE = yes
73else
74 RGBLIGHT_ENABLE = no
75endif
76
77ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
78 OPT_DEFS += -DIOS_DEVICE_ENABLE
79endif
80
81ifeq ($(strip $(LED_ANIMATIONS)), yes)
82# OPT_DEFS += -DRGBLIGHT_ANIMATIONS
83 OPT_DEFS += -DLED_ANIMATIONS
84
85endif
86
87ifeq ($(strip $(Link_Time_Optimization)),yes)
88 EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization
89endif
90
91# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
92SLEEP_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 )