diff options
-rw-r--r-- | keyboards/zinc/keymaps/via/config.h | 41 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/via/keymap.c | 203 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/via/readme_en.md | 115 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/via/readme_jp.md | 149 | ||||
-rw-r--r-- | keyboards/zinc/keymaps/via/rules.mk | 113 |
5 files changed, 621 insertions, 0 deletions
diff --git a/keyboards/zinc/keymaps/via/config.h b/keyboards/zinc/keymaps/via/config.h new file mode 100644 index 000000000..233977fea --- /dev/null +++ b/keyboards/zinc/keymaps/via/config.h | |||
@@ -0,0 +1,41 @@ | |||
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 | |||
24 | #define DYNAMIC_KEYMAP_LAYER_COUNT 5 | ||
25 | |||
26 | #define RGBLIGHT_LAYERS | ||
27 | |||
28 | // place overrides here | ||
29 | // Selection of RGBLIGHT MODE to use. | ||
30 | #if defined(LED_ANIMATIONS) | ||
31 | #define RGBLIGHT_ANIMATIONS | ||
32 | // #define RGBLIGHT_EFFECT_BREATHINGtt | ||
33 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
34 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
35 | // #define RGBLIGHT_EFFECT_SNAKE | ||
36 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
37 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
38 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
39 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
40 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
41 | #endif | ||
diff --git a/keyboards/zinc/keymaps/via/keymap.c b/keyboards/zinc/keymaps/via/keymap.c new file mode 100644 index 000000000..7c961c710 --- /dev/null +++ b/keyboards/zinc/keymaps/via/keymap.c | |||
@@ -0,0 +1,203 @@ | |||
1 | /* Copyright 2020 monksoffunk | ||
2 | * | ||
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 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | #ifdef RGBLIGHT_ENABLE | ||
20 | //Following line allows macro to read current RGB settings | ||
21 | |||
22 | // Light LEDs 6 to 9 and 12 to 15 red when caps lock is active. Hard to ignore! | ||
23 | const rgblight_segment_t PROGMEM capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
24 | {12, 1, HSV_RED} // Light 4 LEDs, starting with LED 6 | ||
25 | ); | ||
26 | // Light LEDs 9 & 10 in cyan when keyboard layer 1 is active | ||
27 | const rgblight_segment_t PROGMEM lower_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
28 | {24, 6, HSV_GOLDENROD} | ||
29 | ); | ||
30 | // Light LEDs 11 & 12 in purple when keyboard layer 2 is active | ||
31 | const rgblight_segment_t PROGMEM raise_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
32 | {54, 6, HSV_GOLDENROD} | ||
33 | ); | ||
34 | |||
35 | // Now define the array of layers. Later layers take precedence | ||
36 | const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
37 | capslock_layer, | ||
38 | lower_layer, | ||
39 | raise_layer | ||
40 | ); | ||
41 | |||
42 | void keyboard_post_init_user(void) { | ||
43 | // Enable the LED layers | ||
44 | rgblight_layers = rgb_layers; | ||
45 | } | ||
46 | #endif | ||
47 | |||
48 | extern uint8_t is_master; | ||
49 | |||
50 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
51 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
52 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
53 | // entirely and just use numbers. | ||
54 | enum layer_number { | ||
55 | _QWERTY = 0, | ||
56 | _LOWER, | ||
57 | _RAISE, | ||
58 | _ADJUST, | ||
59 | _ADJUST2 | ||
60 | }; | ||
61 | |||
62 | enum custom_keycodes { | ||
63 | QWERTY = SAFE_RANGE, | ||
64 | KANA, | ||
65 | EISU, | ||
66 | ADJUST, | ||
67 | RGBRST | ||
68 | }; | ||
69 | |||
70 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
71 | /* Qwerty | ||
72 | * ,-----------------------------------------. ,-----------------------------------------. | ||
73 | * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | ||
74 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
75 | * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
76 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
77 | * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | | ||
78 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
79 | * | Esc |ADJUST| Win | Alt |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | ||
80 | * `-----------------------------------------' `-----------------------------------------' | ||
81 | */ | ||
82 | [_QWERTY] = LAYOUT_ortho_4x12( | ||
83 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
84 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
85 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
86 | KC_ESC, MO(_ADJUST), KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
87 | ), | ||
88 | |||
89 | /* Lower | ||
90 | * ,-----------------------------------------. ,-----------------------------------------. | ||
91 | * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
92 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
93 | * | | | | | | | | - | _ | + | { | } | | | | ||
94 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
95 | * | | | | | | | | | | | Home | End | | | ||
96 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
97 | * | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
98 | * `-----------------------------------------' `-----------------------------------------' | ||
99 | */ | ||
100 | [_LOWER] = LAYOUT_ortho_4x12( | ||
101 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, | ||
102 | _______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, | ||
103 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, | ||
104 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
105 | ), | ||
106 | |||
107 | /* Raise | ||
108 | * ,-----------------------------------------. ,-----------------------------------------. | ||
109 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
110 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
111 | * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | ||
112 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
113 | * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | ||
114 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
115 | * | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
116 | * `-----------------------------------------' `-----------------------------------------' | ||
117 | */ | ||
118 | [_RAISE] = LAYOUT_ortho_4x12( | ||
119 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, | ||
120 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | ||
121 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, | ||
122 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
123 | ), | ||
124 | |||
125 | /* Adjust (Lower + Raise) | ||
126 | * ,-----------------------------------------. ,-----------------------------------------. | ||
127 | * | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | | ||
128 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
129 | * | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
130 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
131 | * |MODE R| MODE | HUE- | SAT- | VAL- | | | | | | |PageUp| | | ||
132 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
133 | * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End | | ||
134 | * `-----------------------------------------' `-----------------------------------------' | ||
135 | */ | ||
136 | [_ADJUST] = LAYOUT_ortho_4x12( | ||
137 | _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, _______, _______, _______, KC_INS, | ||
138 | _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS, | ||
139 | RGB_RMOD,RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, KC_PGUP, _______, | ||
140 | _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KANA, KC_HOME, KC_PGDN, KC_END | ||
141 | ), | ||
142 | |||
143 | [_ADJUST2] = LAYOUT_ortho_4x12( | ||
144 | _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, _______, _______, _______, KC_INS, | ||
145 | _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS, | ||
146 | RGB_RMOD,RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, KC_PGUP, _______, | ||
147 | _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KANA, KC_HOME, KC_PGDN, KC_END | ||
148 | ) | ||
149 | }; | ||
150 | |||
151 | |||
152 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
153 | switch (keycode) { | ||
154 | case EISU: | ||
155 | if (record->event.pressed) { | ||
156 | if(keymap_config.swap_lalt_lgui==false){ | ||
157 | register_code(KC_LANG2); | ||
158 | } else { | ||
159 | SEND_STRING(SS_LALT("`")); | ||
160 | } | ||
161 | } else { | ||
162 | unregister_code(KC_LANG2); | ||
163 | } | ||
164 | return false; | ||
165 | case KANA: | ||
166 | if (record->event.pressed) { | ||
167 | if(keymap_config.swap_lalt_lgui==false){ | ||
168 | register_code(KC_LANG1); | ||
169 | } else { | ||
170 | SEND_STRING(SS_LALT("`")); | ||
171 | } | ||
172 | } else { | ||
173 | unregister_code(KC_LANG1); | ||
174 | } | ||
175 | return false; | ||
176 | case RGBRST: | ||
177 | #ifdef RGBLIGHT_ENABLE | ||
178 | if (record->event.pressed) { | ||
179 | eeconfig_update_rgblight_default(); | ||
180 | rgblight_enable(); | ||
181 | } | ||
182 | #endif | ||
183 | break; | ||
184 | } | ||
185 | return true; | ||
186 | } | ||
187 | |||
188 | |||
189 | |||
190 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
191 | state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST2); | ||
192 | #ifdef RGBLIGHT_LAYERS | ||
193 | // Both layers will light up if both kb layers are active | ||
194 | rgblight_set_layer_state(1, layer_state_cmp(state, 1)); | ||
195 | rgblight_set_layer_state(2, layer_state_cmp(state, 2)); | ||
196 | #endif | ||
197 | return state; | ||
198 | } | ||
199 | |||
200 | bool led_update_user(led_t led_state) { | ||
201 | rgblight_set_layer_state(0, led_state.caps_lock); | ||
202 | return true; | ||
203 | } | ||
diff --git a/keyboards/zinc/keymaps/via/readme_en.md b/keyboards/zinc/keymaps/via/readme_en.md new file mode 100644 index 000000000..c49a43416 --- /dev/null +++ b/keyboards/zinc/keymaps/via/readme_en.md | |||
@@ -0,0 +1,115 @@ | |||
1 | # The VIA Zinc Layout | ||
2 | ## layout | ||
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 | ### Lower | ||
19 | ``` | ||
20 | ,-----------------------------------------. ,-----------------------------------------. | ||
21 | | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
22 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
23 | | | | | | | | | - | _ | + | { | } | | | | ||
24 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
25 | | | | | | | | | | | | Home | End | | | ||
26 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
27 | | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
28 | `-----------------------------------------' `-----------------------------------------' | ||
29 | ``` | ||
30 | |||
31 | ### RAISE | ||
32 | ``` | ||
33 | ,-----------------------------------------. ,-----------------------------------------. | ||
34 | | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
35 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
36 | | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | ||
37 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
38 | | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | ||
39 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
40 | | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
41 | `-----------------------------------------' `-----------------------------------------' | ||
42 | ``` | ||
43 | |||
44 | ### Adjust | ||
45 | ``` | ||
46 | ,-----------------------------------------. ,-----------------------------------------. | ||
47 | | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | | ||
48 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
49 | | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
50 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
51 | |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | | ||
52 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
53 | | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | | ||
54 | `-----------------------------------------' `-----------------------------------------' | ||
55 | ``` | ||
56 | |||
57 | ### Adjust2 (Lower + Raise) | ||
58 | ``` | ||
59 | ,-----------------------------------------. ,-----------------------------------------. | ||
60 | | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | | ||
61 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
62 | | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
63 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
64 | |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | | ||
65 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
66 | | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | | ||
67 | `-----------------------------------------' `-----------------------------------------' | ||
68 | ``` | ||
69 | ## Compile | ||
70 | |||
71 | go to qmk top directory. | ||
72 | |||
73 | ``` | ||
74 | $ cd qmk_firmware | ||
75 | ``` | ||
76 | make with `zinc:<keymap_name>` | ||
77 | |||
78 | ``` | ||
79 | $ make zinc:default | ||
80 | ``` | ||
81 | |||
82 | To make and flash with `:flash` | ||
83 | |||
84 | ``` | ||
85 | $ make zinc:default:flash | ||
86 | ``` | ||
87 | |||
88 | |||
89 | ## Customize | ||
90 | |||
91 | You can customize from the command line. | ||
92 | |||
93 | ``` | ||
94 | # Zinc keyboard 'default' keymap: convenient command line option | ||
95 | make ZINC=<options> zinc:defualt | ||
96 | # option= back | under | both | cont | na | ios | ||
97 | # ex. | ||
98 | # make ZINC=under zinc:via | ||
99 | # make ZINC=under,ios zinc:via | ||
100 | # make ZINC=back zinc:via | ||
101 | # make ZINC=back,na zinc:via | ||
102 | # make zinc:via | ||
103 | ``` | ||
104 | |||
105 | Or edit `qmk_firmware/keyboards/zinc/rev1/keymaps/~/rules.mk` directly. | ||
106 | |||
107 | ``` | ||
108 | # Zinc keyboard customize | ||
109 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | ||
110 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | ||
111 | LED_BOTH_ENABLE = no # LED backlight and underglow | ||
112 | LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
113 | LED_ANIMATIONS = yes # LED animations | ||
114 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
115 | ``` | ||
diff --git a/keyboards/zinc/keymaps/via/readme_jp.md b/keyboards/zinc/keymaps/via/readme_jp.md new file mode 100644 index 000000000..a929eb07d --- /dev/null +++ b/keyboards/zinc/keymaps/via/readme_jp.md | |||
@@ -0,0 +1,149 @@ | |||
1 | # The VIA 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 | ### Lower | ||
19 | ``` | ||
20 | ,-----------------------------------------. ,-----------------------------------------. | ||
21 | | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
22 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
23 | | | | | | | | | - | _ | + | { | } | | | | ||
24 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
25 | | | | | | | | | | | | Home | End | | | ||
26 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
27 | | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
28 | `-----------------------------------------' `-----------------------------------------' | ||
29 | ``` | ||
30 | |||
31 | ### RAISE | ||
32 | ``` | ||
33 | ,-----------------------------------------. ,-----------------------------------------. | ||
34 | | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
35 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
36 | | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | ||
37 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
38 | | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | ||
39 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
40 | | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
41 | `-----------------------------------------' `-----------------------------------------' | ||
42 | ``` | ||
43 | |||
44 | ### Adjust | ||
45 | ``` | ||
46 | ,-----------------------------------------. ,-----------------------------------------. | ||
47 | | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | | ||
48 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
49 | | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
50 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
51 | |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | | ||
52 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
53 | | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | | ||
54 | `-----------------------------------------' `-----------------------------------------' | ||
55 | ``` | ||
56 | |||
57 | ### Adjust2 (Lower + Raise) | ||
58 | ``` | ||
59 | ,-----------------------------------------. ,-----------------------------------------. | ||
60 | | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | | ||
61 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
62 | | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
63 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
64 | |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | | ||
65 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
66 | | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | | ||
67 | `-----------------------------------------' `-----------------------------------------' | ||
68 | ``` | ||
69 | ※AdjustとAdjust2は同じものが入っています。このデータの冗長化は、VIA Configuratorでの変更を容易にするために実装を単純化する必要があったためです。Adjust2はLowerとRaiseの同時押しの際に有効になるレイヤーです | ||
70 | |||
71 | |||
72 | ## コンパイルの仕方 | ||
73 | |||
74 | コンパイルは、qmk_firmware のトップディレクトリで行います。 | ||
75 | |||
76 | ``` | ||
77 | $ cd qmk_firmware | ||
78 | ``` | ||
79 | qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 | ||
80 | |||
81 | ``` | ||
82 | $ make zinc:via | ||
83 | ``` | ||
84 | |||
85 | キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 | ||
86 | |||
87 | ``` | ||
88 | $ make zinc:via:avrdude | ||
89 | ``` | ||
90 | |||
91 | コンパイル結果と中間生成物を消去したい場合は以下のようにします。 | ||
92 | |||
93 | ``` | ||
94 | $ make zinc:via:clean | ||
95 | ``` | ||
96 | |||
97 | ## カスタマイズ | ||
98 | |||
99 | コマンドラインからオプションを指定してビルドすることが出来ます。 | ||
100 | ただしVIAキーマップではオプションなしでbothが指定されますので、ほとんどの場合はオプション記述なしでmake zinc:viaとします。 | ||
101 | |||
102 | ``` | ||
103 | # Zinc keyboard 'via' keymap: convenient command line option | ||
104 | make ZINC=<options> zinc:via | ||
105 | # option= back | under | both | cont | na | ios | ||
106 | # ex. | ||
107 | # make ZINC=under zinc:via | ||
108 | # make ZINC=under,ios zinc:via | ||
109 | # make ZINC=back zinc:via | ||
110 | # make ZINC=back,na zinc:via | ||
111 | # make zinc:via | ||
112 | ``` | ||
113 | |||
114 | あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/~/rules.mk` の以下の部分を直接編集して機能を有効化してください。 | ||
115 | |||
116 | ``` | ||
117 | # Zinc keyboard customize | ||
118 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | ||
119 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | ||
120 | LED_BOTH_ENABLE = yes # LED backlight and underglow | ||
121 | LED_RGB_CONT = yes # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
122 | LED_ANIMATIONS = yes # LED animations | ||
123 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
124 | ``` | ||
125 | |||
126 | ## RGB backlight を有効にする | ||
127 | |||
128 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
129 | ``` | ||
130 | LED_BACK_ENABLE = yes # LED backlight (Enable SK6812mini backlight) | ||
131 | ``` | ||
132 | ※VIAキーマップではオプションなしでbothが指定されます | ||
133 | |||
134 | ## RGB Underglow を有効にする | ||
135 | |||
136 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
137 | ``` | ||
138 | LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) | ||
139 | ``` | ||
140 | ※VIAキーマップではオプションなしでbothが指定されます | ||
141 | |||
142 | ## iPad/iPhoneサポートを有効にする。 | ||
143 | |||
144 | rules.mk の下記の部分を編集して no を yes に変更してください。 | ||
145 | RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone にも接続できるようになります。 | ||
146 | |||
147 | ``` | ||
148 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
149 | ``` | ||
diff --git a/keyboards/zinc/keymaps/via/rules.mk b/keyboards/zinc/keymaps/via/rules.mk new file mode 100644 index 000000000..0ea4be9c0 --- /dev/null +++ b/keyboards/zinc/keymaps/via/rules.mk | |||
@@ -0,0 +1,113 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | EXTRAKEY_ENABLE = yes | ||
3 | |||
4 | define ZINC_CUSTOMISE_MSG | ||
5 | $(info Zinc customize) | ||
6 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) | ||
7 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) | ||
8 | $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) | ||
9 | $(info - LED_RGB_CONT=$(LED_RGB_CONT)) | ||
10 | $(info - RGB_MATRIX=$(RGB_MATRIX)) | ||
11 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) | ||
12 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) | ||
13 | endef | ||
14 | |||
15 | # Zinc keyboard customize | ||
16 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | ||
17 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | ||
18 | LED_BOTH_ENABLE = yes # LED backlight and underglow | ||
19 | LED_RGB_CONT = yes # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
20 | RGB_MATRIX = no # RGB LED Matrix | ||
21 | RGB_MATRIX_SPLIT_RIGHT = no # RGB Matrix for RIGHT Hand | ||
22 | LED_ANIMATIONS = yes # LED animations | ||
23 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
24 | LTO_ENABLE = no # if firmware size over limit, try this option | ||
25 | |||
26 | #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. | ||
27 | #### Do not enable these with audio at the same time. | ||
28 | |||
29 | ### Zinc keyboard 'default' keymap: convenient command line option | ||
30 | ## make ZINC=<options> zinc:defualt | ||
31 | ## option= back | under | both | cont | matrix | na | ios | ||
32 | ## ex. | ||
33 | ## make ZINC=under zinc:defualt | ||
34 | ## make ZINC=under,ios zinc:defualt | ||
35 | ## make ZINC=back zinc:default | ||
36 | ## make ZINC=back,na zinc:default | ||
37 | ## make ZINC=back,ios zinc:default | ||
38 | |||
39 | ifneq ($(strip $(ZINC)),) | ||
40 | ifeq ($(findstring back,$(ZINC)), back) | ||
41 | LED_BACK_ENABLE = yes | ||
42 | endif | ||
43 | ifeq ($(findstring under,$(ZINC)), under) | ||
44 | LED_UNDERGLOW_ENABLE = yes | ||
45 | endif | ||
46 | ifeq ($(findstring both,$(ZINC)), both) | ||
47 | LED_BOTH_ENABLE = yes | ||
48 | endif | ||
49 | ifeq ($(findstring cont,$(ZINC)), cont) | ||
50 | LED_RGB_CONT = yes | ||
51 | endif | ||
52 | ifeq ($(findstring matrix,$(ZINC)), matrix) | ||
53 | RGB_MATRIX = yes | ||
54 | endif | ||
55 | ifeq ($(findstring right,$(ZINC)), right) | ||
56 | RGB_MATRIX_SPLIT_RIGHT = yes | ||
57 | endif | ||
58 | ifeq ($(findstring na,$(ZINC)), na) | ||
59 | LED_ANIMATIONS = no | ||
60 | endif | ||
61 | ifeq ($(findstring ios,$(ZINC)), ios) | ||
62 | IOS_DEVICE_ENABLE = yes | ||
63 | endif | ||
64 | $(eval $(call ZINC_CUSTOMISE_MSG)) | ||
65 | $(info ) | ||
66 | endif | ||
67 | |||
68 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | ||
69 | RGBLIGHT_ENABLE = yes | ||
70 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
71 | OPT_DEFS += -DRGBLED_BOTH | ||
72 | $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) | ||
73 | else | ||
74 | OPT_DEFS += -DRGBLED_BACK | ||
75 | endif | ||
76 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | ||
77 | RGBLIGHT_ENABLE = yes | ||
78 | else | ||
79 | RGBLIGHT_ENABLE = no | ||
80 | endif | ||
81 | |||
82 | ifeq ($(strip $(LED_BOTH_ENABLE)), yes) | ||
83 | RGBLIGHT_ENABLE = yes | ||
84 | OPT_DEFS += -DRGBLED_BOTH | ||
85 | endif | ||
86 | |||
87 | ifeq ($(strip $(LED_RGB_CONT)), yes) | ||
88 | OPT_DEFS += -DRGBLED_CONT | ||
89 | endif | ||
90 | |||
91 | ifeq ($(strip $(RGB_MATRIX)), yes) | ||
92 | RGBLIGHT_ENABLE = no | ||
93 | RGB_MATRIX_ENABLE = WS2812 | ||
94 | endif | ||
95 | |||
96 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | ||
97 | OPT_DEFS += -DIOS_DEVICE_ENABLE | ||
98 | endif | ||
99 | |||
100 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | ||
101 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS | ||
102 | OPT_DEFS += -DLED_ANIMATIONS | ||
103 | |||
104 | endif | ||
105 | |||
106 | ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) | ||
107 | OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT | ||
108 | endif | ||
109 | |||
110 | # Uncomment these for debugging | ||
111 | # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) | ||
112 | # $(info -- OPT_DEFS=$(OPT_DEFS)) | ||
113 | # $(info ) | ||