aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Nguyen <danny@keeb.io>2017-08-15 16:28:19 -0400
committerJack Humbert <jack.humb@gmail.com>2017-09-21 09:40:13 -0400
commit92b74e2d3612884237ecbdbea18bc5b70d859234 (patch)
treee63d916a288c5e5b478b83f4b2374ccea77e2ebd
parent72e99391439c1d8abd0aed112b06982b94be03c6 (diff)
downloadqmk_firmware-92b74e2d3612884237ecbdbea18bc5b70d859234.tar.gz
qmk_firmware-92b74e2d3612884237ecbdbea18bc5b70d859234.zip
Rename cloned Nyquist files to Viterbi, create temporary keymaps
Add WIP keymap for dwallace
-rw-r--r--keyboards/viterbi/keymaps/default/Makefile5
-rw-r--r--keyboards/viterbi/keymaps/default/config.h41
-rw-r--r--keyboards/viterbi/keymaps/default/keymap.c232
-rw-r--r--keyboards/viterbi/keymaps/dwallace/Makefile5
-rw-r--r--keyboards/viterbi/keymaps/dwallace/config.h43
-rw-r--r--keyboards/viterbi/keymaps/dwallace/keymap.c83
-rw-r--r--keyboards/viterbi/keymaps/hexwire/Makefile5
-rw-r--r--keyboards/viterbi/keymaps/hexwire/README.md116
-rw-r--r--keyboards/viterbi/keymaps/hexwire/config.h43
-rw-r--r--keyboards/viterbi/keymaps/hexwire/keymap.c218
-rw-r--r--keyboards/viterbi/nyquist.c1
-rw-r--r--keyboards/viterbi/nyquist.h26
-rw-r--r--keyboards/viterbi/readme.md169
-rw-r--r--keyboards/viterbi/rev1/Makefile3
-rw-r--r--keyboards/viterbi/rev1/config.h89
-rw-r--r--keyboards/viterbi/rev1/rev1.c39
-rw-r--r--keyboards/viterbi/rev1/rev1.h66
-rw-r--r--keyboards/viterbi/rev1/rules.mk5
-rw-r--r--keyboards/viterbi/viterbi.c1
-rw-r--r--keyboards/viterbi/viterbi.h26
20 files changed, 1032 insertions, 184 deletions
diff --git a/keyboards/viterbi/keymaps/default/Makefile b/keyboards/viterbi/keymaps/default/Makefile
new file mode 100644
index 000000000..1e5761278
--- /dev/null
+++ b/keyboards/viterbi/keymaps/default/Makefile
@@ -0,0 +1,5 @@
1RGBLIGHT_ENABLE = yes
2
3ifndef QUANTUM_DIR
4 include ../../../../Makefile
5endif
diff --git a/keyboards/viterbi/keymaps/default/config.h b/keyboards/viterbi/keymaps/default/config.h
new file mode 100644
index 000000000..6d409cd2e
--- /dev/null
+++ b/keyboards/viterbi/keymaps/default/config.h
@@ -0,0 +1,41 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_USER_H
19#define CONFIG_USER_H
20
21#include "../../config.h"
22
23/* Use I2C or Serial, not both */
24
25#define USE_SERIAL
26// #define USE_I2C
27
28/* Select hand configuration */
29
30#define MASTER_LEFT
31// #define _MASTER_RIGHT
32// #define EE_HANDS
33
34#undef RGBLED_NUM
35#define RGBLIGHT_ANIMATIONS
36#define RGBLED_NUM 12
37#define RGBLIGHT_HUE_STEP 8
38#define RGBLIGHT_SAT_STEP 8
39#define RGBLIGHT_VAL_STEP 8
40
41#endif
diff --git a/keyboards/viterbi/keymaps/default/keymap.c b/keyboards/viterbi/keymaps/default/keymap.c
new file mode 100644
index 000000000..261a59b2a
--- /dev/null
+++ b/keyboards/viterbi/keymaps/default/keymap.c
@@ -0,0 +1,232 @@
1#include "viterbi.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
36 * |------+------+------+------+------+------+------+------+------+------+------+------|
37 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
38 * |------+------+------+------+------+-------------+------+------+------+------+------|
39 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
40 * |------+------+------+------+------+------|------+------+------+------+------+------|
41 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
42 * |------+------+------+------+------+------+------+------+------+------+------+------|
43 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
44 * `-----------------------------------------------------------------------------------'
45 */
46[_QWERTY] = KEYMAP( \
47 KC_NO, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
48 KC_NO, KC_NO, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
49 KC_NO, KC_NO, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
50 KC_NO, KC_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
51 KC_NO, KC_NO, ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
52),
53
54/* Colemak
55 * ,-----------------------------------------------------------------------------------.
56 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
57 * |------+------+------+------+------+------+------+------+------+------+------+------|
58 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
59 * |------+------+------+------+------+-------------+------+------+------+------+------|
60 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
61 * |------+------+------+------+------+------|------+------+------+------+------+------|
62 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
65 * `-----------------------------------------------------------------------------------'
66 */
67[_COLEMAK] = KEYMAP( \
68 KC_NO, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
69 KC_NO, KC_NO, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \
70 KC_NO, KC_NO, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
71 KC_NO, KC_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
72 KC_NO, KC_NO, ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
73),
74
75/* Dvorak
76 * ,-----------------------------------------------------------------------------------.
77 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
78 * |------+------+------+------+------+------+------+------+------+------+------+------|
79 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
80 * |------+------+------+------+------+-------------+------+------+------+------+------|
81 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
82 * |------+------+------+------+------+------|------+------+------+------+------+------|
83 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
84 * |------+------+------+------+------+------+------+------+------+------+------+------|
85 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
86 * `-----------------------------------------------------------------------------------'
87 */
88[_DVORAK] = KEYMAP( \
89 KC_NO, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
90 KC_NO, KC_NO, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
91 KC_NO, KC_NO, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
92 KC_NO, KC_NO, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
93 KC_NO, KC_NO, ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
94),
95
96/* Lower
97 * ,-----------------------------------------------------------------------------------.
98 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
99 * |------+------+------+------+------+-------------+------+------+------+------+------|
100 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
101 * |------+------+------+------+------+-------------+------+------+------+------+------|
102 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
103 * |------+------+------+------+------+------|------+------+------+------+------+------|
104 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
105 * |------+------+------+------+------+------+------+------+------+------+------+------|
106 * | | | | | | | | Next | Vol- | Vol+ | Play |
107 * `-----------------------------------------------------------------------------------'
108 */
109[_LOWER] = KEYMAP( \
110 KC_NO, KC_NO, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
111 KC_NO, KC_NO, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
112 KC_NO, KC_NO, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
113 KC_NO, KC_NO, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
114 KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
115),
116
117/* Raise
118 * ,-----------------------------------------------------------------------------------.
119 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
120 * |------+------+------+------+------+-------------+------+------+------+------+------|
121 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
122 * |------+------+------+------+------+-------------+------+------+------+------+------|
123 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
124 * |------+------+------+------+------+------|------+------+------+------+------+------|
125 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
126 * |------+------+------+------+------+------+------+------+------+------+------+------|
127 * | | | | | | | | Next | Vol- | Vol+ | Play |
128 * `-----------------------------------------------------------------------------------'
129 */
130[_RAISE] = KEYMAP( \
131 KC_NO, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
132 KC_NO, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
133 KC_NO, KC_NO, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
134 KC_NO, KC_NO, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
135 KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
136),
137
138/* Adjust (Lower + Raise)
139 * ,-----------------------------------------------------------------------------------.
140 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
141 * |------+------+------+------+------+------+------+------+------+------+------+------|
142 * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del |
143 * |------+------+------+------+------+-------------+------+------+------+------+------|
144 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
145 * |------+------+------+------+------+------|------+------+------+------+------+------|
146 * | | | | | | | | | | | | |
147 * |------+------+------+------+------+------+------+------+------+------+------+------|
148 * | | | | | | | | | | | |
149 * `-----------------------------------------------------------------------------------'
150 */
151[_ADJUST] = KEYMAP( \
152 KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
153 KC_NO, KC_NO, _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \
154 KC_NO, KC_NO, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
155 KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
156 KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
157)
158
159
160};
161
162#ifdef AUDIO_ENABLE
163float tone_qwerty[][2] = SONG(QWERTY_SOUND);
164float tone_dvorak[][2] = SONG(DVORAK_SOUND);
165float tone_colemak[][2] = SONG(COLEMAK_SOUND);
166#endif
167
168void persistent_default_layer_set(uint16_t default_layer) {
169 eeconfig_update_default_layer(default_layer);
170 default_layer_set(default_layer);
171}
172
173bool process_record_user(uint16_t keycode, keyrecord_t *record) {
174 switch (keycode) {
175 case QWERTY:
176 if (record->event.pressed) {
177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
179 #endif
180 persistent_default_layer_set(1UL<<_QWERTY);
181 }
182 return false;
183 break;
184 case COLEMAK:
185 if (record->event.pressed) {
186 #ifdef AUDIO_ENABLE
187 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
188 #endif
189 persistent_default_layer_set(1UL<<_COLEMAK);
190 }
191 return false;
192 break;
193 case DVORAK:
194 if (record->event.pressed) {
195 #ifdef AUDIO_ENABLE
196 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
197 #endif
198 persistent_default_layer_set(1UL<<_DVORAK);
199 }
200 return false;
201 break;
202 case LOWER:
203 if (record->event.pressed) {
204 layer_on(_LOWER);
205 update_tri_layer(_LOWER, _RAISE, _ADJUST);
206 } else {
207 layer_off(_LOWER);
208 update_tri_layer(_LOWER, _RAISE, _ADJUST);
209 }
210 return false;
211 break;
212 case RAISE:
213 if (record->event.pressed) {
214 layer_on(_RAISE);
215 update_tri_layer(_LOWER, _RAISE, _ADJUST);
216 } else {
217 layer_off(_RAISE);
218 update_tri_layer(_LOWER, _RAISE, _ADJUST);
219 }
220 return false;
221 break;
222 case ADJUST:
223 if (record->event.pressed) {
224 layer_on(_ADJUST);
225 } else {
226 layer_off(_ADJUST);
227 }
228 return false;
229 break;
230 }
231 return true;
232}
diff --git a/keyboards/viterbi/keymaps/dwallace/Makefile b/keyboards/viterbi/keymaps/dwallace/Makefile
new file mode 100644
index 000000000..1e5761278
--- /dev/null
+++ b/keyboards/viterbi/keymaps/dwallace/Makefile
@@ -0,0 +1,5 @@
1RGBLIGHT_ENABLE = yes
2
3ifndef QUANTUM_DIR
4 include ../../../../Makefile
5endif
diff --git a/keyboards/viterbi/keymaps/dwallace/config.h b/keyboards/viterbi/keymaps/dwallace/config.h
new file mode 100644
index 000000000..558ae0627
--- /dev/null
+++ b/keyboards/viterbi/keymaps/dwallace/config.h
@@ -0,0 +1,43 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_USER_H
19#define CONFIG_USER_H
20
21#include "../../config.h"
22
23/* Use I2C or Serial, not both */
24
25#define USE_SERIAL
26// #define USE_I2C
27
28/* Select hand configuration */
29
30#define MASTER_LEFT
31// #define _MASTER_RIGHT
32// #define EE_HANDS
33
34#define TAPPING_TERM 150
35
36#undef RGBLED_NUM
37#define RGBLIGHT_ANIMATIONS
38#define RGBLED_NUM 12
39#define RGBLIGHT_HUE_STEP 8
40#define RGBLIGHT_SAT_STEP 8
41#define RGBLIGHT_VAL_STEP 8
42
43#endif
diff --git a/keyboards/viterbi/keymaps/dwallace/keymap.c b/keyboards/viterbi/keymaps/dwallace/keymap.c
new file mode 100644
index 000000000..c884c8a37
--- /dev/null
+++ b/keyboards/viterbi/keymaps/dwallace/keymap.c
@@ -0,0 +1,83 @@
1#include "viterbi.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7#define _QWERTY 0
8#define _FN 1
9
10enum custom_keycodes {
11 QWERTY = SAFE_RANGE,
12 FN,
13};
14
15#define KC_ KC_TRNS
16#define _______ KC_TRNS
17
18#define KC_SWIN LGUI(KC_TILD) // Switch between windows
19#define KC_SAPP LGUI(KC_TAB) // Switch between applications
20#define KC_FN1 MO(_FN)
21#define KC_LCAG LCAG(KC_NO)
22#define KC_RVAD RGB_VAD
23#define KC_RVAI RGB_VAI
24#define KC_CLRM KC_NO // TODO: Clear sticky modifiers
25#define KC_RST RESET
26
27// TODO: Make modifiers sticky
28
29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
30
31 [_QWERTY] = KC_KEYMAP(
32 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
33 GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,BSPC,
34 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
35 TAB , Q , W , E , R , T ,LBRC, Y , U , I , O , P ,BSLS,PGUP,
36 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
37 ESC , A , S , D , F , G ,RBRC, H , J , K , L ,SCLN,QUOT,ENT ,
38 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
39 LSFT, Z , X , C , V , B ,SWIN, N , M ,COMM,DOT , UP ,SLSH,RSFT,
40 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
41 LCTL,LCAG,LALT,LGUI,SPC ,CLRM,SAPP, FN1 ,SPC ,RGUI,LEFT,DOWN,RGHT,PGDN
42 //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
43 ),
44
45 [_FN] = KC_KEYMAP(
46 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
47 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , ,
48 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
49 , , , ,RST , , , , , , , , , ,
50 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
51 , , , , , , , , ,RVAD,RVAI, , , ,
52 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
53 , , , , , , , ,MUTE,VOLD,VOLU, , , ,
54 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
55 , , , , , , , , , , , , ,
56 //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
57 )
58
59};
60
61#ifdef AUDIO_ENABLE
62float tone_qwerty[][2] = SONG(QWERTY_SOUND);
63#endif
64
65void persistent_default_layer_set(uint16_t default_layer) {
66 eeconfig_update_default_layer(default_layer);
67 default_layer_set(default_layer);
68}
69
70bool process_record_user(uint16_t keycode, keyrecord_t *record) {
71 switch (keycode) {
72 case QWERTY:
73 if (record->event.pressed) {
74 #ifdef AUDIO_ENABLE
75 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
76 #endif
77 persistent_default_layer_set(1UL<<_QWERTY);
78 }
79 return false;
80 break;
81 }
82 return true;
83}
diff --git a/keyboards/viterbi/keymaps/hexwire/Makefile b/keyboards/viterbi/keymaps/hexwire/Makefile
new file mode 100644
index 000000000..1e5761278
--- /dev/null
+++ b/keyboards/viterbi/keymaps/hexwire/Makefile
@@ -0,0 +1,5 @@
1RGBLIGHT_ENABLE = yes
2
3ifndef QUANTUM_DIR
4 include ../../../../Makefile
5endif
diff --git a/keyboards/viterbi/keymaps/hexwire/README.md b/keyboards/viterbi/keymaps/hexwire/README.md
new file mode 100644
index 000000000..3ce3f6af3
--- /dev/null
+++ b/keyboards/viterbi/keymaps/hexwire/README.md
@@ -0,0 +1,116 @@
1Hexwire's Nyquist Layout
2============================
3
4### Changes from default layout
5
6- Main layer
7 - The right space bar key has been changed to backspace, as I only hit space with my left thumb
8 - Backtick is at the lower right and also serves goes to the 3rd function layer when held
9 - Enter key acts as shift when held
10 - Escape key acts as control when held
11 - Minus key at upper right
12- Lower layer
13 - Numbers are on the lower layer, to make it easier to use a numpad on the right hand
14 - Arrow keys
15 - Straight and curly brackets in the middle two columns
16 - Screenshot keys for MacOS
17- Upper layer
18 - Symbols are on the upper layer
19 - Media keys
20 - Page Up/Down, Home/End
21- 3rd function layer
22 - Function keys
23
24## Layouts
25
26### QWERTY
27
28```
29,----+----+----+----+----+----. ,----+----+----+----+----+----.
30|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
31|----+----+----+----+----+----| |----+----+----+----+----+----|
32|TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS|
33|----+----+----+----+----+----| |----+----+----+----+----+----|
34| X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT|
35|----+----+----+----+----+----| |----+----+----+----+----+----|
36|LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 |
37|----+----+----+----+----+----| |----+----+----+----+----+----|
38| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
39`----+----+----+----+----+----' `----+----+----+----+----+----'
40```
41
42### Colemak
43```
44,----+----+----+----+----+----. ,----+----+----+----+----+----.
45|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
46|----+----+----+----+----+----| |----+----+----+----+----+----|
47|TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS|
48|----+----+----+----+----+----| |----+----+----+----+----+----|
49| X0 , A , R , S , T , D , H , N , E , I , O ,QUOT|
50|----+----+----+----+----+----| |----+----+----+----+----+----|
51|LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 |
52|----+----+----+----+----+----| |----+----+----+----+----+----|
53| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
54`----+----+----+----+----+----' `----+----+----+----+----+----'
55```
56
57### Dvorak
58```
59,----+----+----+----+----+----. ,----+----+----+----+----+----.
60|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
61|----+----+----+----+----+----| |----+----+----+----+----+----|
62|TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS|
63|----+----+----+----+----+----| |----+----+----+----+----+----|
64| X0 , A , O , E , U , I , D , H , T , N , S ,SLSH|
65|----+----+----+----+----+----| |----+----+----+----+----+----|
66|LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 |
67|----+----+----+----+----+----| |----+----+----+----+----+----|
68| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
69`----+----+----+----+----+----' `----+----+----+----+----+----'
70```
71
72### Lower
73```
74,----+----+----+----+----+----. ,----+----+----+----+----+----.
75|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
76|----+----+----+----+----+----| |----+----+----+----+----+----|
77| , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , |
78|----+----+----+----+----+----| |----+----+----+----+----+----|
79|DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE|
80|----+----+----+----+----+----| |----+----+----+----+----+----|
81| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, |
82|----+----+----+----+----+----| |----+----+----+----+----+----|
83| , , , , , , DEL , , P0 ,PDOT, , |
84`----+----+----+----+----+----' `----+----+----+----+----+----'
85```
86
87### Raise
88```
89,----+----+----+----+----+----. ,----+----+----+----+----+----.
90|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
91|----+----+----+----+----+----| |----+----+----+----+----+----|
92| ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, |
93|----+----+----+----+----+----| |----+----+----+----+----+----|
94|DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS|
95|----+----+----+----+----+----| |----+----+----+----+----+----|
96|MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , |
97|----+----+----+----+----+----| |----+----+----+----+----+----|
98| , , , , , , , , , , , |
99`----+----+----+----+----+----' `----+----+----+----+----+----'
100```
101
102### 3rd function layer
103
104```
105,----+----+----+----+----+----. ,----+----+----+----+----+----.
106|F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 |
107|----+----+----+----+----+----| |----+----+----+----+----+----|
108| , , , , , , , , , , , |
109|----+----+----+----+----+----| |----+----+----+----+----+----|
110| , , , , , , , , , , , |
111|----+----+----+----+----+----| |----+----+----+----+----+----|
112| , , , , , , , , , , , |
113|----+----+----+----+----+----| |----+----+----+----+----+----|
114| , , , , , , , , , , , |
115`----+----+----+----+----+----' `----+----+----+----+----+----'
116```
diff --git a/keyboards/viterbi/keymaps/hexwire/config.h b/keyboards/viterbi/keymaps/hexwire/config.h
new file mode 100644
index 000000000..558ae0627
--- /dev/null
+++ b/keyboards/viterbi/keymaps/hexwire/config.h
@@ -0,0 +1,43 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_USER_H
19#define CONFIG_USER_H
20
21#include "../../config.h"
22
23/* Use I2C or Serial, not both */
24
25#define USE_SERIAL
26// #define USE_I2C
27
28/* Select hand configuration */
29
30#define MASTER_LEFT
31// #define _MASTER_RIGHT
32// #define EE_HANDS
33
34#define TAPPING_TERM 150
35
36#undef RGBLED_NUM
37#define RGBLIGHT_ANIMATIONS
38#define RGBLED_NUM 12
39#define RGBLIGHT_HUE_STEP 8
40#define RGBLIGHT_SAT_STEP 8
41#define RGBLIGHT_VAL_STEP 8
42
43#endif
diff --git a/keyboards/viterbi/keymaps/hexwire/keymap.c b/keyboards/viterbi/keymaps/hexwire/keymap.c
new file mode 100644
index 000000000..5c80f94d5
--- /dev/null
+++ b/keyboards/viterbi/keymaps/hexwire/keymap.c
@@ -0,0 +1,218 @@
1#include "viterbi.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7#define _QWERTY 0
8#define _COLEMAK 1
9#define _DVORAK 2
10#define _LOWER 3
11#define _RAISE 4
12#define _FN3 5
13#define _FN4 6
14#define _ADJUST 16
15
16enum custom_keycodes {
17 QWERTY = SAFE_RANGE,
18 COLEMAK,
19 DVORAK,
20 LOWER,
21 RAISE,
22 FN3,
23 FN4,
24 ADJUST,
25};
26
27#define KC_ KC_TRNS
28#define _______ KC_TRNS
29
30#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
31#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
32#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
33#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
34#define KC_X0 MT(MOD_LCTL, KC_ESC)
35#define KC_X1 LOWER
36#define KC_X2 RAISE
37#define KC_X3 LT(_FN3, KC_GRV)
38#define KC_X4 MT(MOD_LSFT, KC_ENT)
39
40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41
42 [_QWERTY] = KC_KEYMAP(
43 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
44 ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, ,
45 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
46 TAB , Q , W , E , R , T , , Y , U , I , O , P ,MINS, ,
47 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
48 X0 , A , S , D , F , G , , H , J , K , L ,SCLN,QUOT, ,
49 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
50 LSFT, Z , X , C , V , B , , N , M ,COMM,DOT ,SLSH, X4 , ,
51 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
52 X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT,
53 //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
54 ),
55
56 [_COLEMAK] = KC_KEYMAP(
57 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
58 ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, ,
59 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
60 TAB , Q , W , F , P , G , , J , L , U , Y ,SCLN,MINS, ,
61 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
62 X0 , A , R , S , T , D , , H , N , E , I , O ,QUOT, ,
63 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
64 LSFT, Z , X , C , V , B , , K , M ,COMM,DOT ,SLSH, X4 , ,
65 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
66 X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT,
67 //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
68 ),
69
70 [_DVORAK] = KC_KEYMAP(
71 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
72 ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, ,
73 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
74 TAB ,QUOT,COMM,DOT , P , Y , , F , G , C , R , L ,MINS, ,
75 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
76 X0 , A , O , E , U , I , , D , H , T , N , S ,SLSH, ,
77 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
78 LSFT,SCLN, Q , J , K , X , , B , M , W , V , Z , X4 , ,
79 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
80 X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT,
81 //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
82 ),
83
84 [_LOWER] = KC_KEYMAP(
85 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
86 TILD,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, ,
87 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
88 , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 , , ,
89 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
90 DEL ,CAPP,LEFT,RGHT, UP ,LBRC, , RBRC, P4 , P5 , P6 ,PLUS,PIPE, ,
91 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
92 ,CPYP, , ,DOWN,LCBR, , RCBR, P1 , P2 , P3 ,MINS, , ,
93 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
94 , , , , , , , DEL , , P0 ,PDOT, , ,
95 //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
96 ),
97
98 [_RAISE] = KC_KEYMAP(
99 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
100 TILD,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, ,
101 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
102 ,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN, , ,
103 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
104 DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, , EQL ,HOME, , , ,BSLS, ,
105 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
106 MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , PLUS,END , , , , , ,
107 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
108 , , , , , , , , , , , , ,
109 //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
110 ),
111
112 [_FN3] = KC_KEYMAP(
113 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
114 F12 , F1 , F2 , F3 , F4 , F5 , , F6 , F7 , F8 , F9 ,F10 ,F11 , ,
115 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
116 , , , , , , , , , , , , , ,
117 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
118 , , , , , , , , , , , , , ,
119 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
120 , , , , , , , , , , , , , ,
121 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
122 , , , , , , , , , , , , ,
123 //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
124 ),
125
126/* Adjust (Lower + Raise)
127 * ,-----------------------------------------------------------------------------------.
128 * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | |
129 * |------+------+------+------+------+-------------+------+------+------+------+------|
130 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
131 * |------+------+------+------+------+------|------+------+------+------+------+------|
132 * | | | | | | | | | | | | |
133 * |------+------+------+------+------+------+------+------+------+------+------+------|
134 * | | | | | | | | | | | |
135 * `-----------------------------------------------------------------------------------'
136 */
137 [_ADJUST] = KEYMAP( \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
139 _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, _______, \
140 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, \
141 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
142 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
143 )
144
145
146};
147
148#ifdef AUDIO_ENABLE
149float tone_qwerty[][2] = SONG(QWERTY_SOUND);
150float tone_dvorak[][2] = SONG(DVORAK_SOUND);
151float tone_colemak[][2] = SONG(COLEMAK_SOUND);
152#endif
153
154void persistent_default_layer_set(uint16_t default_layer) {
155 eeconfig_update_default_layer(default_layer);
156 default_layer_set(default_layer);
157}
158
159bool process_record_user(uint16_t keycode, keyrecord_t *record) {
160 switch (keycode) {
161 case QWERTY:
162 if (record->event.pressed) {
163 #ifdef AUDIO_ENABLE
164 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
165 #endif
166 persistent_default_layer_set(1UL<<_QWERTY);
167 }
168 return false;
169 break;
170 case COLEMAK:
171 if (record->event.pressed) {
172 #ifdef AUDIO_ENABLE
173 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
174 #endif
175 persistent_default_layer_set(1UL<<_COLEMAK);
176 }
177 return false;
178 break;
179 case DVORAK:
180 if (record->event.pressed) {
181 #ifdef AUDIO_ENABLE
182 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
183 #endif
184 persistent_default_layer_set(1UL<<_DVORAK);
185 }
186 return false;
187 break;
188 case LOWER:
189 if (record->event.pressed) {
190 layer_on(_LOWER);
191 update_tri_layer(_LOWER, _RAISE, _ADJUST);
192 } else {
193 layer_off(_LOWER);
194 update_tri_layer(_LOWER, _RAISE, _ADJUST);
195 }
196 return false;
197 break;
198 case RAISE:
199 if (record->event.pressed) {
200 layer_on(_RAISE);
201 update_tri_layer(_LOWER, _RAISE, _ADJUST);
202 } else {
203 layer_off(_RAISE);
204 update_tri_layer(_LOWER, _RAISE, _ADJUST);
205 }
206 return false;
207 break;
208 case ADJUST:
209 if (record->event.pressed) {
210 layer_on(_ADJUST);
211 } else {
212 layer_off(_ADJUST);
213 }
214 return false;
215 break;
216 }
217 return true;
218}
diff --git a/keyboards/viterbi/nyquist.c b/keyboards/viterbi/nyquist.c
deleted file mode 100644
index 2face09d4..000000000
--- a/keyboards/viterbi/nyquist.c
+++ /dev/null
@@ -1 +0,0 @@
1#include "nyquist.h"
diff --git a/keyboards/viterbi/nyquist.h b/keyboards/viterbi/nyquist.h
deleted file mode 100644
index e8cccecf5..000000000
--- a/keyboards/viterbi/nyquist.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef NYQUIST_H
2#define NYQUIST_H
3
4#ifdef SUBPROJECT_rev1
5 #include "rev1.h"
6#endif
7
8// Used to create a keymap using only KC_ prefixed keys
9#define KC_KEYMAP( \
10 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
11 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
12 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
13 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
14 L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
15 ) \
16 KEYMAP( \
17 KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
18 KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
19 KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
20 KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
21 KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
22 )
23
24#include "quantum.h"
25
26#endif \ No newline at end of file
diff --git a/keyboards/viterbi/readme.md b/keyboards/viterbi/readme.md
index 61b9317d5..d3bf49c56 100644
--- a/keyboards/viterbi/readme.md
+++ b/keyboards/viterbi/readme.md
@@ -1,169 +1,24 @@
1The Nyquist Keyboard 1Viterbi
2==================== 2=======
3 3
4The Nyquist is a 60% split ortholinear board by [Keebio](https://keeb.io). It has been designed in a similar manner to the Let's Split v2 by /u/wootpatoot. Each half of the keyboard is arranged in a 5x6 grid. There is an option to use a 2u key with PCB mounted MX stablizers, in place of the two innermost 1u keys on the bottom row. 4A split 5x14 ortholinear keyboard kit made and sold by Keebio. [More info at Keebio](https://keeb.io)
5 5
6Keyboard Maintainer: [Bakingpy](https://github.com/nooges)
6 7
7## Build Guide 8Hardware Supported: Pro Micro
8 9
9A build log of the Nyquist can be found here: [Nyquist Build Log](http://imgur.com/a/dD4sX). 10Hardware Availability: [Keebio](https://keeb.io)
10 11
11Since the design is very similar to the Let's Split v2, the build guide for that can be used while the build guide for the Nyquist is being fully developed. A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide)
12 12
13There is additional information there about flashing and adding RGB underglow. 13Make example for this keyboard (after setting up your build environment):
14 14
15## First Time Setup 15 make viterbi-rev1-default
16 16
17Download or clone the whole firmware and navigate to the keyboards/nyquist directory. Once your development environment is setup, you'll be able to generate the default .hex using:
18 17
19``` 18Example of flashing this keyboard:
20$ make serial
21```
22 19
23You will see a lot of output and if everything worked correctly you will see the built hex file: 20 make viterbi-rev1-default-avrdude
24 21
25``` 22See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
26nyquist_rev1_serial.hex
27```
28 23
29If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: 24A build guide for this keyboard can be found here: [Viterbi Build Guide](https://docs.keeb.io)
30
31
32```
33$ make YOUR_KEYMAP_NAME
34```
35
36If everything worked correctly you will see a file:
37
38```
39nyquist_rev1_YOUR_KEYMAP_NAME.hex
40```
41
42For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
43
44Features
45--------
46
47For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
48
49Some features supported by the firmware:
50
51* Either half can connect to the computer via USB, or both halves can be used
52 independently.
53* You only need 3 wires to connect the two halves. Two for VCC and GND and one
54 for serial communication.
55* Optional support for I2C connection between the two halves if for some
56 reason you require a faster connection between the two halves. Note this
57 requires an extra wire between halves and pull-up resistors on the data lines.
58
59### 2u Support
60In place of the two innermost 1u keys on the bottom row, a single 2u key can be used. If you choose to use this option, then in your keymap, set the innermost key on the bottom row to what you want the 2u key to be. For example, if using the 2u key on the left half of the board, set the keycode for the lower right key.
61
62Required Hardware
63-----------------
64
65Apart from diodes and key switches for the keyboard matrix in each half, you
66will need:
67
68* 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each.
69* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable
70
71Alternatively, you can use any sort of cable and socket that has at least 3
72wires. If you want to use I2C to communicate between halves, you will need a
73cable with at least 4 wires and 2x 4.7kΩ pull-up resistors
74
75Optional Hardware
76-----------------
77
78A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`.
79
80Wiring
81------
82
83The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e.
84PD0 on the ATmega32u4) between the two Pro Micros.
85
86Then wire your key matrix to any of the remaining 17 IO pins of the pro micro
87and modify the `matrix.c` accordingly.
88
89The wiring for serial:
90
91![serial wiring](http://imgur.com/BnCGU1Y)
92
93The wiring for i2c:
94
95![i2c wiring](http://imgur.com/5eiArDA)
96
97The pull-up resistors may be placed on either half. It is also possible
98to use 4 resistors and have the pull-ups in both halves, but this is
99unnecessary in simple use cases.
100
101Flashing
102-------
103From the `nyquist` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing.
104Example: `make rev1-serial-avrdude`
105
106
107Choosing which board to plug the USB cable into (choosing Master)
108--------
109Because the two boards are identical, the firmware has logic to differentiate the left and right board.
110
111It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable.
112
113The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side.
114
115The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
116
117### Setting the left hand as master
118If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
119
120### Setting the right hand as master
121If you always plug the usb cable into the right board, add an extra flag to your `config.h`
122```
123 #define MASTER_RIGHT
124```
125
126### Setting EE_hands to use either hands as master
127If you define `EE_HANDS` in your `config.h`, you will need to set the
128EEPROM for the left and right halves.
129
130The EEPROM is used to store whether the
131half is left handed or right handed. This makes it so that the same firmware
132file will run on both hands instead of having to flash left and right handed
133versions of the firmware to each half. To flash the EEPROM file for the left
134half run:
135```
136avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
137// or the equivalent in dfu-programmer
138
139```
140and similarly for right half
141```
142avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
143// or the equivalent in dfu-programmer
144```
145
146NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
147
148After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
149
150Note that you need to program both halves, but you have the option of using
151different keymaps for each half. You could program the left half with a QWERTY
152layout and the right half with a Colemak layout using bootmagic's default layout option.
153Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
154right half is connected.
155
156
157Notes on Using Pro Micro 3.3V
158-----------------------------
159
160Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
161the frequency on the 3.3V board.
162
163Also, if the slave board is producing weird characters in certain columns,
164update the following line in `matrix.c` to the following:
165
166```
167// _delay_us(30); // without this wait read unstable value.
168_delay_us(300); // without this wait read unstable value.
169```
diff --git a/keyboards/viterbi/rev1/Makefile b/keyboards/viterbi/rev1/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/viterbi/rev1/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/viterbi/rev1/config.h b/keyboards/viterbi/rev1/config.h
new file mode 100644
index 000000000..d9d944087
--- /dev/null
+++ b/keyboards/viterbi/rev1/config.h
@@ -0,0 +1,89 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef REV1_CONFIG_H
19#define REV1_CONFIG_H
20
21#include "../config.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xCEEB
25#define PRODUCT_ID 0x1157
26#define DEVICE_VER 0x0100
27#define MANUFACTURER Keebio
28#define PRODUCT The Viterbi Keyboard
29#define DESCRIPTION Split 5x14 ortholinear keyboard
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 10
34#define MATRIX_COLS 7
35
36// wiring of each half
37#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
38#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6, B6 }
39
40#define CATERINA_BOOTLOADER
41
42/* COL2ROW or ROW2COL */
43#define DIODE_DIRECTION COL2ROW
44
45/* define if matrix has ghost */
46//#define MATRIX_HAS_GHOST
47
48/* number of backlight levels */
49// #define BACKLIGHT_LEVELS 3
50
51/* Set 0 if debouncing isn't needed */
52#define DEBOUNCING_DELAY 5
53
54/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
55#define LOCKING_SUPPORT_ENABLE
56/* Locking resynchronize hack */
57#define LOCKING_RESYNC_ENABLE
58
59/* key combination for command */
60#define IS_COMMAND() ( \
61 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
62)
63
64/* ws2812 RGB LED */
65#define RGB_DI_PIN D3
66#define RGBLIGHT_TIMER
67#define RGBLED_NUM 16 // Number of LEDs
68#define ws2812_PORTREG PORTD
69#define ws2812_DDRREG DDRD
70
71/*
72 * Feature disable options
73 * These options are also useful to firmware size reduction.
74 */
75
76/* disable debug print */
77// #define NO_DEBUG
78
79/* disable print */
80// #define NO_PRINT
81
82/* disable action features */
83//#define NO_ACTION_LAYER
84//#define NO_ACTION_TAPPING
85//#define NO_ACTION_ONESHOT
86//#define NO_ACTION_MACRO
87//#define NO_ACTION_FUNCTION
88
89#endif
diff --git a/keyboards/viterbi/rev1/rev1.c b/keyboards/viterbi/rev1/rev1.c
new file mode 100644
index 000000000..760fdebf3
--- /dev/null
+++ b/keyboards/viterbi/rev1/rev1.c
@@ -0,0 +1,39 @@
1#include "viterbi.h"
2
3#ifdef AUDIO_ENABLE
4 float tone_startup[][2] = SONG(STARTUP_SOUND);
5 float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
6#endif
7
8#ifdef SSD1306OLED
9void led_set_kb(uint8_t usb_led) {
10 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
11 led_set_user(usb_led);
12}
13#endif
14
15void matrix_init_kb(void) {
16
17 #ifdef AUDIO_ENABLE
18 _delay_ms(20); // gets rid of tick
19 PLAY_NOTE_ARRAY(tone_startup, false, 0);
20 #endif
21
22 // // green led on
23 // DDRD |= (1<<5);
24 // PORTD &= ~(1<<5);
25
26 // // orange led on
27 // DDRB |= (1<<0);
28 // PORTB &= ~(1<<0);
29
30 matrix_init_user();
31};
32
33void shutdown_user(void) {
34 #ifdef AUDIO_ENABLE
35 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
36 _delay_ms(150);
37 stop_all_notes();
38 #endif
39}
diff --git a/keyboards/viterbi/rev1/rev1.h b/keyboards/viterbi/rev1/rev1.h
new file mode 100644
index 000000000..a8210123b
--- /dev/null
+++ b/keyboards/viterbi/rev1/rev1.h
@@ -0,0 +1,66 @@
1#ifndef REV1_H
2#define REV1_H
3
4#include "../viterbi.h"
5
6//void promicro_bootloader_jmp(bool program);
7#include "quantum.h"
8
9
10#ifdef USE_I2C
11#include <stddef.h>
12#ifdef __AVR__
13 #include <avr/io.h>
14 #include <avr/interrupt.h>
15#endif
16#endif
17
18//void promicro_bootloader_jmp(bool program);
19
20#ifndef FLIP_HALF
21// Standard Keymap
22// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
23#define KEYMAP( \
24 L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
25 L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
26 L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
27 L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
28 L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
29 ) \
30 { \
31 { L00, L01, L02, L03, L04, L05, L06 }, \
32 { L10, L11, L12, L13, L14, L15, L16 }, \
33 { L20, L21, L22, L23, L24, L25, L26 }, \
34 { L30, L31, L32, L33, L34, L35, L36 }, \
35 { L40, L41, L42, L43, L44, L45, L46 }, \
36 { R06, R05, R04, R03, R02, R01, R00 }, \
37 { R16, R15, R14, R13, R12, R11, R10 }, \
38 { R26, R25, R24, R23, R22, R21, R20 }, \
39 { R36, R35, R34, R33, R32, R31, R30 }, \
40 { R46, R45, R44, R43, R42, R41, R40 } \
41 }
42#else
43// Keymap with right side flipped
44// (TRRS jack on both halves are to the right)
45#define KEYMAP( \
46 L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
47 L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
48 L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
49 L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
50 L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
51 ) \
52 { \
53 { L00, L01, L02, L03, L04, L05, L06 }, \
54 { L10, L11, L12, L13, L14, L15, L16 }, \
55 { L20, L21, L22, L23, L24, L25, L26 }, \
56 { L30, L31, L32, L33, L34, L35, L36 }, \
57 { L40, L41, L42, L43, L44, L45, L46 }, \
58 { R00, R01, R02, R03, R04, R05, R06 }, \
59 { R10, R11, R12, R13, R14, R15, R16 }, \
60 { R20, R21, R22, R23, R24, R25, R26 }, \
61 { R30, R31, R32, R33, R34, R35, R36 }, \
62 { R40, R41, R42, R43, R44, R45, R46 } \
63 }
64#endif
65
66#endif
diff --git a/keyboards/viterbi/rev1/rules.mk b/keyboards/viterbi/rev1/rules.mk
new file mode 100644
index 000000000..80a942d06
--- /dev/null
+++ b/keyboards/viterbi/rev1/rules.mk
@@ -0,0 +1,5 @@
1BACKLIGHT_ENABLE = no
2
3ifndef QUANTUM_DIR
4 include ../../../Makefile
5endif
diff --git a/keyboards/viterbi/viterbi.c b/keyboards/viterbi/viterbi.c
new file mode 100644
index 000000000..509e42dc5
--- /dev/null
+++ b/keyboards/viterbi/viterbi.c
@@ -0,0 +1 @@
#include "viterbi.h"
diff --git a/keyboards/viterbi/viterbi.h b/keyboards/viterbi/viterbi.h
new file mode 100644
index 000000000..d3d0f64eb
--- /dev/null
+++ b/keyboards/viterbi/viterbi.h
@@ -0,0 +1,26 @@
1#ifndef VITERBI_H
2#define VITERBI_H
3
4#ifdef SUBPROJECT_rev1
5 #include "rev1.h"
6#endif
7
8// Used to create a keymap using only KC_ prefixed keys
9#define KC_KEYMAP( \
10 L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
11 L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
12 L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
13 L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
14 L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
15 ) \
16 KEYMAP( \
17 KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
18 KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
19 KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
20 KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
21 KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46 \
22 )
23
24#include "quantum.h"
25
26#endif