aboutsummaryrefslogtreecommitdiff
path: root/layouts/community/ortho_4x12
diff options
context:
space:
mode:
authorJacob Jerrell <86279411+jjerrell@users.noreply.github.com>2021-08-12 09:44:15 -0500
committerGitHub <noreply@github.com>2021-08-12 07:44:15 -0700
commit30843f8329315426ff433a40095f1de2b2669e57 (patch)
tree0fc462c1b4b4ecaabb8858b6f91da8b36e29b20b /layouts/community/ortho_4x12
parent1e9d91d4ef5db1a4497767b165303e39069459cb (diff)
downloadqmk_firmware-30843f8329315426ff433a40095f1de2b2669e57.tar.gz
qmk_firmware-30843f8329315426ff433a40095f1de2b2669e57.zip
[Keymap] JJerrell - Add Userspace and ZSA Keyboard Keymaps (#13548)
Diffstat (limited to 'layouts/community/ortho_4x12')
-rw-r--r--layouts/community/ortho_4x12/bocaj/config.h106
-rw-r--r--layouts/community/ortho_4x12/bocaj/keymap.c287
-rw-r--r--layouts/community/ortho_4x12/bocaj/readme.md23
-rw-r--r--layouts/community/ortho_4x12/bocaj/rules.mk43
-rw-r--r--layouts/community/ortho_4x12/jjerrell/config.h57
-rw-r--r--layouts/community/ortho_4x12/jjerrell/keymap.c227
-rw-r--r--layouts/community/ortho_4x12/jjerrell/readme.md7
-rw-r--r--layouts/community/ortho_4x12/jjerrell/rules.mk8
8 files changed, 299 insertions, 459 deletions
diff --git a/layouts/community/ortho_4x12/bocaj/config.h b/layouts/community/ortho_4x12/bocaj/config.h
deleted file mode 100644
index 9a65684f3..000000000
--- a/layouts/community/ortho_4x12/bocaj/config.h
+++ /dev/null
@@ -1,106 +0,0 @@
1#pragma once
2
3#define LEADER_TIMEOUT 250
4#define LEADER_PER_KEY_TIMING
5
6#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
7# if defined(KEYBOARD_planck_light)
8# define RGB_DI_PIN A0
9# define RGBLED_NUM 13 // Number of LEDs
10# endif
11# define RGBLIGHT_HUE_STEP 12
12# define RGBLIGHT_SAT_STEP 12
13# define RGBLIGHT_VAL_STEP 12
14# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
15# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
16# ifdef RGB_MATRIX_ENABLE
17# define RGBLIGHT_DISABLE_KEYCODES
18# endif
19#endif // RGBLIGHT_ENABLE
20
21#ifdef RGB_MATRIX_ENABLE
22# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
23// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
24# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
25// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
26// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
27# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
28# undef RGB_MATRIX_LED_PROCESS_LIMIT
29# undef RGB_MATRIX_LED_FLUSH_LIMIT
30#endif
31
32#if defined(KEYBOARD_planck_ez)
33# undef PRODUCT
34# define PRODUCT Bocaj Hacked Planck EZ
35#endif
36
37#define EEPROM_I2C_RM24C512C
38
39#define ENCODER_DIRECTION_FLIP
40/*
41 * MIDI options
42 */
43
44/* enable basic MIDI features:
45 - MIDI notes can be sent when in Music mode is on
46*/
47
48// #define MIDI_BASIC
49
50/* enable advanced MIDI features:
51 - MIDI notes can be added to the keymap
52 - Octave shift and transpose
53 - Virtual sustain, portamento, and modulation wheel
54 - etc.
55*/
56//#define MIDI_ADVANCED
57
58/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
59//#define MIDI_TONE_KEYCODE_OCTAVES 2
60
61#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
62#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
63#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
64
65/* default 3V ERM vibration motor voltage and library*/
66#if FB_ERM_LRA == 0
67# define RATED_VOLTAGE 3
68# define V_RMS 2.3
69# define V_PEAK 3.30
70/* Library Selection */
71# define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
72
73/* default 2V LRA voltage and library */
74#elif FB_ERM_LRA == 1
75# define RATED_VOLTAGE 2
76# define V_RMS 2.0
77# define V_PEAK 2.85
78# define F_LRA 200
79/* Library Selection */
80# define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
81
82#endif
83
84/* Control 1 register settings */
85#define DRIVE_TIME 25
86#define AC_COUPLE 0
87#define STARTUP_BOOST 1
88
89/* Control 2 Settings */
90#define BIDIR_INPUT 1
91#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
92#define SAMPLE_TIME 3
93#define BLANKING_TIME 1
94#define IDISS_TIME 1
95
96/* Control 3 settings */
97#define NG_THRESH 2
98#define ERM_OPEN_LOOP 1
99#define SUPPLY_COMP_DIS 0
100#define DATA_FORMAT_RTO 0
101#define LRA_DRIVE_MODE 0
102#define N_PWM_ANALOG 0
103#define LRA_OPEN_LOOP 0
104/* Control 4 settings */
105#define ZC_DET_TIME 0
106#define AUTO_CAL_TIME 3
diff --git a/layouts/community/ortho_4x12/bocaj/keymap.c b/layouts/community/ortho_4x12/bocaj/keymap.c
deleted file mode 100644
index 6adbb6d61..000000000
--- a/layouts/community/ortho_4x12/bocaj/keymap.c
+++ /dev/null
@@ -1,287 +0,0 @@
1/*
2Copyright 2020 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell
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#include "bocaj.h"
19
20#ifdef BACKLIGHT_ENABLE
21enum planck_keycodes {
22 BACKLIT = NEW_SAFE_RANGE,
23 TH_LVL,
24};
25
26#else
27# define BACKLIT OSM(MOD_LSFT)
28enum planck_keycodes {
29 TH_LVL = NEW_SAFE_RANGE,
30};
31#endif
32
33/*
34 * Tap/Hold Wrapper
35 * ,-----------------------------------------------------------------------------------.
36 * | | | | | | | | | | | | |
37 * |------+------+------+------+------+------+------+------+------+------+------+------|
38 * | | |Shift | Cmd | Alt | | | Alt | Cmd |Shift | | |
39 * |------+------+------+------+------+------+------+------+------+------+------+------|
40 * | | Ctrl | | | | | | | | | Ctrl | |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | | | | |Lower | |Raise | | | | |
43 * `-----------------------------------------------------------------------------------'
44 */
45#define LAYOUT_ortho_4x12_bocaj(...) WRAPPER_planck_bocaj(__VA_ARGS__)
46
47/*
48 * Base Alphanumeric Wrapper + Tap/Hold Wrapper
49 * ,-----------------------------------------------------------------------------------.
50 * | Esc | | | | | | | | | | | - |
51 * |------+------+------+------+------+------+------+------+------+------+------+------|
52 * | Tab | | | | | HYPR | MEH | | | | | ' |
53 * |------+------+------+------+------+------+------+------+------+------+------+------|
54 * | Shift| | | | | | | | | | | TTMOD|
55 * |------+------+------+------+------+------+------+------+------+------+------+------|
56 * | MOMOD| Lead | Up | Left |BkSpc | Space |Enter |Right | Down | XXX | XXX |
57 * `-----------------------------------------------------------------------------------'
58 */
59#define LAYOUT_ortho_4x12_bocaj_base(...) WRAPPER_planck_bocaj_base(__VA_ARGS__)
60#define LAYOUT_ortho_4x12_bocaj_base_WIN(...) WRAPPER_planck_bocaj_base_WIN(__VA_ARGS__)
61
62const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
63
64 [_WORKMAN] = LAYOUT_ortho_4x12_bocaj_base(
65 _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
66 _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
67 _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
68 ),
69 [_WWORKMAN] = LAYOUT_ortho_4x12_bocaj_base_WIN(
70 _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
71 _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
72 _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
73 ),
74
75 [_QWERTY] = LAYOUT_ortho_4x12_bocaj_base(
76 _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
77 _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
78 _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
79 ),
80 [_WQWERTY] = LAYOUT_ortho_4x12_bocaj_base_WIN(
81 _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
82 _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
83 _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
84 ),
85
86 [_LOWER] = LAYOUT_ortho_4x12_bocaj(
87 ___________________LOWER_L1_EXT____________________, ___________________LOWER_R1_EXT____________________,
88 ___________________LOWER_L2_EXT____________________, ___________________LOWER_R2_EXT____________________,
89 ___________________LOWER_L3_EXT____________________, ___________________LOWER_R3_EXT____________________,
90 _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_COMM, _______, _______
91 ),
92
93 [_RAISE] = LAYOUT_ortho_4x12_bocaj(
94 KC_TILD, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_EQUAL,
95 KC_F11, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_F12,
96 _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
97 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
98 ),
99
100 [_ADJUST] = WRAPPER_ortho_4x12(
101 KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST,
102 VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
103 TH_LVL, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL,
104 HPT_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
105 )
106
107};
108// clang-format on
109
110bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
111 switch (keycode) {
112#ifdef BACKLIGHT_ENABLE
113 case BACKLIT:
114 if (record->event.pressed) {
115 register_code(KC_RSFT);
116# ifdef BACKLIGHT_ENABLE
117 backlight_step();
118# endif
119 } else {
120 unregister_code(KC_RSFT);
121 }
122 break;
123#endif
124#ifdef KEYBOARD_planck_ez
125 case TH_LVL:
126 if (record->event.pressed) {
127 keyboard_config.led_level++;
128 if (keyboard_config.led_level > 4) {
129 keyboard_config.led_level = 0;
130 }
131 planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4);
132 planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4);
133 eeconfig_update_kb(keyboard_config.raw);
134 layer_state_set_kb(layer_state);
135 }
136 break;
137#endif
138 }
139 return true;
140}
141
142bool music_mask_user(uint16_t keycode) {
143 switch (keycode) {
144 default:
145 return true;
146 }
147}
148
149#ifdef RGB_MATRIX_ENABLE
150
151// clang-format off
152void suspend_power_down_keymap(void) {
153 rgb_matrix_set_suspend_state(true);
154}
155
156void suspend_wakeup_init_keymap(void) {
157 rgb_matrix_set_suspend_state(false);
158}
159// clang-format on
160
161void rgb_matrix_indicators_user(void) {
162 uint8_t this_mod = get_mods();
163 uint8_t this_led = host_keyboard_leds();
164 uint8_t this_osm = get_oneshot_mods();
165 bool is_ez;
166# ifdef KEYBOARD_planck_ez
167 is_ez = true;
168# endif
169
170 if (g_suspend_state || !rgb_matrix_config.enable) return;
171
172# if defined(RGBLIGHT_ENABLE)
173 if (!userspace_config.rgb_layer_change)
174# else
175 if (userspace_config.rgb_layer_change)
176# endif
177 {
178 switch (get_highest_layer(layer_state)) {
179 case _MOD:
180 rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
181 break;
182 case _RAISE:
183 rgb_matrix_layer_helper(HSV_BLUE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
184 break;
185 case _LOWER:
186 rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
187 break;
188 case _ADJUST:
189 rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
190 break;
191 default: {
192 bool mods_enabled = false;
193 switch (get_highest_layer(default_layer_state)) {
194 case _QWERTY:
195 rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
196 break;
197 case _WQWERTY:
198 rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
199 break;
200 case _WORKMAN:
201 rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
202 break;
203 case _WWORKMAN:
204 rgb_matrix_layer_helper(HSV_GREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
205 break;
206 }
207 break;
208 }
209 }
210 }
211
212 switch (get_highest_layer(default_layer_state)) {
213 case _QWERTY:
214 rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF);
215 break;
216 case _WORKMAN:
217 rgb_matrix_set_color(is_ez ? 41 : 42, 0xD9, 0xA5, 0x21);
218 break;
219 }
220
221 if ((this_mod | this_osm) & MODS_SHIFT_MASK || this_led & (1 << USB_LED_CAPS_LOCK)) {
222 rgb_matrix_set_color_row(0, 0x00, 0xFF, 0x00);
223 }
224 if ((this_mod | this_osm) & MODS_CTRL_MASK && (this_mod | this_osm) & MODS_GUI_MASK) {
225 rgb_matrix_set_color_row(1, 0xFF, 0xD9, 0xFF);
226 } else if ((this_mod | this_osm) & MODS_CTRL_MASK) {
227 rgb_matrix_set_color_row(1, 0xFF, 0x00, 0x00);
228 } else if ((this_mod | this_osm) & MODS_GUI_MASK) {
229 rgb_matrix_set_color_row(1, 0xFF, 0xD9, 0x00);
230 }
231 if ((this_mod | this_osm) & MODS_ALT_MASK) {
232 rgb_matrix_set_color_row(2, 0x00, 0x00, 0xFF);
233 }
234}
235#endif // RGB_MATRIX_INIT
236
237void matrix_init_keymap(void) {}
238
239#ifdef ENCODER_ENABLE
240bool encoder_update_user(uint8_t index, bool clockwise) {
241 switch (get_highest_layer(layer_state)) {
242 case _RAISE:
243 clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU);
244 break;
245 case _LOWER:
246# ifdef RGB_MATRIX_ENABLE
247 clockwise ? rgb_matrix_step() : rgb_matrix_step_reverse();
248# else
249 clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
250# endif
251 break;
252 case _ADJUST:
253# ifdef AUDIO_CLICKY
254 clockwise ? clicky_freq_up() : clicky_freq_down();
255# endif
256 break;
257 default:
258 clockwise ? tap_code(KC_DOWN) : tap_code(KC_UP);
259 }
260# ifdef AUDIO_CLICKY
261 clicky_play();
262# endif
263 return true;
264}
265#endif // ENCODER_ENABLE
266
267#ifdef KEYBOARD_planck_ez
268layer_state_t layer_state_set_keymap(layer_state_t state) {
269 planck_ez_left_led_off();
270 planck_ez_right_led_off();
271 switch (get_highest_layer(state)) {
272 case _LOWER:
273 planck_ez_left_led_on();
274 break;
275 case _RAISE:
276 planck_ez_right_led_on();
277 break;
278 case _ADJUST:
279 planck_ez_right_led_on();
280 planck_ez_left_led_on();
281 break;
282 default:
283 break;
284 }
285 return state;
286}
287#endif
diff --git a/layouts/community/ortho_4x12/bocaj/readme.md b/layouts/community/ortho_4x12/bocaj/readme.md
deleted file mode 100644
index a3716b8dc..000000000
--- a/layouts/community/ortho_4x12/bocaj/readme.md
+++ /dev/null
@@ -1,23 +0,0 @@
1# Overview
2
3This is my Planck EZ layout, heavily based upon [my ergodox layout](../../ergodox/bocaj/).
4
5I got this keyboard for two reasons:
6
71. QMK spoiled me and the Ergodox isn't incredibly portable (ok 3 reasons)
82. This can sit ontop of my janky Macbook Pro keyboard (disabled with Karabiner if the planck is connected) when I want to work from the couch.
9
10## How to Build
11
12Put simply:
13`make planck/ez:bocaj`
14
15On that note, I use a separate workspace when making changes to my layouts or userspace. In that repo, there is a tool that does this for me. See [JacobJerrell/qmk_layouts/tools/](https://github.com/JacobJerrell/qmk_layouts/tree/master/tools) until I get documentation finished (Write code first, define requirements second... right?).
16
17## Layers
18
19* WORKMAN/QWERTY: Default is workman, can be switched via the ADJUST layer. Idk why you would though.
20* LOWER: Nums across the top, switches enter key to tab and tab key to delete. Symbols in the middle, remenascent of the ergodox
21* RAISE: Symbols across the top, F-Keys on the 2nd row. Switches backspace to delete
22* ADJUST: Computer Audio controls, RGB controls, Sound controls, macros, etc.
23* MOD: Mouse controls under the left hand. Numpad under the right hand \ No newline at end of file
diff --git a/layouts/community/ortho_4x12/bocaj/rules.mk b/layouts/community/ortho_4x12/bocaj/rules.mk
deleted file mode 100644
index 5c642e65c..000000000
--- a/layouts/community/ortho_4x12/bocaj/rules.mk
+++ /dev/null
@@ -1,43 +0,0 @@
1BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
2MOUSEKEY_ENABLE = no # Mouse keys(+4700)
3EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
4TAP_DANCE_ENABLE = no
5SPACE_CADET_ENABLE = no
6NKRO_ENABLE = yes
7
8ifneq ($(strip $(KEYBOARD)), planck/rev6)
9 CONSOLE_ENABLE = no
10 COMMAND_ENABLE = no
11 ifeq ($(strip $(LAYOUT_HAS_RGB)), yes)
12 RGBLIGHT_ENABLE = yes
13 INDICATOR_LIGHTS = yes
14 RGBLIGHT_TWINKLE = yes
15 RGBLIGHT_STARTUP_ANIMATION = yes
16 endif
17else
18 CONSOLE_ENABLE = yes
19 COMMAND_ENABLE = yes
20 RGBLIGHT_ENABLE = yes
21 RGBLIGHT_STARTUP_ANIMATION = yes
22 RGB_MATRIX_ENABLE = no
23 AUDIO_ENABLE = yes
24 EEPROM_DRIVER = i2c
25endif
26ifeq ($(strip $(KEYBOARD)), planck/light)
27 RGB_MATRIX_ENABLE = yes
28 RGBLIGHT_ENABLE = yes
29 RGBLIGHT_STARTUP_ANIMATION = yes
30 AUDIO_ENABLE = yes
31 # HAPTIC_ENABLE += SOLENOID
32endif
33ifeq ($(strip $(KEYBOARD)), planck/ez)
34 RGBLIGHT_ENABLE = no
35 ENCODER_ENABLE = yes
36 RGB_MATRIX_ENABLE = IS31FL3737
37 INDICATOR_LIGHTS = yes
38 RGBLIGHT_TWINKLE = yes
39 RGBLIGHT_STARTUP_ANIMATION = yes
40 CONSOLE_ENABLE = yes
41 COMMAND_ENABLE = yes
42 AUDIO_ENABLE = yes
43endif
diff --git a/layouts/community/ortho_4x12/jjerrell/config.h b/layouts/community/ortho_4x12/jjerrell/config.h
new file mode 100644
index 000000000..aee885b8d
--- /dev/null
+++ b/layouts/community/ortho_4x12/jjerrell/config.h
@@ -0,0 +1,57 @@
1// Copyright (C) 2021 Jerrell, Jacob <@jjerrell>
2//
3// This file is part of qmk_firmware.
4//
5// qmk_firmware is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// qmk_firmware is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with qmk_firmware. If not, see <http://www.gnu.org/licenses/>.
17
18#pragma once
19
20// Allows time for repositioning hands due to awkward key placement
21#define LEADER_NO_TIMEOUT
22
23#ifdef AUDIO_ENABLE
24 #define STARTUP_SONG SONG(PLANCK_SOUND)
25 // #define STARTUP_SONG SONG(NO_SOUND)
26
27 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
28 SONG(COLEMAK_SOUND), \
29 SONG(DVORAK_SOUND) \
30 }
31#endif
32
33#ifdef KEYBOARD_planck_ez_glow
34#undef PRODUCT
35#define PRODUCT Planck EZ Glow - Modified by <@jjerrell>
36#endif
37
38/*
39 * MIDI options
40 */
41
42/* enable basic MIDI features:
43 - MIDI notes can be sent when in Music mode is on
44*/
45
46#define MIDI_BASIC
47
48/* enable advanced MIDI features:
49 - MIDI notes can be added to the keymap
50 - Octave shift and transpose
51 - Virtual sustain, portamento, and modulation wheel
52 - etc.
53*/
54//#define MIDI_ADVANCED
55
56// Most tactile encoders have detents every 4 stages
57#define ENCODER_RESOLUTION 4
diff --git a/layouts/community/ortho_4x12/jjerrell/keymap.c b/layouts/community/ortho_4x12/jjerrell/keymap.c
new file mode 100644
index 000000000..d873907e9
--- /dev/null
+++ b/layouts/community/ortho_4x12/jjerrell/keymap.c
@@ -0,0 +1,227 @@
1/* Copyright 2015-2017 Jack Humbert
2 * Copyright 2021 Jacob Jerrell <@jjerrell>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "jjerrell.h"
19
20enum planck_layers {
21 _GAME_LOWER = LAYER_SAFE_RANGE,
22 // _GAME_RAISE,
23};
24
25#define LAYOUT_planck_plain(...) WRAPPER_ortho_4x12(__VA_ARGS__)
26
27// clang-format off
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 [_WORKMAN] = LAYOUT_planck_base(
30 __________________WORKMN_L1__________________, __________________WORKMN_R1__________________,
31 __________________WORKMN_L2__________________, __________________WORKMN_R2__________________,
32 __________________WORKMN_L3__________________, __________________WORKMN_R3__________________
33 ),
34 /* Lower - Nav/Select/Nums
35 * ,-----------------------------------------------------------------------------------.
36 * | PGUP | BSPC | UP | DEL | PGDN | | | | 7 | 8 | 9 | * |
37 * |------+------+------+------+------+------+------+------+------+------+------+------|
38 * | HOME | LEFT | DOWN | RGHT | END | | | | 4 | 5 | 6 | / |
39 * |------+------+------+------+------+------+------+------+------+------+------+------|
40 * | ESC | TAB | | ENTR | | | | | 1 | 2 | 3 | - |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | | | | | held | SPACE | ENTR | 0 | . | , | + |
43 * `-----------------------------------------------------------------------------------'
44 */
45 [_LOWER] = LAYOUT_planck_mods(
46 __________________LOWER_L1___________________, XXXXXXX, XXXXXXX, __________________LOWER_R1___________________,
47 __________________LOWER_L2___________________, XXXXXXX, XXXXXXX, __________________LOWER_R2___________________,
48 __________________LOWER_L3___________________, XXXXXXX, XXXXXXX, __________________LOWER_R3___________________,
49 _________________________________________PLANCK_LOWER_BOTTOM_ROW_________________________________________
50 ),
51 /* Raise - Symbols
52 * ,-----------------------------------------------------------------------------------.
53 * | % | _ | [ | ] | ^ | | | ! | < | > | = | : |
54 * |------+------+------+------+------+------+------+------+------+------+------+------|
55 * | \ | / | { | } | * | | | ? | ( | ) | - | ; |
56 * |------+------+------+------+------+------+------+------+------+------+------+------|
57 * | # | $ | | | ~ | ` | | | @ | " | ' | + | & |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * | | LEAD | | | BSPC | SPACE | held | | | | |
60 * `-----------------------------------------------------------------------------------'
61 */
62 [_RAISE] = LAYOUT_planck_common(
63 __________________RAISE_L1___________________, __________________RAISE_R1___________________,
64 __________________RAISE_L2___________________, __________________RAISE_R2___________________,
65 __________________RAISE_L3___________________, __________________RAISE_R3___________________
66 ),
67 /* Adjust (Lower + Raise)
68 * ,-----------------------------------------------------------------------------------.
69 * | Make | Debug|Reset |TermOn|TrmOff| | |MusMod|Mus On|MusOff|MidiOn|MidOff|
70 * |------+------+------+------+------+------+------+------+------+------+------+------|
71 * | Mute | Vol- | Vol+ | Play | Skip | | |Voice-| HUE+ | HUE- | SAT+ | SAT- |
72 * |------+------+------+------+------+------+------+------+------+------+------+------|
73 * | Vrsn | AudOn|AudOff|CGswap|CGnorm| | |Voice+|RGBTog|RGBMod|BRGHT+|BRGHT-|
74 * |------+------+------+------+------+------+------+------+------+------+------+------|
75 * | | | | | held | | held | | | | |
76 * `-----------------------------------------------------------------------------------'
77 */
78 [_ADJUST] = LAYOUT_planck_common(
79 __________________ADJUST_L1__________________, __________________ADJUST_R1__________________,
80 __________________ADJUST_L2__________________, __________________ADJUST_R2__________________,
81 __________________ADJUST_L3__________________, __________________ADJUST_R3__________________
82 ),
83 [_GAME] = LAYOUT_planck_plain(
84 __________________QWERTY_L1__________________, _______, _______, XXXXXXX, KC_9, KC_0, KC_MINS, KC_EQL,
85 __________________QWERTY_L2__________________, XXXXXXX, XXXXXXX, XXXXXXX, KC_5, KC_6, KC_7, KC_8,
86 __________________QWERTY_L3__________________, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_4,
87 KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, LT(_LOWER, KC_BSPC), KC_SPC, XXXXXXX, LT(_WORKMAN, KC_ENT), MACRO_1, MACRO_2, MACRO_3, MACRO_4
88 ),
89 [_GAME_LOWER] = LAYOUT_planck_plain(
90 _______, _______, _______, _______, _______, _______, _______, _______, C(_______), C(_______), C(_______), C(_______),
91 _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, C(_______), C(_______), C(_______), C(_______),
92 _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, C(_______), C(_______), C(_______), C(_______),
93 MACRO_1, MACRO_2, MACRO_3, MACRO_4, _______, _______, XXXXXXX, _______, MACRO_5, MACRO_6, MACRO_7, MACRO_8
94 )
95
96};
97// clang-format on
98
99bool muse_mode = false;
100uint8_t last_muse_note = 0;
101uint16_t muse_counter = 0;
102uint8_t muse_offset = 70;
103uint16_t muse_tempo = 50;
104
105#ifdef KEYBOARD_planck_ez
106void planck_ez_teeth_set(layer_state_t state) {
107 switch (get_highest_layer(state)) {
108 case _LOWER:
109 planck_ez_left_led_level(40);
110 break;
111 case _RAISE:
112 planck_ez_right_led_level(40);
113 break;
114 case _ADJUST:
115 planck_ez_left_led_level(40);
116 planck_ez_right_led_level(40);
117 break;
118 case _GAME_LOWER:
119 planck_ez_left_led_level(20);
120 break;
121// todo case _GAME_RAISE:
122 // planck_ez_right_led_level(20);
123 // break;
124 case _WORKMAN:
125 if (IS_LAYER_ON(_GAME)) {
126 planck_ez_left_led_level(60);
127 planck_ez_right_led_level(60);
128 break;
129 }
130 default:
131 planck_ez_left_led_off();
132 planck_ez_right_led_off();
133 break;
134 }
135}
136
137layer_state_t layer_state_set_keymap(layer_state_t state) {
138 planck_ez_left_led_off();
139 planck_ez_right_led_off();
140 state = update_tri_layer_state(state, _GAME, _LOWER, _GAME_LOWER);
141 planck_ez_teeth_set(state);
142 return state;
143}
144#endif
145
146bool encoder_update(bool clockwise) {
147 if (muse_mode) {
148 if (IS_LAYER_ON(_RAISE)) {
149 if (clockwise) {
150 muse_offset++;
151 } else {
152 muse_offset--;
153 }
154 } else {
155 if (clockwise) {
156 muse_tempo+=1;
157 } else {
158 muse_tempo-=1;
159 }
160 }
161 } else {
162 if (clockwise) {
163# ifdef MOUSEKEY_ENABLE
164 tap_code(KC_MS_WH_DOWN);
165# else
166 tap_code(KC_PGDN);
167# endif
168 } else {
169# ifdef MOUSEKEY_ENABLE
170 tap_code(KC_MS_WH_UP);
171# else
172 tap_code(KC_PGUP);
173# endif
174 }
175 }
176 return true;
177}
178
179void dip_switch_update_keymap(uint8_t index, bool active) {
180 switch (index) {
181 case 0: {
182 if (active) {
183 layer_on(_ADJUST);
184 } else {
185 layer_off(_ADJUST);
186 }
187 break;
188 }
189 case 1:
190 if (active) {
191 muse_mode = true;
192 } else {
193 muse_mode = false;
194 }
195 }
196}
197
198#ifdef AUDIO_ENABLE
199void matrix_scan_keymap(void) {
200 if (muse_mode) {
201 if (muse_counter == 0) {
202 uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
203 if (muse_note != last_muse_note) {
204 stop_note(compute_freq_for_midi_note(last_muse_note));
205 play_note(compute_freq_for_midi_note(muse_note), 0xF);
206 last_muse_note = muse_note;
207 }
208 }
209 muse_counter = (muse_counter + 1) % muse_tempo;
210 } else {
211 if (muse_counter) {
212 stop_all_notes();
213 muse_counter = 0;
214 }
215 }
216}
217#endif
218
219bool music_mask_keymap(uint16_t keycode) {
220 switch (keycode) {
221 case _RAISE:
222 case _LOWER:
223 return false;
224 default:
225 return true;
226 }
227}
diff --git a/layouts/community/ortho_4x12/jjerrell/readme.md b/layouts/community/ortho_4x12/jjerrell/readme.md
new file mode 100644
index 000000000..ec947ea35
--- /dev/null
+++ b/layouts/community/ortho_4x12/jjerrell/readme.md
@@ -0,0 +1,7 @@
1# JJerrell's Planck EZ Layout
2
3As with my other keymaps, this layout is a close adaptation of the Neo keyboard. Obvious differences are that the alpha keymap is Workman and if you're already used to the secondary layers of the Neo keymap, this might be very uncomfortable for you because of slight variations.
4
5The keymap has been setup to pretty much remove the center columns above the spacebar and limit use of the bottom row by supplying paths to removed functionality that are simpler to process mentally and require less finger acrobatics.
6
7My ownership of this keyboard could not have been easily predicted because my original justification of this hobby was health related. I found QMK through the Ergodox EZ and this keyboard is a result of that discovery -- I could not live without some QMK features. As you can see, my problem has come full circle... now I use this keyboard when I'm not at a desk and it's tiny. This is offset by eliminating use of the center columns, relying on a symbol layer almost exclusively, and relying on a navigation layer instead of getting by with the minimum on the alpha layers which became uncomfortable even with the thumbs doing the heavy lifting and mods being comfortably placed on the home row.
diff --git a/layouts/community/ortho_4x12/jjerrell/rules.mk b/layouts/community/ortho_4x12/jjerrell/rules.mk
new file mode 100644
index 000000000..39f31a266
--- /dev/null
+++ b/layouts/community/ortho_4x12/jjerrell/rules.mk
@@ -0,0 +1,8 @@
1SRC += muse.c
2
3BOOTMAGIC_ENABLE = lite
4MOUSEKEY_ENABLE = no
5EXTRAKEY_ENABLE = yes
6TAP_DANCE_ENABLE = no
7SPACE_CADET_ENABLE = no
8NKRO_ENABLE = no