1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
// Copyright 2023 @miketronic -- Mike B <mxb540@gmail.com>
// SPDX-License-Identifier: GPL-2.0+
#include "miketronic.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Workman
* ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐
* │ TAB │ Q │ D │ R │ W │ B │ │ J │ F │ U │ P │ BSPC│ BSPC│
* │ ESC │ ESC │ │ │ │ SYM │ │ SYM │ │ │ │ │ │
* ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤
* │ TAB │ A │ S │ H ┃ T ┃ G │ │ Y ┃ N ┃ E │ O │ I │ │
* │SHIFT│ │ │ ┃ EX ┃ │ │ ┃ ┃ │ │ENTER│ENTER│
* ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤
* │SHIFT| Z │ X │ M │ C │ V │ │ K │ L │ SPC │ SPC │ / │ UP |
* │ │ │ │ │ │ │ │ │ │ , │ . │ │RIGHT|
* ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤
* │ FN │CTRL │ OS │ ALT │LOWER│ │ │ │RAISE│ SS │CLIP │COPY │ DN │
* │ │ │ │ │ │ │ │ │ │ │ │PASTE│LEFT │
* └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘
*/
[_WM] = LAYOUT_ortho_4x12_wrapper (
RGB_TOG,
_____________WORKMAN_412_001_L_____________, _____________WORKMAN_412_001_R_____________,
_____________WORKMAN_412_002_L_____________, _____________WORKMAN_412_002_R_____________,
_____________WORKMAN_412_003_L_____________, _____________WORKMAN_412_003_R_____________,
_____________WORKMAN_412_004_L_____________, _____________WORKMAN_412_004_R_____________
),
[_QW] = LAYOUT_ortho_4x12_wrapper (
RGB_TOG,
KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC,
KC_ESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT,
_____________WORKMAN_412_004_L_____________, _____________WORKMAN_412_004_R_____________
),
/* Lower
* ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐
* │ │ () │ [] │ /\ │ │ │ │ │ 7 │ 8 │ 9 │ │ │
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤
* │ │ @ # │ & % │ ┃ ┃ │ │ ┃ 4 ┃ 5 │ 6 │ │ │
* │ │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ │
* ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤
* │ │ │ │ │ │ │ │ 0 │ 1 │ 2 │ 3 │ │ UP │
* │ │ │ │ │ │ │ │ │ │ 0 │ │ │RIGHT│
* ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤
* │ │ │ │ │LOWER│ │ │ │BPSC │ SPC │ . │ │ DN │
* │ │ │ │ │ │ │ │ │ │ │ ENT │ │LEFT │
* └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘
*/
[_LOWER] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
_______________LOWER_412_L1________________, _______________LOWER_412_R1________________,
_______________LOWER_412_L2________________, _______________LOWER_412_R2________________,
_______________LOWER_412_L3________________, _______________LOWER_412_R3________________,
_______________LOWER_412_L4________________, _______________LOWER_412_R4________________
),
/* RAISE
* ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐
* │BOOT │DEBUG│ │ │ │MAKE │ │ │ │ F7 │ F8 │ F9 │ F10 │
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤
* │ │ RGB | RGB | RGB ┃ RGB ┃ WM │ │ ┃ / \ ┃ F4 │ F5 │ F6 │ F11 │
* │ │ TOG │ MOD │ HUI ┃ HUD ┃ │ │ ┃ ┃ │ │ │ │
* ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤
* │ │ RGB │ RGB │ RGB │ RGB │ QW │ │ │ _ │ F1 | F2 | F3 │ F12 │
* │ │ SAI │ SAD │ VAI │ VAD │ │ │ │ - │ │ │ │ │
* ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤
* │ │ │ │ │ │ │ │ │RAISE│ │ │ │ │
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘
*/
[_RAISE] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
_______________RAISE_412_L1________________, _______________RAISE_412_R1________________,
_______________RAISE_412_L2________________, _______________RAISE_412_R2________________,
_______________RAISE_412_L3________________, _______________RAISE_412_R3________________,
_________________BLANK_6___________________, _________________BLANK_6___________________
),
/* EXTRAS
* ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐
* │ │ ! │ │ │ │ │ │ │ /\ | [ | ] | ; │ │
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤
* │SHIFT│ | |EXTRA┃ ┃ │ │ ┃ @ # ┃ & % | | ' | │
* │ │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ │
* ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤
* │ │ │ │ │ │ │ │ │ │ , | . | ? │ │
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘
*/
[_EX] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
______________EXTRAS_412_L1________________, ______________EXTRAS_412_R1________________,
______________EXTRAS_412_L2________________, ______________EXTRAS_412_R2________________,
______________EXTRAS_412_L3________________, ______________EXTRAS_412_R3________________,
______________EXTRAS_412_L4________________, ______________EXTRAS_412_R4________________
),
/* FUNCTION
* ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐
* │COPY │CLIP │ SS │ │ │ │ │ │ /\ │ UP │ │ │ DEL │
* │PASTE│ │ │ │ │ │ │ │ │ │ │ │ │
* ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤
* │TAB │ M05 | M06 | M07 ┃ M08 ┃ │ │ ┃LEFT ┃DOWN │RIGHT│ │UP │
* │SHIFT│ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │RIGHT│
* ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤
* │ │ M01 │ M02 │ M03 │ M04 │ │ │ │ │ , | . | ? │DOWN │
* │ │ │ │ │ │ │ │ │ │ │ │ │LEFT │
* ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤
* │ │RGB1 │RGB2 │RGB3 │RGB4 │ │ │ │ │ │ │ │ │
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘
*/
[_FN] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
_____________FUNCTION_412_L1_______________, _____________FUNCTION_412_R1_______________,
_____________FUNCTION_412_L2_______________, _____________FUNCTION_412_R2_______________,
_____________FUNCTION_412_L3_______________, _____________FUNCTION_412_R3_______________,
_____________FUNCTION_412_L4_______________, _____________FUNCTION_412_R4_______________
),
/* SYMBOLS
* ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐
* │ | $ | ^ | < | > │ SYMB│ │ SYMB│ | | [ | ] | - | |
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤
* │ | % | : | ; ┃ + ┃ = │ │ ┃ ┃ ( | ) | _ | |
* │ │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ │
* ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤
* | | & | ' | " | * | # │ │ ! | ? | / | \ | @ | |
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘
*/
[_SYMB] = LAYOUT_ortho_4x12_wrapper (
KC_MUTE,
_______, _____________SYMBOLS_310_L1________________, _____________SYMBOLS_310_R1________________, _______,
_______, _____________SYMBOLS_310_L2________________, _____________SYMBOLS_310_R2________________, _______,
_______, _____________SYMBOLS_310_L3________________, _____________SYMBOLS_310_R3________________, _______,
_________________BLANK_6___________________, _________________BLANK_6___________________
)
};
#ifndef NUM_DIRECTIONS
# define NUM_DIRECTIONS 2
#endif
#if defined(ENCODER_MAP_ENABLE) && defined(KEYBOARD_1upkeyboards_pi40_mit_v1_0)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_WM] = { ENCODER_CCW_CW(LCTL(KC_V), LCTL(KC_C)) },
[_QW] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LOWER] = { ENCODER_CCW_CW(____, ____) },
[_RAISE] = { ENCODER_CCW_CW(____, ____) },
[_EX] = { ENCODER_CCW_CW(____, ____) },
[_FN] = { ENCODER_CCW_CW(RGB_MOD, RGB_RMOD) },
[_SYMB] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }
};
#endif
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _LOWER:
oled_write_P(PSTR("LOWER"), false);
break;
case _RAISE:
oled_write_P(PSTR("RAISE"), false);
break;
case _EX:
oled_write_P(PSTR("EXTRA"), false);
break;
case _FN:
oled_write_P(PSTR("FUNCTION"), false);
break;
case _WM:
oled_write_P(PSTR("WORKMAN"), false);
break;
case _SYMB:
oled_write_P(PSTR("SYMBOLS"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("HOME"), false);
}
// Host Keyboard LED Status
// led_t led_state = host_keyboard_led_state();
// oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
// oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
// oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
return false;
}
#endif
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case SFT_T(KC_A):
// Do not force the mod-tap key press to be handled as a modifier
// if any other key was pressed while the mod-tap key is held down.
return false;
case TEX:
return false;
case CTRLX:
return false;
case FNZ:
return false;
case MGUI:
return false;
case VLOWER:
return false;
case KRAISE:
return false;
default:
// Force the dual-role key press to be handled as a modifier if any
// other key was pressed while the mod-tap key is held down.
return true;
}
}
#ifdef AUDIO_ENABLE
float leader_start_song[][2] = SONG(ONE_UP_SOUND);
float leader_succeed_song[][2] = SONG(ALL_STAR);
float leader_fail_song[][2] = SONG(RICK_ROLL);
#endif
void matrix_scan_user(void);
void leader_start_user(void) {
#ifdef AUDIO_ENABLE
PLAY_SONG(leader_start_song);
#endif
}
bool did_leader_succeed;
void leader_end_user(void) {
did_leader_succeed = false;
if (leader_sequence_one_key(KC_E)) {
SEND_STRING(SS_LCTL(SS_LSFT("t")));
did_leader_succeed = true;
} else if (leader_sequence_two_keys(KC_E, KC_D)) {
SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c"));
did_leader_succeed = true;
} else if (leader_sequence_two_keys(KC_A, KC_T)) {
SEND_STRING("@guidehouse.com");
did_leader_succeed = true;
}
#ifdef AUDIO_ENABLE
if (did_leader_succeed) {
PLAY_SONG(leader_succeed_song);
} else {
PLAY_SONG(leader_fail_song);
}
#endif
}
|