summaryrefslogtreecommitdiff
path: root/layouts/community/ergodox
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2021-08-12 09:18:18 -0700
committerDrashna Jael're <drashna@live.com>2021-08-12 09:18:18 -0700
commit8e8ec6338cf98426680317f796831a19c9a54496 (patch)
treeca082bdae438fb06e91efbe52af6b8d80b5bf10c /layouts/community/ergodox
parent176bce50e9865c4ad9c483de8e578d413e4af8c7 (diff)
parent80015f7fb023f27ad5307815fd5433694a3bcb4a (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'layouts/community/ergodox')
-rw-r--r--layouts/community/ergodox/bocaj/config.h4
-rw-r--r--layouts/community/ergodox/bocaj/keymap.c175
-rw-r--r--layouts/community/ergodox/bocaj/readme.md28
-rw-r--r--layouts/community/ergodox/bocaj/rules.mk14
-rw-r--r--layouts/community/ergodox/jjerrell/config.h21
-rw-r--r--layouts/community/ergodox/jjerrell/keymap.c129
-rw-r--r--layouts/community/ergodox/jjerrell/readme.md5
-rw-r--r--layouts/community/ergodox/jjerrell/rules.mk14
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 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