diff options
| author | Jacob Jerrell <86279411+jjerrell@users.noreply.github.com> | 2021-08-12 09:44:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-12 07:44:15 -0700 |
| commit | 30843f8329315426ff433a40095f1de2b2669e57 (patch) | |
| tree | 0fc462c1b4b4ecaabb8858b6f91da8b36e29b20b /layouts/community/ergodox | |
| parent | 1e9d91d4ef5db1a4497767b165303e39069459cb (diff) | |
| download | qmk_firmware-30843f8329315426ff433a40095f1de2b2669e57.tar.gz qmk_firmware-30843f8329315426ff433a40095f1de2b2669e57.zip | |
[Keymap] JJerrell - Add Userspace and ZSA Keyboard Keymaps (#13548)
Diffstat (limited to 'layouts/community/ergodox')
| -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 |
8 files changed, 169 insertions, 221 deletions
diff --git a/layouts/community/ergodox/bocaj/config.h b/layouts/community/ergodox/bocaj/config.h deleted file mode 100644 index 621ae784c..000000000 --- a/layouts/community/ergodox/bocaj/config.h +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #define LEADER_TIMEOUT 250 | ||
| 4 | #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 ba105a8f1..000000000 --- a/layouts/community/ergodox/bocaj/keymap.c +++ /dev/null | |||
| @@ -1,175 +0,0 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell | ||
| 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 "bocaj.h" | ||
| 19 | |||
| 20 | /* | ||
| 21 | * The `LAYOUT_ergodox_pretty_base` macro is a template to allow the use of | ||
| 22 | * identical modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, | ||
| 23 | * etc), so that there is no need to set them up for each layout, and modify | ||
| 24 | * all of them if I want to change them. This helps to keep consistency and | ||
| 25 | * ease of use. K## is a placeholder to pass through the individual keycodes | ||
| 26 | */ | ||
| 27 | #define LAYOUT_ergodox_bocaj(...) WRAPPER_ergodox_bocaj(__VA_ARGS__) | ||
| 28 | #define LAYOUT_ergodox_bocaj_WIN(...) WRAPPER_ergodox_bocaj_WIN(__VA_ARGS__) | ||
| 29 | |||
| 30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 31 | |||
| 32 | [_WORKMAN] = LAYOUT_ergodox_bocaj( | ||
| 33 | KC_ESC, ________________NUMBER_LEFT________________, KC_ARRW, KC_MINS, ________________NUMBER_RIGHT_______________, KC_EQUAL, | ||
| 34 | KC_DEL, _________________WORKMAN_L1________________, KC_LPRN, KC_RPRN, _________________WORKMAN_R1________________, KC_BSLS, | ||
| 35 | _______, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, | ||
| 36 | KC_LSFT, _________________WORKMAN_L3________________, KC_LBRC, KC_RBRC, _________________WORKMAN_R3________________, _______, | ||
| 37 | MO_MOD, KC_PGUP, KC_HOME, KC_UP, KC_LEFT, KC_RIGHT, KC_DOWN, KC_END, KC_PGDN, WORKMAN, | ||
| 38 | KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, | ||
| 39 | KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, | ||
| 40 | KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER | ||
| 41 | ), | ||
| 42 | |||
| 43 | [_WWORKMAN] = LAYOUT_ergodox_bocaj_WIN( | ||
| 44 | KC_ESC, ________________NUMBER_LEFT________________, KC_ARRW, KC_MINS, ________________NUMBER_RIGHT_______________, KC_EQUAL, | ||
| 45 | KC_DEL, _________________WORKMAN_L1________________, KC_LPRN, KC_RPRN, _________________WORKMAN_R1________________, KC_BSLS, | ||
| 46 | _______, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, | ||
| 47 | KC_LSFT, _________________WORKMAN_L3________________, KC_LBRC, KC_RBRC, _________________WORKMAN_R3________________, _______, | ||
| 48 | MO_MOD, KC_PGUP, KC_HOME, KC_UP, KC_LEFT, KC_RIGHT, KC_DOWN, KC_END, KC_PGDN, WORKMAN, | ||
| 49 | KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, | ||
| 50 | KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, | ||
| 51 | KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER | ||
| 52 | ), | ||
| 53 | |||
| 54 | [_LOWER] = LAYOUT_ergodox_bocaj( | ||
| 55 | KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 56 | _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_BSLS, _______, | ||
| 57 | _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, KC_ASTR, _______, | ||
| 58 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_PLUS, _______, | ||
| 59 | _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_COMM, KC_MINS, _______, | ||
| 60 | KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, | ||
| 61 | KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, | ||
| 62 | KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER | ||
| 63 | ), | ||
| 64 | |||
| 65 | [_RAISE] = LAYOUT_ergodox_bocaj( | ||
| 66 | KC_TILD, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, _______, | ||
| 67 | KC_F11, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_F12, | ||
| 68 | _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, | ||
| 69 | _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, _______, _______, _______, ___________________BLANK___________________, _______, | ||
| 70 | ___________________BLANK___________________, ___________________BLANK___________________, | ||
| 71 | KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, | ||
| 72 | KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, | ||
| 73 | KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER | ||
| 74 | ), | ||
| 75 | |||
| 76 | [_ADJUST] = LAYOUT_ergodox_pretty( | ||
| 77 | KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, | ||
| 78 | VRSN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, | ||
| 79 | _______, KC__MUTE, KC__VOLDOWN, KC__VOLUP, _______, KC_MNXT, _______, _______, _______, _______, _______, _______, | ||
| 80 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 81 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 82 | KC_APP,KC_HOME, /* <- LHS/RHS -> */ KC_END,KC_ESC, | ||
| 83 | KC_PGUP, /* <- LHS/RHS -> */ KC_PGDN, | ||
| 84 | KC_SPACE,KC_BSPACE,KC_LEAD, /* <- LHS/RHS -> */ KC_LOCK,KC_TAB,KC_ENTER | ||
| 85 | ), | ||
| 86 | |||
| 87 | // Wrapping Mouse-Wheel Keys with `X_T()` style functions seems | ||
| 88 | // to break the mouse button. So we can't use the wrapper here. | ||
| 89 | [_MOD] = LAYOUT_ergodox_pretty( | ||
| 90 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 91 | _______, _______, _______, KC_WH_D, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, | ||
| 92 | _______, _______, KC_WH_L, KC_WH_U, KC_WH_R, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, | ||
| 93 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 94 | _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, | ||
| 95 | _______,_______, /* <- LHS/RHS -> */ _______,_______, | ||
| 96 | _______, /* <- LHS/RHS -> */ _______, | ||
| 97 | KC_BTN1,KC_BTN2,_______, /* <- LHS/RHS -> */ _______,KC_BTN3,KC_BTN4 | ||
| 98 | ) | ||
| 99 | |||
| 100 | }; | ||
| 101 | // clang-format on | ||
| 102 | |||
| 103 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 104 | return true; | ||
| 105 | } | ||
| 106 | |||
| 107 | void matrix_init_keymap(void) {}; | ||
| 108 | |||
| 109 | // Runs whenever there is a layer state change. | ||
| 110 | layer_state_t layer_state_set_keymap(layer_state_t state) { | ||
| 111 | ergodox_board_led_off(); | ||
| 112 | ergodox_right_led_1_off(); | ||
| 113 | ergodox_right_led_2_off(); | ||
| 114 | ergodox_right_led_3_off(); | ||
| 115 | |||
| 116 | uint8_t layer = get_highest_layer(state); | ||
| 117 | switch (layer) { | ||
| 118 | case _LOWER: | ||
| 119 | ergodox_right_led_3_on(); | ||
| 120 | break; | ||
| 121 | case _MOD: | ||
| 122 | ergodox_right_led_2_on(); | ||
| 123 | break; | ||
| 124 | case _RAISE: | ||
| 125 | ergodox_right_led_1_on(); | ||
| 126 | break; | ||
| 127 | case _ADJUST: | ||
| 128 | ergodox_right_led_1_on(); | ||
| 129 | ergodox_right_led_2_on(); | ||
| 130 | break; | ||
| 131 | default: | ||
| 132 | break; | ||
| 133 | } | ||
| 134 | |||
| 135 | ergodox_right_led_1_set(25); | ||
| 136 | ergodox_right_led_2_set(25); | ||
| 137 | ergodox_right_led_3_set(25); | ||
| 138 | |||
| 139 | return state; | ||
| 140 | }; | ||
| 141 | |||
| 142 | void matrix_scan_keymap(void) { | ||
| 143 | uint8_t modifiers = get_mods(); | ||
| 144 | uint8_t led_usb_state = host_keyboard_leds(); | ||
| 145 | uint8_t one_shot = get_oneshot_mods(); | ||
| 146 | uint8_t layer_is_workman = layer_state_is(_WORKMAN); | ||
| 147 | |||
| 148 | if ((modifiers) && (layer_is_workman)) { | ||
| 149 | if (modifiers & MODS_SHIFT_MASK || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MODS_SHIFT_MASK) { | ||
| 150 | ergodox_right_led_1_on(); | ||
| 151 | ergodox_right_led_1_set( 25 ); | ||
| 152 | } else { | ||
| 153 | ergodox_right_led_1_off(); | ||
| 154 | } | ||
| 155 | if ((modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) && (modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK)) { | ||
| 156 | ergodox_right_led_2_on(); | ||
| 157 | ergodox_right_led_2_set( 50 ); | ||
| 158 | } else if ((modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) || (modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK)) { | ||
| 159 | ergodox_right_led_2_on(); | ||
| 160 | ergodox_right_led_2_set( 10 ); | ||
| 161 | } else { | ||
| 162 | ergodox_right_led_2_off(); | ||
| 163 | } | ||
| 164 | if (modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) { | ||
| 165 | ergodox_right_led_3_on(); | ||
| 166 | ergodox_right_led_3_set( 10 ); | ||
| 167 | } else { | ||
| 168 | ergodox_right_led_3_off(); | ||
| 169 | } | ||
| 170 | } else if (!(modifiers) && (layer_is_workman)) { | ||
| 171 | ergodox_right_led_1_off(); | ||
| 172 | ergodox_right_led_2_off(); | ||
| 173 | ergodox_right_led_3_off(); | ||
| 174 | } | ||
| 175 | }; | ||
diff --git a/layouts/community/ergodox/bocaj/readme.md b/layouts/community/ergodox/bocaj/readme.md deleted file mode 100644 index f8bce4e57..000000000 --- a/layouts/community/ergodox/bocaj/readme.md +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | # Overview | ||
| 2 | |||
| 3 | This is my personal Ergodox EZ configuration, and my daily driver. | ||
| 4 | |||
| 5 | 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. | ||
| 6 | |||
| 7 | ## How to build | ||
| 8 | |||
| 9 | Put simply: | ||
| 10 | `make ergodox_ez:bocaj` | ||
| 11 | |||
| 12 | 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) | ||
| 13 | |||
| 14 | ## Layers | ||
| 15 | |||
| 16 | * WORKMAN: No one uses this board but me and I've never had a reason to switch to QWERTY | ||
| 17 | * LOWER: | ||
| 18 | * Left: Grave and navigation arrows | ||
| 19 | * Right: Numpad | ||
| 20 | * RAISE: | ||
| 21 | * Symbols across the top, F-Keys on the second row | ||
| 22 | * ADJUST | ||
| 23 | * Audio control, make/reset/version macros | ||
| 24 | * MOD: mouse navigation | ||
| 25 | |||
| 26 | ## Ergodox Specifics | ||
| 27 | |||
| 28 | 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 c6a306fda..000000000 --- a/layouts/community/ergodox/bocaj/rules.mk +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | BOOTMAGIC_ENABLE = full | ||
| 2 | TAP_DANCE_ENABLE = no | ||
| 3 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 4 | CONSOLE_ENABLE = yes | ||
| 5 | SPACE_CADET_ENABLE = no | ||
| 6 | KEY_LOCK_ENABLE = yes | ||
| 7 | MOUSEKEY_ENABLE = yes | ||
| 8 | EXTRAKEY_ENABLE = yes | ||
| 9 | LEADER_ENABLE = yes | ||
| 10 | |||
| 11 | UNICODE_ENABLE = no | ||
| 12 | UNICODEMAP_ENABLE = no | ||
| 13 | RGB_MATRIX_ENABLE = no | ||
| 14 | RGBLIGHT_ENABLE = no | ||
diff --git a/layouts/community/ergodox/jjerrell/config.h b/layouts/community/ergodox/jjerrell/config.h new file mode 100644 index 000000000..8223108d1 --- /dev/null +++ b/layouts/community/ergodox/jjerrell/config.h | |||
| @@ -0,0 +1,21 @@ | |||
| 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 | #ifdef KEYBOARD_ergodox_ez | ||
| 19 | #undef PRODUCT | ||
| 20 | #define PRODUCT ErgoDox EZ - Modified by <@jjerrell> | ||
| 21 | #endif | ||
diff --git a/layouts/community/ergodox/jjerrell/keymap.c b/layouts/community/ergodox/jjerrell/keymap.c new file mode 100644 index 000000000..110a8aba6 --- /dev/null +++ b/layouts/community/ergodox/jjerrell/keymap.c | |||
| @@ -0,0 +1,129 @@ | |||
| 1 | /** | ||
| 2 | * Copyright (C) 2021 Jerrell, Jacob <@jjerrell> | ||
| 3 | * | ||
| 4 | * This file is part of qmk_firmware. | ||
| 5 | * | ||
| 6 | * qmk_firmware is free software: you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation, either version 3 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * qmk_firmware is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with qmk_firmware. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include "jjerrell.h" | ||
| 21 | |||
| 22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 23 | // clang-format off | ||
| 24 | [_WORKMAN] = LAYOUT_ergodox_mods( | ||
| 25 | __________________WORKMN_L1__________________, __________________WORKMN_R1__________________, | ||
| 26 | __________________WORKMN_L2__________________, __________________WORKMN_R2__________________, | ||
| 27 | __________________WORKMN_L3__________________, __________________WORKMN_R3__________________, | ||
| 28 | XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 29 | ), | ||
| 30 | /* Lower - Nav/Select/Nums */ | ||
| 31 | [_LOWER] = LAYOUT_ergodox_mods( | ||
| 32 | __________________LOWER_L1___________________, __________________LOWER_R1___________________, | ||
| 33 | __________________LOWER_L2___________________, __________________LOWER_R2___________________, | ||
| 34 | __________________LOWER_L3___________________, __________________LOWER_R3___________________, | ||
| 35 | XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_0, KC_DOT, KC_COMM, KC_PLUS | ||
| 36 | ), | ||
| 37 | /* Raise - Symbols */ | ||
| 38 | [_RAISE] = LAYOUT_ergodox_common( | ||
| 39 | __________________RAISE_L1___________________, __________________RAISE_R1___________________, | ||
| 40 | __________________RAISE_L2___________________, __________________RAISE_R2___________________, | ||
| 41 | __________________RAISE_L3___________________, __________________RAISE_R3___________________, | ||
| 42 | XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 43 | ), | ||
| 44 | /* Adjust (Lower + Raise) */ | ||
| 45 | [_ADJUST] = LAYOUT_ergodox_common( | ||
| 46 | __________________ADJUST_L1__________________, __________________ADJUST_R1__________________, | ||
| 47 | __________________ADJUST_L2__________________, __________________ADJUST_R2__________________, | ||
| 48 | __________________ADJUST_L3__________________, __________________ADJUST_R3__________________, | ||
| 49 | XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 50 | ), | ||
| 51 | [_SPECIAL] = LAYOUT_ergodox_common( | ||
| 52 | XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 53 | XXXXXXX, KC_WH_L, KC_WH_U, KC_WH_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 54 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 55 | XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 56 | ) | ||
| 57 | // clang-format on | ||
| 58 | }; | ||
| 59 | |||
| 60 | #ifdef KEYBOARD_ergodox_ez | ||
| 61 | // Runs whenever there is a layer state change. | ||
| 62 | layer_state_t layer_state_set_keymap(layer_state_t state) { | ||
| 63 | ergodox_board_led_off(); | ||
| 64 | ergodox_right_led_1_off(); | ||
| 65 | ergodox_right_led_2_off(); | ||
| 66 | ergodox_right_led_3_off(); | ||
| 67 | |||
| 68 | uint8_t layer = get_highest_layer(state); | ||
| 69 | switch (layer) { | ||
| 70 | case _LOWER: | ||
| 71 | ergodox_right_led_3_on(); | ||
| 72 | break; | ||
| 73 | case _RAISE: | ||
| 74 | ergodox_right_led_1_on(); | ||
| 75 | break; | ||
| 76 | case _ADJUST: | ||
| 77 | ergodox_right_led_1_on(); | ||
| 78 | ergodox_right_led_2_on(); | ||
| 79 | ergodox_right_led_3_on(); | ||
| 80 | break; | ||
| 81 | case _SPECIAL: | ||
| 82 | ergodox_right_led_2_on(); | ||
| 83 | break; | ||
| 84 | default: | ||
| 85 | break; | ||
| 86 | } | ||
| 87 | |||
| 88 | ergodox_right_led_1_set(25); | ||
| 89 | ergodox_right_led_2_set(25); | ||
| 90 | ergodox_right_led_3_set(25); | ||
| 91 | |||
| 92 | return state; | ||
| 93 | }; | ||
| 94 | |||
| 95 | void matrix_scan_keymap(void) { | ||
| 96 | uint8_t modifiers = get_mods(); | ||
| 97 | uint8_t led_usb_state = host_keyboard_leds(); | ||
| 98 | uint8_t one_shot = get_oneshot_mods(); | ||
| 99 | uint8_t layer_is_workman = layer_state_is(_WORKMAN); | ||
| 100 | |||
| 101 | if ((modifiers) && (layer_is_workman)) { | ||
| 102 | if (modifiers & MOD_MASK_SHIFT || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MOD_MASK_SHIFT) { | ||
| 103 | ergodox_right_led_1_on(); | ||
| 104 | ergodox_right_led_1_set( 25 ); | ||
| 105 | } else { | ||
| 106 | ergodox_right_led_1_off(); | ||
| 107 | } | ||
| 108 | if ((modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) && (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI)) { | ||
| 109 | ergodox_right_led_2_on(); | ||
| 110 | ergodox_right_led_2_set( 50 ); | ||
| 111 | } else if ((modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) || (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI)) { | ||
| 112 | ergodox_right_led_2_on(); | ||
| 113 | ergodox_right_led_2_set( 10 ); | ||
| 114 | } else { | ||
| 115 | ergodox_right_led_2_off(); | ||
| 116 | } | ||
| 117 | if (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT) { | ||
| 118 | ergodox_right_led_3_on(); | ||
| 119 | ergodox_right_led_3_set( 10 ); | ||
| 120 | } else { | ||
| 121 | ergodox_right_led_3_off(); | ||
| 122 | } | ||
| 123 | } else if (layer_is_workman) { | ||
| 124 | ergodox_right_led_1_off(); | ||
| 125 | ergodox_right_led_2_off(); | ||
| 126 | ergodox_right_led_3_off(); | ||
| 127 | } | ||
| 128 | }; | ||
| 129 | #endif | ||
diff --git a/layouts/community/ergodox/jjerrell/readme.md b/layouts/community/ergodox/jjerrell/readme.md new file mode 100644 index 000000000..6b89134c2 --- /dev/null +++ b/layouts/community/ergodox/jjerrell/readme.md | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # Jacob Jerrell's Ergodox Layout | ||
| 2 | |||
| 3 | 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. | ||
| 4 | |||
| 5 | 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 000000000..4288a264c --- /dev/null +++ b/layouts/community/ergodox/jjerrell/rules.mk | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | BOOTMAGIC_ENABLE = lite | ||
| 2 | TAP_DANCE_ENABLE = no | ||
| 3 | COMMAND_ENABLE = no | ||
| 4 | CONSOLE_ENABLE = yes | ||
| 5 | SPACE_CADET_ENABLE = no | ||
| 6 | KEY_LOCK_ENABLE = no | ||
| 7 | MOUSEKEY_ENABLE = yes | ||
| 8 | EXTRAKEY_ENABLE = yes | ||
| 9 | LEADER_ENABLE = yes | ||
| 10 | |||
| 11 | UNICODE_ENABLE = no | ||
| 12 | UNICODEMAP_ENABLE = no | ||
| 13 | RGB_MATRIX_ENABLE = no | ||
| 14 | RGBLIGHT_ENABLE = no | ||
