diff options
Diffstat (limited to 'layouts/community')
-rw-r--r-- | layouts/community/ergodox/bocaj/config.h | 4 | ||||
-rw-r--r-- | layouts/community/ergodox/bocaj/keymap.c | 175 | ||||
-rw-r--r-- | layouts/community/ergodox/bocaj/readme.md | 28 | ||||
-rw-r--r-- | layouts/community/ergodox/bocaj/rules.mk | 14 | ||||
-rw-r--r-- | layouts/community/ergodox/jjerrell/config.h | 21 | ||||
-rw-r--r-- | layouts/community/ergodox/jjerrell/keymap.c | 129 | ||||
-rw-r--r-- | layouts/community/ergodox/jjerrell/readme.md | 5 | ||||
-rw-r--r-- | layouts/community/ergodox/jjerrell/rules.mk | 14 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/bocaj/config.h | 106 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/bocaj/keymap.c | 287 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/bocaj/readme.md | 23 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/bocaj/rules.mk | 43 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/jjerrell/config.h | 57 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/jjerrell/keymap.c | 227 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/jjerrell/readme.md | 7 | ||||
-rw-r--r-- | layouts/community/ortho_4x12/jjerrell/rules.mk | 8 |
16 files changed, 468 insertions, 680 deletions
diff --git a/layouts/community/ergodox/bocaj/config.h b/layouts/community/ergodox/bocaj/config.h deleted file mode 100644 index 621ae784cf..0000000000 --- a/layouts/community/ergodox/bocaj/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#define LEADER_TIMEOUT 250 -#define LEADER_PER_KEY_TIMING diff --git a/layouts/community/ergodox/bocaj/keymap.c b/layouts/community/ergodox/bocaj/keymap.c deleted file mode 100644 index ba105a8f1d..0000000000 --- a/layouts/community/ergodox/bocaj/keymap.c +++ /dev/null @@ -1,175 +0,0 @@ -/* -Copyright 2020 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "bocaj.h" - -/* - * The `LAYOUT_ergodox_pretty_base` macro is a template to allow the use of - * identical modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, - * etc), so that there is no need to set them up for each layout, and modify - * all of them if I want to change them. This helps to keep consistency and - * ease of use. K## is a placeholder to pass through the individual keycodes - */ -#define LAYOUT_ergodox_bocaj(...) WRAPPER_ergodox_bocaj(__VA_ARGS__) -#define LAYOUT_ergodox_bocaj_WIN(...) WRAPPER_ergodox_bocaj_WIN(__VA_ARGS__) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_WORKMAN] = LAYOUT_ergodox_bocaj( - KC_ESC, ________________NUMBER_LEFT________________, KC_ARRW, KC_MINS, ________________NUMBER_RIGHT_______________, KC_EQUAL, - KC_DEL, _________________WORKMAN_L1________________, KC_LPRN, KC_RPRN, _________________WORKMAN_R1________________, KC_BSLS, - _______, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, - KC_LSFT, _________________WORKMAN_L3________________, KC_LBRC, KC_RBRC, _________________WORKMAN_R3________________, _______, - MO_MOD, KC_PGUP, KC_HOME, KC_UP, KC_LEFT, KC_RIGHT, KC_DOWN, KC_END, KC_PGDN, WORKMAN, - KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, - KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, - KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER - ), - - [_WWORKMAN] = LAYOUT_ergodox_bocaj_WIN( - KC_ESC, ________________NUMBER_LEFT________________, KC_ARRW, KC_MINS, ________________NUMBER_RIGHT_______________, KC_EQUAL, - KC_DEL, _________________WORKMAN_L1________________, KC_LPRN, KC_RPRN, _________________WORKMAN_R1________________, KC_BSLS, - _______, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, - KC_LSFT, _________________WORKMAN_L3________________, KC_LBRC, KC_RBRC, _________________WORKMAN_R3________________, _______, - MO_MOD, KC_PGUP, KC_HOME, KC_UP, KC_LEFT, KC_RIGHT, KC_DOWN, KC_END, KC_PGDN, WORKMAN, - KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, - KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, - KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER - ), - - [_LOWER] = LAYOUT_ergodox_bocaj( - KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_BSLS, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, KC_ASTR, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_PLUS, _______, - _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_COMM, KC_MINS, _______, - KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, - KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, - KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER - ), - - [_RAISE] = LAYOUT_ergodox_bocaj( - KC_TILD, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, _______, - KC_F11, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_F12, - _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, - _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, _______, _______, _______, ___________________BLANK___________________, _______, - ___________________BLANK___________________, ___________________BLANK___________________, - KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, - KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, - KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER - ), - - [_ADJUST] = LAYOUT_ergodox_pretty( - KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, - VRSN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, - _______, KC__MUTE, KC__VOLDOWN, KC__VOLUP, _______, KC_MNXT, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, - KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, - KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER - ), - - // Wrapping Mouse-Wheel Keys with `X_T()` style functions seems - // to break the mouse button. So we can't use the wrapper here. - [_MOD] = LAYOUT_ergodox_pretty( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_WH_D, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, - _______, _______, KC_WH_L, KC_WH_U, KC_WH_R, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, - _______,_______, /* <- LHS/RHS -> */ _______,_______, - _______, /* <- LHS/RHS -> */ _______, - KC_BTN1,KC_BTN2,_______, /* <- LHS/RHS -> */ _______,KC_BTN3,KC_BTN4 - ) - -}; -// clang-format on - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void matrix_init_keymap(void) {}; - -// Runs whenever there is a layer state change. -layer_state_t layer_state_set_keymap(layer_state_t state) { - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - - uint8_t layer = get_highest_layer(state); - switch (layer) { - case _LOWER: - ergodox_right_led_3_on(); - break; - case _MOD: - ergodox_right_led_2_on(); - break; - case _RAISE: - ergodox_right_led_1_on(); - break; - case _ADJUST: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - break; - default: - break; - } - - ergodox_right_led_1_set(25); - ergodox_right_led_2_set(25); - ergodox_right_led_3_set(25); - - return state; -}; - -void matrix_scan_keymap(void) { - uint8_t modifiers = get_mods(); - uint8_t led_usb_state = host_keyboard_leds(); - uint8_t one_shot = get_oneshot_mods(); - uint8_t layer_is_workman = layer_state_is(_WORKMAN); - - if ((modifiers) && (layer_is_workman)) { - if (modifiers & MODS_SHIFT_MASK || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MODS_SHIFT_MASK) { - ergodox_right_led_1_on(); - ergodox_right_led_1_set( 25 ); - } else { - ergodox_right_led_1_off(); - } - if ((modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) && (modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK)) { - ergodox_right_led_2_on(); - ergodox_right_led_2_set( 50 ); - } else if ((modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) || (modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK)) { - ergodox_right_led_2_on(); - ergodox_right_led_2_set( 10 ); - } else { - ergodox_right_led_2_off(); - } - if (modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) { - ergodox_right_led_3_on(); - ergodox_right_led_3_set( 10 ); - } else { - ergodox_right_led_3_off(); - } - } else if (!(modifiers) && (layer_is_workman)) { - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - } -}; diff --git a/layouts/community/ergodox/bocaj/readme.md b/layouts/community/ergodox/bocaj/readme.md deleted file mode 100644 index f8bce4e577..0000000000 --- a/layouts/community/ergodox/bocaj/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# Overview - -This is my personal Ergodox EZ configuration, and my daily driver. - -Most of the code resides in my userspace and is heavily based upon [Drashna's work](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)... although considerably slimmed down. - -## How to build - -Put simply: -`make ergodox_ez:bocaj` - -On 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) - -## Layers - -* WORKMAN: No one uses this board but me and I've never had a reason to switch to QWERTY -* LOWER: - * Left: Grave and navigation arrows - * Right: Numpad -* RAISE: - * Symbols across the top, F-Keys on the second row -* ADJUST - * Audio control, make/reset/version macros -* MOD: mouse navigation - -## Ergodox Specifics - -I don't have the underglow or backlit versions so the 3 LEDs on the right board are used for layer indication if not on the base layer. If you're on the base layer, they're used for mod-key indicators. diff --git a/layouts/community/ergodox/bocaj/rules.mk b/layouts/community/ergodox/bocaj/rules.mk deleted file mode 100644 index f7d387031b..0000000000 --- a/layouts/community/ergodox/bocaj/rules.mk +++ /dev/null @@ -1,14 +0,0 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -TAP_DANCE_ENABLE = no -COMMAND_ENABLE = no # Commands for debug and configuration -CONSOLE_ENABLE = yes -SPACE_CADET_ENABLE = no -KEY_LOCK_ENABLE = yes -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes -LEADER_ENABLE = yes - -UNICODE_ENABLE = no -UNICODEMAP_ENABLE = no -RGB_MATRIX_ENABLE = no -RGBLIGHT_ENABLE = no diff --git a/layouts/community/ergodox/jjerrell/config.h b/layouts/community/ergodox/jjerrell/config.h new file mode 100644 index 0000000000..8223108d15 --- /dev/null +++ b/layouts/community/ergodox/jjerrell/config.h @@ -0,0 +1,21 @@ +// Copyright (C) 2021 Jerrell, Jacob <@jjerrell> +// +// This file is part of qmk_firmware. +// +// qmk_firmware is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// qmk_firmware is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with qmk_firmware. If not, see <http://www.gnu.org/licenses/>. + +#ifdef KEYBOARD_ergodox_ez +#undef PRODUCT +#define PRODUCT ErgoDox EZ - Modified by <@jjerrell> +#endif diff --git a/layouts/community/ergodox/jjerrell/keymap.c b/layouts/community/ergodox/jjerrell/keymap.c new file mode 100644 index 0000000000..110a8aba63 --- /dev/null +++ b/layouts/community/ergodox/jjerrell/keymap.c @@ -0,0 +1,129 @@ +/** + * Copyright (C) 2021 Jerrell, Jacob <@jjerrell> + * + * This file is part of qmk_firmware. + * + * qmk_firmware is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * qmk_firmware is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with qmk_firmware. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "jjerrell.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [_WORKMAN] = LAYOUT_ergodox_mods( + __________________WORKMN_L1__________________, __________________WORKMN_R1__________________, + __________________WORKMN_L2__________________, __________________WORKMN_R2__________________, + __________________WORKMN_L3__________________, __________________WORKMN_R3__________________, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX + ), + /* Lower - Nav/Select/Nums */ + [_LOWER] = LAYOUT_ergodox_mods( + __________________LOWER_L1___________________, __________________LOWER_R1___________________, + __________________LOWER_L2___________________, __________________LOWER_R2___________________, + __________________LOWER_L3___________________, __________________LOWER_R3___________________, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_0, KC_DOT, KC_COMM, KC_PLUS + ), + /* Raise - Symbols */ + [_RAISE] = LAYOUT_ergodox_common( + __________________RAISE_L1___________________, __________________RAISE_R1___________________, + __________________RAISE_L2___________________, __________________RAISE_R2___________________, + __________________RAISE_L3___________________, __________________RAISE_R3___________________, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX + ), + /* Adjust (Lower + Raise) */ + [_ADJUST] = LAYOUT_ergodox_common( + __________________ADJUST_L1__________________, __________________ADJUST_R1__________________, + __________________ADJUST_L2__________________, __________________ADJUST_R2__________________, + __________________ADJUST_L3__________________, __________________ADJUST_R3__________________, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX + ), + [_SPECIAL] = LAYOUT_ergodox_common( + XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_WH_L, KC_WH_U, KC_WH_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX + ) +// clang-format on +}; + +#ifdef KEYBOARD_ergodox_ez +// Runs whenever there is a layer state change. +layer_state_t layer_state_set_keymap(layer_state_t state) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + uint8_t layer = get_highest_layer(state); + switch (layer) { + case _LOWER: + ergodox_right_led_3_on(); + break; + case _RAISE: + ergodox_right_led_1_on(); + break; + case _ADJUST: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _SPECIAL: + ergodox_right_led_2_on(); + break; + default: + break; + } + + ergodox_right_led_1_set(25); + ergodox_right_led_2_set(25); + ergodox_right_led_3_set(25); + + return state; +}; + +void matrix_scan_keymap(void) { + uint8_t modifiers = get_mods(); + uint8_t led_usb_state = host_keyboard_leds(); + uint8_t one_shot = get_oneshot_mods(); + uint8_t layer_is_workman = layer_state_is(_WORKMAN); + + if ((modifiers) && (layer_is_workman)) { + if (modifiers & MOD_MASK_SHIFT || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MOD_MASK_SHIFT) { + ergodox_right_led_1_on(); + ergodox_right_led_1_set( 25 ); + } else { + ergodox_right_led_1_off(); + } + if ((modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) && (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI)) { + ergodox_right_led_2_on(); + ergodox_right_led_2_set( 50 ); + } else if ((modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) || (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI)) { + ergodox_right_led_2_on(); + ergodox_right_led_2_set( 10 ); + } else { + ergodox_right_led_2_off(); + } + if (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT) { + ergodox_right_led_3_on(); + ergodox_right_led_3_set( 10 ); + } else { + ergodox_right_led_3_off(); + } + } else if (layer_is_workman) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + } +}; +#endif diff --git a/layouts/community/ergodox/jjerrell/readme.md b/layouts/community/ergodox/jjerrell/readme.md new file mode 100644 index 0000000000..6b89134c2f --- /dev/null +++ b/layouts/community/ergodox/jjerrell/readme.md @@ -0,0 +1,5 @@ +# Jacob Jerrell's Ergodox Layout + +This is my original QMK keyboard. There isn't much to see here aside from some control over the 3 ergodox_right LEDs for layer & modifier indication. + +The bulk of the functionality is implemented in [my userspace](../../../../users/jjerrell) so it can be shared among my other keyboards. diff --git a/layouts/community/ergodox/jjerrell/rules.mk b/layouts/community/ergodox/jjerrell/rules.mk new file mode 100644 index 0000000000..4288a264c6 --- /dev/null +++ b/layouts/community/ergodox/jjerrell/rules.mk @@ -0,0 +1,14 @@ +BOOTMAGIC_ENABLE = lite +TAP_DANCE_ENABLE = no +COMMAND_ENABLE = no +CONSOLE_ENABLE = yes +SPACE_CADET_ENABLE = no +KEY_LOCK_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +LEADER_ENABLE = yes + +UNICODE_ENABLE = no +UNICODEMAP_ENABLE = no +RGB_MATRIX_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/layouts/community/ortho_4x12/bocaj/config.h b/layouts/community/ortho_4x12/bocaj/config.h deleted file mode 100644 index c9d297f927..0000000000 --- a/layouts/community/ortho_4x12/bocaj/config.h +++ /dev/null @@ -1,106 +0,0 @@ -#pragma once - -#define LEADER_TIMEOUT 250 -#define LEADER_PER_KEY_TIMING - -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) -# if defined(KEYBOARD_planck_light) -# define RGB_DI_PIN A0 -# define RGBLED_NUM 13 // Number of LEDs -# endif -# define RGBLIGHT_HUE_STEP 12 -# define RGBLIGHT_SAT_STEP 12 -# define RGBLIGHT_VAL_STEP 12 -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -# ifdef RGB_MATRIX_ENABLE -# define RGBLIGHT_DISABLE_KEYCODES -# endif -#endif // RGBLIGHT_ENABLE - -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) -// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #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 -# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -# undef RGB_MATRIX_LED_PROCESS_LIMIT -# undef RGB_MATRIX_LED_FLUSH_LIMIT -#endif - -#if defined(KEYBOARD_planck_ez) -# undef PRODUCT -# define PRODUCT Bocaj Hacked Planck EZ -#endif - -#define EEPROM_I2C_RM24C512C - -#define ENCODER_DIRECTION_FLIP -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ - -// #define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ -#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ -#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ - -/* default 3V ERM vibration motor voltage and library*/ -#if FB_ERM_LRA == 0 -# define RATED_VOLTAGE 3 -# define V_RMS 2.3 -# define V_PEAK 3.30 -/* Library Selection */ -# define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ - -/* default 2V LRA voltage and library */ -#elif FB_ERM_LRA == 1 -# define RATED_VOLTAGE 2 -# define V_RMS 2.0 -# define V_PEAK 2.85 -# define F_LRA 200 -/* Library Selection */ -# define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ - -#endif - -/* Control 1 register settings */ -#define DRIVE_TIME 25 -#define AC_COUPLE 0 -#define STARTUP_BOOST 1 - -/* Control 2 Settings */ -#define BIDIR_INPUT 1 -#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ -#define SAMPLE_TIME 3 -#define BLANKING_TIME 1 -#define IDISS_TIME 1 - -/* Control 3 settings */ -#define NG_THRESH 2 -#define ERM_OPEN_LOOP 1 -#define SUPPLY_COMP_DIS 0 -#define DATA_FORMAT_RTO 0 -#define LRA_DRIVE_MODE 0 -#define N_PWM_ANALOG 0 -#define LRA_OPEN_LOOP 0 -/* Control 4 settings */ -#define ZC_DET_TIME 0 -#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 6adbb6d61b..0000000000 --- a/layouts/community/ortho_4x12/bocaj/keymap.c +++ /dev/null @@ -1,287 +0,0 @@ -/* -Copyright 2020 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "bocaj.h" - -#ifdef BACKLIGHT_ENABLE -enum planck_keycodes { - BACKLIT = NEW_SAFE_RANGE, - TH_LVL, -}; - -#else -# define BACKLIT OSM(MOD_LSFT) -enum planck_keycodes { - TH_LVL = NEW_SAFE_RANGE, -}; -#endif - -/* - * Tap/Hold Wrapper - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | |Shift | Cmd | Alt | | | Alt | Cmd |Shift | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Ctrl | | | | | | | | | Ctrl | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | |Lower | |Raise | | | | | - * `-----------------------------------------------------------------------------------' - */ -#define LAYOUT_ortho_4x12_bocaj(...) WRAPPER_planck_bocaj(__VA_ARGS__) - -/* - * Base Alphanumeric Wrapper + Tap/Hold Wrapper - * ,-----------------------------------------------------------------------------------. - * | Esc | | | | | | | | | | | - | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | | | | | HYPR | MEH | | | | | ' | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| | | | | | | | | | | TTMOD| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | MOMOD| Lead | Up | Left |BkSpc | Space |Enter |Right | Down | XXX | XXX | - * `-----------------------------------------------------------------------------------' - */ -#define LAYOUT_ortho_4x12_bocaj_base(...) WRAPPER_planck_bocaj_base(__VA_ARGS__) -#define LAYOUT_ortho_4x12_bocaj_base_WIN(...) WRAPPER_planck_bocaj_base_WIN(__VA_ARGS__) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_WORKMAN] = LAYOUT_ortho_4x12_bocaj_base( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - [_WWORKMAN] = LAYOUT_ortho_4x12_bocaj_base_WIN( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_QWERTY] = LAYOUT_ortho_4x12_bocaj_base( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - [_WQWERTY] = LAYOUT_ortho_4x12_bocaj_base_WIN( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_LOWER] = LAYOUT_ortho_4x12_bocaj( - ___________________LOWER_L1_EXT____________________, ___________________LOWER_R1_EXT____________________, - ___________________LOWER_L2_EXT____________________, ___________________LOWER_R2_EXT____________________, - ___________________LOWER_L3_EXT____________________, ___________________LOWER_R3_EXT____________________, - _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_COMM, _______, _______ - ), - - [_RAISE] = LAYOUT_ortho_4x12_bocaj( - KC_TILD, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_EQUAL, - KC_F11, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_F12, - _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [_ADJUST] = WRAPPER_ortho_4x12( - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, - VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, - TH_LVL, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, - HPT_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) - -}; -// clang-format on - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { -#ifdef BACKLIGHT_ENABLE - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); -# ifdef BACKLIGHT_ENABLE - backlight_step(); -# endif - } else { - unregister_code(KC_RSFT); - } - break; -#endif -#ifdef KEYBOARD_planck_ez - case TH_LVL: - if (record->event.pressed) { - keyboard_config.led_level++; - if (keyboard_config.led_level > 4) { - keyboard_config.led_level = 0; - } - planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4); - planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4); - eeconfig_update_kb(keyboard_config.raw); - layer_state_set_kb(layer_state); - } - break; -#endif - } - return true; -} - -bool music_mask_user(uint16_t keycode) { - switch (keycode) { - default: - return true; - } -} - -#ifdef RGB_MATRIX_ENABLE - -// clang-format off -void suspend_power_down_keymap(void) { - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_keymap(void) { - rgb_matrix_set_suspend_state(false); -} -// clang-format on - -void rgb_matrix_indicators_user(void) { - uint8_t this_mod = get_mods(); - uint8_t this_led = host_keyboard_leds(); - uint8_t this_osm = get_oneshot_mods(); - bool is_ez; -# ifdef KEYBOARD_planck_ez - is_ez = true; -# endif - - if (g_suspend_state || !rgb_matrix_config.enable) return; - -# if defined(RGBLIGHT_ENABLE) - if (!userspace_config.rgb_layer_change) -# else - if (userspace_config.rgb_layer_change) -# endif - { - switch (get_highest_layer(layer_state)) { - case _MOD: - rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _RAISE: - rgb_matrix_layer_helper(HSV_BLUE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _LOWER: - rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _ADJUST: - rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - default: { - bool mods_enabled = false; - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _WQWERTY: - rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _WWORKMAN: - rgb_matrix_layer_helper(HSV_GREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - } - break; - } - } - } - - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); - break; - case _WORKMAN: - rgb_matrix_set_color(is_ez ? 41 : 42, 0xD9, 0xA5, 0x21); - break; - } - - if ((this_mod | this_osm) & MODS_SHIFT_MASK || this_led & (1 << USB_LED_CAPS_LOCK)) { - rgb_matrix_set_color_row(0, 0x00, 0xFF, 0x00); - } - if ((this_mod | this_osm) & MODS_CTRL_MASK && (this_mod | this_osm) & MODS_GUI_MASK) { - rgb_matrix_set_color_row(1, 0xFF, 0xD9, 0xFF); - } else if ((this_mod | this_osm) & MODS_CTRL_MASK) { - rgb_matrix_set_color_row(1, 0xFF, 0x00, 0x00); - } else if ((this_mod | this_osm) & MODS_GUI_MASK) { - rgb_matrix_set_color_row(1, 0xFF, 0xD9, 0x00); - } - if ((this_mod | this_osm) & MODS_ALT_MASK) { - rgb_matrix_set_color_row(2, 0x00, 0x00, 0xFF); - } -} -#endif // RGB_MATRIX_INIT - -void matrix_init_keymap(void) {} - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - switch (get_highest_layer(layer_state)) { - case _RAISE: - clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU); - break; - case _LOWER: -# ifdef RGB_MATRIX_ENABLE - clockwise ? rgb_matrix_step() : rgb_matrix_step_reverse(); -# else - clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); -# endif - break; - case _ADJUST: -# ifdef AUDIO_CLICKY - clockwise ? clicky_freq_up() : clicky_freq_down(); -# endif - break; - default: - clockwise ? tap_code(KC_DOWN) : tap_code(KC_UP); - } -# ifdef AUDIO_CLICKY - clicky_play(); -# endif - return true; -} -#endif // ENCODER_ENABLE - -#ifdef KEYBOARD_planck_ez -layer_state_t layer_state_set_keymap(layer_state_t state) { - planck_ez_left_led_off(); - planck_ez_right_led_off(); - switch (get_highest_layer(state)) { - case _LOWER: - planck_ez_left_led_on(); - break; - case _RAISE: - planck_ez_right_led_on(); - break; - case _ADJUST: - planck_ez_right_led_on(); - planck_ez_left_led_on(); - break; - default: - break; - } - return state; -} -#endif diff --git a/layouts/community/ortho_4x12/bocaj/readme.md b/layouts/community/ortho_4x12/bocaj/readme.md deleted file mode 100644 index a3716b8dc0..0000000000 --- a/layouts/community/ortho_4x12/bocaj/readme.md +++ /dev/null @@ -1,23 +0,0 @@ -# Overview - -This is my Planck EZ layout, heavily based upon [my ergodox layout](../../ergodox/bocaj/). - -I got this keyboard for two reasons: - -1. QMK spoiled me and the Ergodox isn't incredibly portable (ok 3 reasons) -2. 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. - -## How to Build - -Put simply: -`make planck/ez:bocaj` - -On 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?). - -## Layers - -* WORKMAN/QWERTY: Default is workman, can be switched via the ADJUST layer. Idk why you would though. -* LOWER: Nums across the top, switches enter key to tab and tab key to delete. Symbols in the middle, remenascent of the ergodox -* RAISE: Symbols across the top, F-Keys on the 2nd row. Switches backspace to delete -* ADJUST: Computer Audio controls, RGB controls, Sound controls, macros, etc. -* 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 58ff4d7245..0000000000 --- a/layouts/community/ortho_4x12/bocaj/rules.mk +++ /dev/null @@ -1,43 +0,0 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -TAP_DANCE_ENABLE = no -SPACE_CADET_ENABLE = no -NKRO_ENABLE = yes - -ifneq ($(strip $(KEYBOARD)), planck/rev6) - CONSOLE_ENABLE = no - COMMAND_ENABLE = no - ifeq ($(strip $(LAYOUT_HAS_RGB)), yes) - RGBLIGHT_ENABLE = yes - INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes - endif -else - CONSOLE_ENABLE = yes - COMMAND_ENABLE = yes - RGBLIGHT_ENABLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes - RGB_MATRIX_ENABLE = no - AUDIO_ENABLE = yes - EEPROM_DRIVER = i2c -endif -ifeq ($(strip $(KEYBOARD)), planck/light) - RGB_MATRIX_ENABLE = yes - RGBLIGHT_ENABLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes - AUDIO_ENABLE = yes - # HAPTIC_ENABLE += SOLENOID -endif -ifeq ($(strip $(KEYBOARD)), planck/ez) - RGBLIGHT_ENABLE = no - ENCODER_ENABLE = yes - RGB_MATRIX_ENABLE = IS31FL3737 - INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes - RGBLIGHT_STARTUP_ANIMATION = yes - CONSOLE_ENABLE = yes - COMMAND_ENABLE = yes - AUDIO_ENABLE = yes -endif diff --git a/layouts/community/ortho_4x12/jjerrell/config.h b/layouts/community/ortho_4x12/jjerrell/config.h new file mode 100644 index 0000000000..aee885b8d0 --- /dev/null +++ b/layouts/community/ortho_4x12/jjerrell/config.h @@ -0,0 +1,57 @@ +// Copyright (C) 2021 Jerrell, Jacob <@jjerrell> +// +// This file is part of qmk_firmware. +// +// qmk_firmware is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// qmk_firmware is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with qmk_firmware. If not, see <http://www.gnu.org/licenses/>. + +#pragma once + +// Allows time for repositioning hands due to awkward key placement +#define LEADER_NO_TIMEOUT + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#ifdef KEYBOARD_planck_ez_glow +#undef PRODUCT +#define PRODUCT Planck EZ Glow - Modified by <@jjerrell> +#endif + +/* + * MIDI options + */ + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +// Most tactile encoders have detents every 4 stages +#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 0000000000..d873907e91 --- /dev/null +++ b/layouts/community/ortho_4x12/jjerrell/keymap.c @@ -0,0 +1,227 @@ +/* Copyright 2015-2017 Jack Humbert + * Copyright 2021 Jacob Jerrell <@jjerrell> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "jjerrell.h" + +enum planck_layers { + _GAME_LOWER = LAYER_SAFE_RANGE, + // _GAME_RAISE, +}; + +#define LAYOUT_planck_plain(...) WRAPPER_ortho_4x12(__VA_ARGS__) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_WORKMAN] = LAYOUT_planck_base( + __________________WORKMN_L1__________________, __________________WORKMN_R1__________________, + __________________WORKMN_L2__________________, __________________WORKMN_R2__________________, + __________________WORKMN_L3__________________, __________________WORKMN_R3__________________ + ), + /* Lower - Nav/Select/Nums + * ,-----------------------------------------------------------------------------------. + * | PGUP | BSPC | UP | DEL | PGDN | | | | 7 | 8 | 9 | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | HOME | LEFT | DOWN | RGHT | END | | | | 4 | 5 | 6 | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | TAB | | ENTR | | | | | 1 | 2 | 3 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | held | SPACE | ENTR | 0 | . | , | + | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_planck_mods( + __________________LOWER_L1___________________, XXXXXXX, XXXXXXX, __________________LOWER_R1___________________, + __________________LOWER_L2___________________, XXXXXXX, XXXXXXX, __________________LOWER_R2___________________, + __________________LOWER_L3___________________, XXXXXXX, XXXXXXX, __________________LOWER_R3___________________, + _________________________________________PLANCK_LOWER_BOTTOM_ROW_________________________________________ + ), + /* Raise - Symbols + * ,-----------------------------------------------------------------------------------. + * | % | _ | [ | ] | ^ | | | ! | < | > | = | : | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | \ | / | { | } | * | | | ? | ( | ) | - | ; | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | # | $ | | | ~ | ` | | | @ | " | ' | + | & | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | LEAD | | | BSPC | SPACE | held | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_planck_common( + __________________RAISE_L1___________________, __________________RAISE_R1___________________, + __________________RAISE_L2___________________, __________________RAISE_R2___________________, + __________________RAISE_L3___________________, __________________RAISE_R3___________________ + ), + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | Make | Debug|Reset |TermOn|TrmOff| | |MusMod|Mus On|MusOff|MidiOn|MidOff| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Mute | Vol- | Vol+ | Play | Skip | | |Voice-| HUE+ | HUE- | SAT+ | SAT- | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Vrsn | AudOn|AudOff|CGswap|CGnorm| | |Voice+|RGBTog|RGBMod|BRGHT+|BRGHT-| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | held | | held | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_planck_common( + __________________ADJUST_L1__________________, __________________ADJUST_R1__________________, + __________________ADJUST_L2__________________, __________________ADJUST_R2__________________, + __________________ADJUST_L3__________________, __________________ADJUST_R3__________________ + ), + [_GAME] = LAYOUT_planck_plain( + __________________QWERTY_L1__________________, _______, _______, XXXXXXX, KC_9, KC_0, KC_MINS, KC_EQL, + __________________QWERTY_L2__________________, XXXXXXX, XXXXXXX, XXXXXXX, KC_5, KC_6, KC_7, KC_8, + __________________QWERTY_L3__________________, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_4, + 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 + ), + [_GAME_LOWER] = LAYOUT_planck_plain( + _______, _______, _______, _______, _______, _______, _______, _______, C(_______), C(_______), C(_______), C(_______), + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, C(_______), C(_______), C(_______), C(_______), + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, C(_______), C(_______), C(_______), C(_______), + MACRO_1, MACRO_2, MACRO_3, MACRO_4, _______, _______, XXXXXXX, _______, MACRO_5, MACRO_6, MACRO_7, MACRO_8 + ) + +}; +// clang-format on + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +#ifdef KEYBOARD_planck_ez +void planck_ez_teeth_set(layer_state_t state) { + switch (get_highest_layer(state)) { + case _LOWER: + planck_ez_left_led_level(40); + break; + case _RAISE: + planck_ez_right_led_level(40); + break; + case _ADJUST: + planck_ez_left_led_level(40); + planck_ez_right_led_level(40); + break; + case _GAME_LOWER: + planck_ez_left_led_level(20); + break; +// todo case _GAME_RAISE: + // planck_ez_right_led_level(20); + // break; + case _WORKMAN: + if (IS_LAYER_ON(_GAME)) { + planck_ez_left_led_level(60); + planck_ez_right_led_level(60); + break; + } + default: + planck_ez_left_led_off(); + planck_ez_right_led_off(); + break; + } +} + +layer_state_t layer_state_set_keymap(layer_state_t state) { + planck_ez_left_led_off(); + planck_ez_right_led_off(); + state = update_tri_layer_state(state, _GAME, _LOWER, _GAME_LOWER); + planck_ez_teeth_set(state); + return state; +} +#endif + +bool encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { +# ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); +# else + tap_code(KC_PGDN); +# endif + } else { +# ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); +# else + tap_code(KC_PGUP); +# endif + } + } + return true; +} + +void dip_switch_update_keymap(uint8_t index, bool active) { + switch (index) { + case 0: { + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +#ifdef AUDIO_ENABLE +void matrix_scan_keymap(void) { + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +} +#endif + +bool music_mask_keymap(uint16_t keycode) { + switch (keycode) { + case _RAISE: + case _LOWER: + return false; + default: + return true; + } +} diff --git a/layouts/community/ortho_4x12/jjerrell/readme.md b/layouts/community/ortho_4x12/jjerrell/readme.md new file mode 100644 index 0000000000..ec947ea353 --- /dev/null +++ b/layouts/community/ortho_4x12/jjerrell/readme.md @@ -0,0 +1,7 @@ +# JJerrell's Planck EZ Layout + +As 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. + +The 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. + +My 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 0000000000..39f31a266e --- /dev/null +++ b/layouts/community/ortho_4x12/jjerrell/rules.mk @@ -0,0 +1,8 @@ +SRC += muse.c + +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +TAP_DANCE_ENABLE = no +SPACE_CADET_ENABLE = no +NKRO_ENABLE = no |