From ade989962af613b24687f20f54e2dd0e37240216 Mon Sep 17 00:00:00 2001 From: Joshua T Date: Fri, 13 Aug 2021 20:14:21 -0500 Subject: [Keymap] clean up userspace, add XD75 / Keyboardio Atreus (#13121) Co-authored-by: Ryan Co-authored-by: Drashna Jaelre --- layouts/community/ergodox/replicaJunction/config.h | 60 +- layouts/community/ergodox/replicaJunction/keymap.c | 725 ++++++++++----------- .../community/ergodox/replicaJunction/readme.md | 93 +-- layouts/community/ergodox/replicaJunction/rules.mk | 35 +- 4 files changed, 419 insertions(+), 494 deletions(-) (limited to 'layouts') diff --git a/layouts/community/ergodox/replicaJunction/config.h b/layouts/community/ergodox/replicaJunction/config.h index 9ffd74dccd..a02f9a95db 100644 --- a/layouts/community/ergodox/replicaJunction/config.h +++ b/layouts/community/ergodox/replicaJunction/config.h @@ -1,13 +1,51 @@ +/* Copyright 2021 Joshua T. + * + * 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 . + */ + #pragma once -// Layer definitions - -#define L_COLEMAK 0 -#define L_QWERTY 1 -#define L_NUM 2 -#define L_EXTEND 3 -#define L_FUNC 4 -#define L_GAMING 5 -#define L_LL_R 6 -#define L_LL_E 7 -#define L_LL_I 8 +// Do not allow one macro to contain the other macro +#define DYNAMIC_MACRO_NO_NESTING + +// "THE most important tap hold configuration setting" +// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt +// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt +#define IGNORE_MOD_TAP_INTERRUPT + +// This one is a style choice. Play with it both on and off to see which +// one suits you better. +// https://precondition.github.io/home-row-mods#permissive-hold +// https://docs.qmk.fm/#/tap_hold?id=permissive-hold +#define PERMISSIVE_HOLD + +// If you press a dual-role key for longer than TAPPING_TERM, then +// release it without pressing another key, without this setting nothing +// would happen. With this setting, it sends the key's tap function. +// https://precondition.github.io/home-row-mods#retro-tapping +#define RETRO_TAPPING + +// Disable some unused features to save space +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +///// +// Flags for stuff in my userspace + +#define USER_INCLUDE_GAMING_LAYER +#define USER_INCLUDE_MACRO_LAYER + +// "Super Alt-Tab" +// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab +#define USER_SUPER_ALT_TAB_TIMEOUT 500 diff --git a/layouts/community/ergodox/replicaJunction/keymap.c b/layouts/community/ergodox/replicaJunction/keymap.c index ce0400be5c..0c36abcf74 100644 --- a/layouts/community/ergodox/replicaJunction/keymap.c +++ b/layouts/community/ergodox/replicaJunction/keymap.c @@ -1,427 +1,378 @@ -/* - * Keyboard: Ergodox - * Keymap: replicaJunction - * Version: 2.1 +/* Copyright 2021 Joshua T. + * + * 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 . */ #include QMK_KEYBOARD_H -#include "config.h" #include "replicaJunction.h" -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Most layers are defined in my userspace, but this keyboard has +// an extra one. +enum additional_keyboard_layers { + L_SYSLEDS = _LAYER_SAFE_RANGE +}; -[L_COLEMAK] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_GRV , -//--------|--------|--------|--------|--------|--------|--------| - KX_ECTL ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,KC_LBRC , -//--------|--------|--------|--------|--------|--------|--------| - KC_TAB ,KC_A ,KC_R_LT ,KC_S_LT ,KC_T ,KC_G, -//--------|--------|--------|--------|--------|--------|--------| - KC_LSFT ,KX_Z_MT ,KX_X_MT ,KX_C_MT ,KX_D_MT ,KC_V ,KC_RBRC , -//--------|--------|--------|--------|--------|--------|--------| - TD_LAYR ,KC_LGUI ,KC_HYPR ,KX_CTSF ,KC_LCTL , -//--------|--------|--------|--------|--------|--------|--------| - KC_HOME ,KC_END , -// |--------|--------| - KC_PGUP , -// |--------|--------|--------| - KX_BKNM ,KX_DCTL ,KC_PGDN , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|-------| - TG_GAME ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_EQL , -//--------|--------|--------|--------|--------|--------|-------| - KC_DEL ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_BSLS, -//--------|--------|--------|--------|--------|--------|-------| - KC_M ,KC_N ,KC_E_LT ,KC_I_LT ,KC_O ,KC_QUOT, -//--------|--------|--------|--------|--------|--------|-------| - KC_LOCK ,KC_K ,KX_H_MT ,KX_COMT ,KX_DOMT ,KX_SLMT ,KC_RSFT, -//--------|--------|--------|--------|--------|--------|-------| - KC_LALT ,KC_MINS ,KC_QUOT ,KC_EQL ,TT_NUM , -//--------|--------|--------|--------|--------|--------|-------| - KC_LEFT ,KC_RGHT , -//--------|--------| - KC_UP , -//--------|--------|--------| - KC_DOWN ,KX_NALT ,KX_SPAC -//--------|--------|--------| +#define BSP_SYM LT(L_SYMBOLS, KC_BSPC) +#define SPC_NAV LT(L_NAVIGATION, KC_SPC) -), +#define MO_FN MO(L_FN) +#define MO_MAC MO(L_MACROS) +#define MO_SLED MO(L_SYSLEDS) + +#define TG_GAME TG(L_GAMING) + +#define ESC_SFT LSFT_T(KC_ESC) +#define TAB_SFT RSFT_T(KC_TAB) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + -[L_QWERTY] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -// |--------|--------| - _______ , -// |--------|--------|--------| - _______ ,_______ ,_______ , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,KC_EQL , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT , -//--------|--------|--------|--------|--------|--------|--------| - KC_LOCK ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , -//--------|--------|--------|--------|--------|--------|--------| - KC_RALT ,KC_MINS ,KC_QUOT ,KC_EQL ,TT_NUM , -//--------|--------|--------|--------|--------|--------|--------| - KC_LEFT ,KC_RGHT , -//--------|--------| - KC_UP , -//--------|--------|--------| - KC_DOWN ,KX_NALT ,KX_SPAC -//--------|--------|--------| +[L_BASE] = LAYOUT_ergodox( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, + KC_EQL, KC_Q, KC_W, KC_F, KC_P, KC_B, NUMWORD, + KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_RBRC, + KC_LCTL, KC_LGUI ,KC_LALT, MO_FN, ESC_SFT, + KC_HOME, KC_END, + KC_PGUP, + BSP_SYM, CTL_DEL, KC_PGDN, + + TG_GAME, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + CAPWORD, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LOCK, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + TAB_SFT, MO_FN, KC_RALT, KC_RGUI, MO_SLED, + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, ALT_ENT, SPC_NAV ), +[L_GAMING] = LAYOUT_ergodox( + KC_GRV, _______,_______,_______,_______,_______,_______, + KC_TAB, _______,_______,_______,_______,_______,_______, + KC_ESC, KC_A, KC_R, KC_S, KC_T, _______, + KC_LSFT,_______,_______,KC_C, KC_D, _______,_______, + _______,_______,KC_TAB, KC_LALT,KC_LCTL, + KC_LOCK,_______, + _______, + KC_SPC, KC_LSFT,_______, + + ooooooo,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______, + _______,KC_N, KC_E, KC_I, KC_O, _______, + _______,_______,_______,_______,_______,_______,_______, + MO_FN, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, + KC_BTN3,_______, + KC_BTN2, + KC_BTN1,KC_ENT, KC_BSPC +), + -[L_NUM] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_SLSH ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_PIPE, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_BSLS ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,KC_AMPR ,KC_LABK ,KC_RABK, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -// |--------|--------| - _______ , -// |--------|--------|--------| - _______ ,_______ ,_______ , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_COLN ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PSLS ,KC_F12 , -//--------|--------|--------|--------|--------|--------|--------| - KC_HASH ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PAST ,KC_BSPC , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_BSPC ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PMNS ,KC_TAB , -//--------|--------|--------|--------|--------|--------|--------| - KC_P0 ,KC_PDOT ,KC_PEQL ,KC_PPLS ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -//--------|--------| - _______ , -//--------|--------|--------| - _______ ,KC_PENT ,MO_FUNC -//--------|--------|--------| +[L_NUMBERS] = LAYOUT_ergodox( + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______, + _______,KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______, + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,_______, + + _______,KC_NLCK,_______,_______,_______,_______,_______, + KC_NLCK,KC_HASH,KC_P7, KC_P8, KC_P9, KC_PSLS,SFT_TAB, + KC_PPLS,KC_P4, KC_P5, KC_P6, KC_PAST,KC_TAB, + _______,KC_PMNS,KC_P1, KC_P2, KC_P3, KC_BSLS,KC_EQL, + KC_P0, KC_P0, KC_PDOT,KC_PENT,_______, + _______,_______, + _______, + _______,_______,_______ ), +[L_SYMBOLS] = LAYOUT_ergodox( + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______,KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX,_______, + _______,KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH, + _______,KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX,_______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + ooooooo,_______,_______, + + _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______,XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,KC_F12, + KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,_______, + _______,XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV, _______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,ooooooo +), + -[L_EXTEND] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,KC_APP ,KX_CGR, KC_VOLU, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,KX_SRCH, KX_PAST, KC_VOLD, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -// |--------|--------|--------| - _______ , -// |--------|--------|--------| - MO_FUNC, _______ ,_______ , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|--------| - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______ , -//--------|--------|--------|--------|--------|--------|--------| - KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_MENU, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,KX_STAB, KC_TAB, _______ ,KC_INS, KC_PSCR, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,KC_PSCR, _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ -//--------|--------|--------|--------|--------|--------|--------| +[L_NAVIGATION] = LAYOUT_ergodox( + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______,OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL,_______, + _______,KC_LGUI,KC_LSFT,KC_LALT,KC_LCTL,_______, + _______,WIN_V, _______,_______,OS_FIND,SEARCH, _______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,_______, + + _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______,KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL, KC_F12, + KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,_______, + _______,_______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,_______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,ooooooo ), +[L_FN] = LAYOUT_ergodox( + _______,_______,_______,_______,_______,_______,_______, + _______,QK_VERS,_______,DM_REC2,DM_REC1,DM_RSTP,_______, + _______,QK_MAKE,_______,DM_PLY2,DM_PLY1,_______, + _______,QK_FLSH,K_SECR1,K_SECR2,K_SECR3,K_SECR4,_______, + _______,_______,_______,ooooooo,_______, + _______,_______, + _______, + KC_LCTL,_______,_______, + + _______,_______,_______,_______,_______,_______,_______, + _______,KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12, _______, + KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8, _______, + _______,KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4, _______, + _______,ooooooo,_______,_______,_______, + _______,RESET, + _______, + _______,_______,KC_LALT +), -[L_FUNC] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,M_LCLIK, M_RCLIK, M_MCLIK, _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, M_WHLUP, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,M_LEFT, M_DOWN, M_UP ,M_RIGHT, M_WHLDN, _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -// |--------|--------|--------| - _______ , -// |--------|--------|--------| - _______ ,_______ ,_______ , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_F16 ,KC_F17 ,KC_F18 ,KC_F19 ,KC_F20 ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_VOLU, KC_F9, KC_F10, KC_F11, KC_F12, _______ , -//--------|--------|--------|--------|--------|--------|--------| - KC_MUTE, KC_F5, KC_F6, KC_F7, KC_F8, _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ -//--------|--------|--------|--------|--------|--------|--------| + +[L_MACROS] = LAYOUT_ergodox( + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,DM_REC2,DM_REC1,_______,_______, + _______,_______,_______,DM_PLY2,DM_PLY1,DM_RSTP, + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + ooooooo,_______,_______, + + _______,_______,_______,_______,_______,_______,_______, + _______,_______,SHEBANG,_______,_______,_______,_______, + PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,_______, + _______,_______,PS_ITEM,FS_PIPE,_______,FS_ARR, _______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,ooooooo ), -[L_GAMING] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - KC_ESC ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,KC_R ,KC_S ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - KC_LSFT, _______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,KC_LALT ,KC_LCTL , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -// |--------|--------| - _______ , -// |--------|--------|--------| - KC_SPC, KC_LSFT, _______ , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,KC_E ,KC_I ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,KC_UP, KC_SLSH, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,KC_LEFT, KC_DOWN, KC_RGHT, -//--------|--------|--------|--------|--------|--------|--------| - M_MCLIK ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - M_RCLIK , -//--------|--------|--------|--------|--------|--------|--------| - M_LCLIK ,KC_ENT ,KC_BSPC -//--------|--------|--------|--------|--------|--------|--------| -) -, - -// "Letter Layers" - -[L_LL_R] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,ooooooo ,KC_AMPR ,KC_PIPE ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -// |--------|--------| - _______ , -// |--------|--------|--------| - _______ ,_______ ,_______ , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_COLN ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PSLS ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - KC_HASH ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PAST ,KC_TAB , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_BSPC ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PMNS ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - KC_P0 ,KC_PDOT ,KC_PEQL ,KC_PPLS ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -//--------|--------| - _______ , -//--------|--------|--------| - _______ ,KC_PENT ,MO_FUNC -//--------|--------|--------| -) -, - -[L_LL_E] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - RJ_QMKV ,RJ_MAKE ,RJ_EQ ,RJ_LEQ ,RJ_GEQ ,RJ_GEQR ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,RJ_SELS ,RJ_DUND ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -// |--------|--------| - _______ , -// |--------|--------|--------| - _______ ,_______ ,_______ , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,ooooooo ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -//--------|--------| - _______ , -//--------|--------|--------| - _______ ,_______ ,_______ -//--------|--------|--------| -) -, - -[L_LL_I] = LAYOUT_ergodox( -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_SLSH ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_PIPE, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_BSLS ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,KC_AMPR ,KC_LABK ,KC_RABK, -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -// |--------|--------| - _______ , -// |--------|--------|--------| - _______ ,_______ ,_______ , -// |--------|--------|--------| - -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,KC_UNDS, KC_GRV ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,KC_MINS ,KC_QUOT ,ooooooo ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,KC_TILD, KC_DQT ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ ,_______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ , -//--------|--------|--------|--------|--------|--------|--------| - _______ ,_______ ,_______ -//--------|--------|--------|--------|--------|--------|--------| +[L_SYSLEDS] = LAYOUT_ergodox( + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,_______, + + KC_NLCK,_______,_______,_______,_______,_______,_______, + KC_CAPS,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + KC_SLCK,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,ooooooo, + _______,_______, + _______, + _______,_______,_______ ) +// Template +// [_NUMBERS] = LAYOUT_ergodox( +// _______,_______,_______,_______,_______,_______,_______, +// _______,_______,_______,_______,_______,_______,_______, +// _______,_______,_______,_______,_______,_______, +// _______,_______,_______,_______,_______,_______,_______, +// _______,_______,_______,_______,_______, +// _______,_______, +// _______, +// _______,_______,_______, + +// _______,_______,_______,_______,_______,_______,_______, +// _______,_______,_______,_______,_______,_______,_______, +// _______,_______,_______,_______,_______,_______, +// _______,_______,_______,_______,_______,_______,_______, +// _______,_______,_______,_______,_______, +// _______,_______, +// _______, +// _______,_______,_______ +// ), }; -// The normal QMK functions ending in _user are overridden in the -// replicaJunction userspace. Those functions handle my global -// settings, and redirect to these _keymap functions if something -// is unhandled. This allows me to keep most of my global preferences -// in one place while still allowing keyboard-specific code. +void keyboard_post_init_user_kb(void) { + ergodox_right_led_1_on(); +} + + +//////////////////////////////////////////////////////////// +// System LED code +//////////////////////////////////////////////////////////// + +// We need to track both the layer state and the system LED state in +// order to update the LEDs appropriately when either one changes. +// These are both represented as a bitmask. +// +// There is a global 'layer_state' variable but it is set after the call +// to layer_state_set_user(), so it doesn't work properly for our +// purposes. +static uint32_t current_layer_state = 0; +static uint8_t sys_led_state = 0; + +// Whether the given layer (one of the constant defined at the top) is active. +#define LAYER_ON(state, layer) (state & (1<