aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/config.h56
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/keymap.c135
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/kle/base-layer.txt34
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/kle/e-layer.txt34
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/kle/fn-layer.txt35
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/kle/i-layer.txt34
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/kle/r-layer.txt34
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/kle/space-layer.txt34
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/readme.md102
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/rules.mk34
-rw-r--r--keyboards/keyboardio/atreus/keymaps/replicaJunction/config.h51
-rw-r--r--keyboards/keyboardio/atreus/keymaps/replicaJunction/keymap.c94
-rw-r--r--keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md6
-rw-r--r--keyboards/keyboardio/atreus/keymaps/replicaJunction/rules.mk29
-rw-r--r--keyboards/xd75/keymaps/replicaJunction/config.h51
-rw-r--r--keyboards/xd75/keymaps/replicaJunction/keymap.c138
-rw-r--r--keyboards/xd75/keymaps/replicaJunction/readme.md5
-rw-r--r--keyboards/xd75/keymaps/replicaJunction/rules.mk29
-rw-r--r--layouts/community/ergodox/replicaJunction/config.h60
-rw-r--r--layouts/community/ergodox/replicaJunction/keymap.c725
-rw-r--r--layouts/community/ergodox/replicaJunction/readme.md93
-rw-r--r--layouts/community/ergodox/replicaJunction/rules.mk35
-rw-r--r--users/replicaJunction/config.h66
-rw-r--r--users/replicaJunction/features/.gitignore2
-rw-r--r--users/replicaJunction/features/caps_word.c105
-rw-r--r--users/replicaJunction/features/caps_word.h26
-rw-r--r--users/replicaJunction/features/mouse_jiggle.c46
-rw-r--r--users/replicaJunction/features/mouse_jiggle.h23
-rw-r--r--users/replicaJunction/features/num_word.c129
-rw-r--r--users/replicaJunction/features/num_word.h27
-rw-r--r--users/replicaJunction/features/secrets.c51
-rw-r--r--users/replicaJunction/features/secrets.h30
-rw-r--r--users/replicaJunction/features/super_alt_tab.c52
-rw-r--r--users/replicaJunction/features/super_alt_tab.h27
-rw-r--r--users/replicaJunction/keycode_aliases.h85
-rw-r--r--users/replicaJunction/matrix_scan.c35
-rw-r--r--users/replicaJunction/process_records.c149
-rw-r--r--users/replicaJunction/process_records.h21
-rw-r--r--users/replicaJunction/readme.md101
-rw-r--r--users/replicaJunction/replicaJunction.c164
-rw-r--r--users/replicaJunction/replicaJunction.h138
-rw-r--r--users/replicaJunction/rj_keycodes.h63
-rw-r--r--users/replicaJunction/rj_layers.h40
-rw-r--r--users/replicaJunction/rules.mk32
44 files changed, 2060 insertions, 1200 deletions
diff --git a/keyboards/atreus/keymaps/replicaJunction/config.h b/keyboards/atreus/keymaps/replicaJunction/config.h
index 8e786aa0d..a02f9a95d 100644
--- a/keyboards/atreus/keymaps/replicaJunction/config.h
+++ b/keyboards/atreus/keymaps/replicaJunction/config.h
@@ -1,11 +1,51 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2 18
3// Layer definitions 19// Do not allow one macro to contain the other macro
20#define DYNAMIC_MACRO_NO_NESTING
21
22// "THE most important tap hold configuration setting"
23// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
24// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
25#define IGNORE_MOD_TAP_INTERRUPT
26
27// This one is a style choice. Play with it both on and off to see which
28// one suits you better.
29// https://precondition.github.io/home-row-mods#permissive-hold
30// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
31#define PERMISSIVE_HOLD
32
33// If you press a dual-role key for longer than TAPPING_TERM, then
34// release it without pressing another key, without this setting nothing
35// would happen. With this setting, it sends the key's tap function.
36// https://precondition.github.io/home-row-mods#retro-tapping
37#define RETRO_TAPPING
38
39// Disable some unused features to save space
40#undef LOCKING_SUPPORT_ENABLE
41#undef LOCKING_RESYNC_ENABLE
42
43/////
44// Flags for stuff in my userspace
45
46#define USER_INCLUDE_GAMING_LAYER
47#define USER_INCLUDE_MACRO_LAYER
4 48
5#define L_COLEMAK 0 49// "Super Alt-Tab"
6#define L_NUM 1 50// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
7#define L_EXTEND 2 51#define USER_SUPER_ALT_TAB_TIMEOUT 500
8#define L_FUNC 3
9#define L_LL_R 4
10#define L_LL_E 5
11#define L_LL_I 6
diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c
index c3cc37115..32cc95d2f 100644
--- a/keyboards/atreus/keymaps/replicaJunction/keymap.c
+++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c
@@ -1,78 +1,95 @@
1/* 1/* Copyright 2021 Joshua T.
2 * Keyboard: Atreus 2 *
3 * Keymap: replicaJunction 3 * This program is free software: you can redistribute it and/or modify
4 * Version: 2.1 4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
5 */ 15 */
6 16
7#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
8#include "replicaJunction.h" 18#include "replicaJunction.h"
9 19
20#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
21#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
22#define EQL_FUN LT(L_FN, KC_EQL)
23
24#define ESC_SFT LSFT_T(KC_ESC)
25#define TAB_SFT RSFT_T(KC_TAB)
26
27#define DF_TYPE DF(L_BASE)
28#define DF_GAME DF(L_GAMING)
29
10const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
11 31
12[L_COLEMAK] = LAYOUT( 32[L_BASE] = LAYOUT(
13 KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, 33 KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
14 KC_A, KC_R_LT, KC_S_LT, KC_T, KC_G, KC_M, KC_N, KC_E_LT, KC_I_LT, KC_O, 34 KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O,
15 KX_Z_MT, KX_X_MT, KX_C_MT, KX_D_MT, KC_V, KC_K, KX_H_MT, KX_COMT, KX_DOMT, KX_SLMT, 35 KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,
16 TD_LAYR, KC_LGUI, KC_TAB, KC_LSFT, KX_BKNM, KX_DCTL, KX_NALT, KX_SPAC, KC_RSFT, KC_MINS, KC_QUOT, KC_EQL 36 KC_ESC, KC_LGUI,KC_TAB, ESC_SFT,BSP_SYM,CTL_DEL,ALT_ENT,SPC_NAV,TAB_SFT,KC_MINS,KC_QUOT,EQL_FUN
17) 37),
18,
19 38
20[L_NUM] = LAYOUT( 39[L_GAMING] = LAYOUT(
21 KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_SLSH, KC_COLN, KC_7, KC_8, KC_9, KC_SLSH, 40 _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
22 KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_PIPE, KC_HASH, KC_4, KC_5, KC_6, KC_ASTR, 41 _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
23 KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BSLS, KC_BSPC, KC_1, KC_2, KC_3, KC_MINS, 42 _______,_______,KC_C, KC_D, _______, _______,_______,_______,_______,_______,
24 _______, KC_AMPR, KC_TILD, KC_GRV, ooooooo, _______, KC_ENT, MO_FUNC, KC_0, KC_DOT, KC_EQL, KC_PLUS 43 _______,KC_TAB, KC_LALT,KC_LSFT,KC_SPC, KC_LCTL,KC_LALT,KC_BSPC,KC_BTN1,KC_BTN2,KC_BTN3,_______
25) 44),
26,
27 45
28[L_EXTEND] = LAYOUT( 46[L_NUMBERS] = LAYOUT(
29 _______, _______, _______, KC_APP, KX_CGR, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, 47 _______,_______,_______,_______,_______, KC_HASH,KC_7, KC_8, KC_9, KC_SLSH,
30 KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, 48 _______,_______,_______,_______,_______, KC_PLUS,KC_4, KC_5, KC_6, KC_ASTR,
31 _______, _______, _______, KX_SRCH, KX_PAST, _______, KX_STAB, KC_TAB, _______, KC_INS, 49 _______,_______,_______,_______,_______, KC_MINS,KC_1, KC_2, KC_3, KC_BSLS,
32 _______, _______, _______, _______, MO_FUNC, KC_DEL, KC_ENT, _______, _______, _______, _______, KC_PSCR 50 _______,_______,_______,_______,_______,_______,_______,_______,KC_0, KC_0, KC_DOT, KC_ENT
33) 51),
34,
35 52
36[L_FUNC] = LAYOUT( 53[L_SYMBOLS] = LAYOUT(
37 _______, _______, M_LCLIK, M_RCLIK, M_MCLIK, KC_VOLU, KC_F9, KC_F10, KC_F11, KC_F12, 54 KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,
38 KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, M_WHLUP, KC_MUTE, KC_F5, KC_F6, KC_F7, KC_F8, 55 KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH, KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,
39 M_LEFT, M_DOWN, M_UP, M_RIGHT, M_WHLDN, KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, 56 KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX, XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV,
40 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 57 _______,_______,_______,_______,ooooooo,_______,_______,ooooooo,CAPWORD,_______,_______,_______
41) 58),
42,
43 59
44[L_LL_R] = LAYOUT( 60[L_NAVIGATION] = LAYOUT(
45 _______, _______, _______, _______, _______, KC_COLN, KC_P7, KC_P8, KC_P9, KC_PSLS, 61 OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL, KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL,
46 _______, ooooooo, KC_AMPR, KC_PIPE, _______, KC_HASH, KC_P4, KC_P5, KC_P6, KC_PAST, 62 KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______, KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,
47 _______, _______, _______, _______, _______, KC_BSPC, KC_P1, KC_P2, KC_P3, KC_PMNS, 63 WIN_V, _______,_______,OS_FIND,SEARCH, _______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,
48 _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_PLUS 64 _______,_______,_______,NUMWORD,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
49) 65),
50,
51 66
52[L_LL_E] = LAYOUT( 67[L_FN] = LAYOUT(
53 RJ_MAKE, RJ_EQ, RJ_LEQ, RJ_GEQ, RJ_GEQR, _______, _______, _______, _______, _______, 68 RESET, _______,_______,_______,_______, KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12,
54 _______, _______, RJ_SELS, RJ_DUND, _______, _______, _______, ooooooo, _______, _______, 69 MS_JIGL,_______,_______,_______,_______, KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8,
55 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 70 _______,K_SECR1,K_SECR2,K_SECR3,K_SECR4, KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4,
56 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 71 DF_TYPE,DF_GAME,_______,_______,_______,KC_LCTL,KC_LALT,_______,_______,_______,_______,ooooooo
57) 72),
58,
59 73
60[L_LL_I] = LAYOUT( 74[L_MACROS] = LAYOUT(
61 KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_SLSH, _______, KC_UNDS, KC_GRV, _______, _______, 75 QK_MAKE,_______,DM_REC2,DM_REC1,DM_RSTP, _______,SHEBANG,_______,_______,_______,
62 KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_MINS, KC_QUOT, ooooooo, _______, 76 QK_FLSH,_______,DM_PLY2,DM_PLY1,_______, PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,
63 KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_TILD, KC_DQT, _______, _______, 77 QK_VERS,_______,_______,_______,_______, _______,PS_ITEM,FS_PIPE,_______,FS_ARR,
64 _______, KC_AMPR, KC_LABK, KC_RABK, _______, _______, _______, _______, _______, _______, _______, _______ 78 _______,_______,_______,_______,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
65) 79)
66 80
67};
68 81
69// Uncomment any of these to add keyboard-specific code. Otherwise, they 82// Template
70// will use user defaults defined in the replicaJunction.h header file. 83// [L_FUNC] = LAYOUT(
84// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
85// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
86// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
87// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
88// ),
71 89
72// bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { 90};
73// return true;
74// }
75 91
76// void matrix_init_keymap(void) {}; 92layer_state_t layer_state_set_user(layer_state_t state) {
93 return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
94}
77 95
78// void matrix_scan_keymap(void) {};
diff --git a/keyboards/atreus/keymaps/replicaJunction/kle/base-layer.txt b/keyboards/atreus/keymaps/replicaJunction/kle/base-layer.txt
deleted file mode 100644
index aec41316f..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/kle/base-layer.txt
+++ /dev/null
@@ -1,34 +0,0 @@
1[{r:10,rx:1,y:-0.1,x:2},"F"],
2[{y:-0.65,x:1},"W",{x:1},"P"],
3[{y:-0.75},"Q"],
4[{y:-0.9,x:4},"B"],
5[{y:-0.7,x:2},"S"],
6[{y:-0.65,x:1,c:"#45b866"},"R",{x:1,c:"#cccccc"},"T"],
7[{y:-0.75},"A"],
8[{y:-0.9,x:4},"G"],
9[{y:-0.7,x:2},"C\n\n\n<i class='fa fa-windows'></i>"],
10[{y:-0.65,x:1},"X\n\n\nCtrl",{x:1},"D\n\n\nCtrlAlt"],
11[{y:-0.75},"Z"],
12[{y:-0.9,x:4},"V\n\n\nAlt"],
13[{y:-0.75,x:5,h:1.5},"Del\nCtrl"],
14[{y:-0.95,x:2},"Tab"],
15[{y:-0.65,x:1,a:7,fa:[7]},"<i class='fa fa-windows'></i>",{x:1,a:4,f:3},"Shift"],
16[{y:-0.75,f:3},"Layer tap"],
17[{y:-0.9,x:4,f:3},"<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>"],
18[{r:-10,rx:7,ry:0.965,y:-0.2,x:2,f:3},"U"],
19[{y:-0.65,x:1,f:3},"L",{x:1,f:3},"Y"],
20[{y:-0.75,x:4,f:3},":\n;"],
21[{y:-0.9,f:3},"J"],
22[{y:-0.7,x:2,c:"#ffb07b",f:3},"E"],
23[{y:-0.65,x:1,c:"#cccccc",f:3},"N",{x:1,c:"#5dcde3",f:3},"I"],
24[{y:-0.75,x:4,c:"#cccccc",f:3},"O"],
25[{y:-0.9,f:3},"M"],
26[{y:-0.7,x:2,f:3},"<\n,\n\nCtrlAlt"],
27[{y:-0.65,x:1,f:3},"H\n\n\nAlt",{x:1,f:3},">\n.\n\n<i class='fa fa-windows'></i>"],
28[{y:-0.75,x:4,f:3},"?\n/\n\nCtrl"],
29[{y:-0.9,f:3},"K"],
30[{y:-0.75,x:-1,f:3,h:1.5},"Enter\nAlt"],
31[{y:-0.95,x:2,f:3},"_\n-"],
32[{y:-0.65,x:1,f:3},"Shift",{x:1,f:3},"\"\n'"],
33[{y:-0.75,x:4,f:3},"+\n="],
34[{y:-0.9,c:"#ffe08d",f:3},"Space"]
diff --git a/keyboards/atreus/keymaps/replicaJunction/kle/e-layer.txt b/keyboards/atreus/keymaps/replicaJunction/kle/e-layer.txt
deleted file mode 100644
index 2b4105b2b..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/kle/e-layer.txt
+++ /dev/null
@@ -1,34 +0,0 @@
1[{r:10,rx:1,y:-0.1,x:2},"<="],
2[{y:-0.65,x:1},"==",{x:1},">="],
3[{y:-0.75},"make"],
4[{y:-0.9,x:4},"=>"],
5[{y:-0.7,x:2},"select *"],
6[{y:-0.65,x:1,a:7},"",{x:1,a:4},"$_"],
7[{y:-0.75,a:7},""],
8[{y:-0.9,x:4},""],
9[{y:-0.7,x:2},""],
10[{y:-0.65,x:1},"",{x:1},""],
11[{y:-0.75},""],
12[{y:-0.9,x:4},""],
13[{y:-0.75,x:5,h:1.5},""],
14[{y:-0.95,x:2},""],
15[{y:-0.65,x:1},"",{x:1},""],
16[{y:-0.75},""],
17[{y:-0.9,x:4},""],
18[{r:-10,rx:7,ry:0.965,y:-0.2,x:2},""],
19[{y:-0.65,x:1},"",{x:1},""],
20[{y:-0.75,x:4},""],
21[{y:-0.9},""],
22[{y:-0.7,x:2,c:"#ffb07b"},""],
23[{y:-0.65,x:1,c:"#cccccc"},"",{x:1},""],
24[{y:-0.75,x:4},""],
25[{y:-0.9},""],
26[{y:-0.7,x:2},""],
27[{y:-0.65,x:1},"",{x:1},""],
28[{y:-0.75,x:4},""],
29[{y:-0.9},""],
30[{y:-0.75,x:-1,h:1.5},""],
31[{y:-0.95,x:2},""],
32[{y:-0.65,x:1},"",{x:1},""],
33[{y:-0.75,x:4},""],
34[{y:-0.9},""]
diff --git a/keyboards/atreus/keymaps/replicaJunction/kle/fn-layer.txt b/keyboards/atreus/keymaps/replicaJunction/kle/fn-layer.txt
deleted file mode 100644
index d45fb7e97..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/kle/fn-layer.txt
+++ /dev/null
@@ -1,35 +0,0 @@
1[{r:10,rx:1,y:-0.1,x:2},"RClick"],
2[{y:-0.65,x:1,a:7},"",{x:1,a:4},"LClick"],
3[{y:-0.75,a:7},""],
4[{y:-0.9,x:4,a:4},"MClick"],
5[{y:-0.7,x:2},"Alt"],
6[{y:-0.65,x:1},"Shift",{x:1},"Ctrl"],
7[{y:-0.75,a:7,fa:[7]},"<i class='fa fa-windows'></i>"],
8[{y:-0.9,x:4,a:4,fa:[5,0,0,0,0,0,0,0,0,0,7]},"<i class='kb kb-Unicode-Scroll-1'></i>\n\n\n\n\n\n\n\n\n\n<i class='kb kb-Arrows-Top-4'></i>"],
9[{y:-0.7,x:2,fa:[0,0,0,0,0,0,0,0,0,0,7]},"<i class='fa fa-mouse-pointer'></i>\n\n\n\n\n\n\n\n\n\n<i class='kb kb-Arrows-Up'></i>"],
10[{y:-0.65,x:1},"<i class='fa fa-mouse-pointer'></i>\n\n\n\n\n\n\n\n\n\n<i class='kb kb-Arrows-Down'></i>",{x:1},"<i class='fa fa-mouse-pointer'></i>\n\n\n\n\n\n\n\n\n\n<i class='kb kb-Arrows-Right'></i>"],
11[{y:-0.75},"<i class='fa fa-mouse-pointer'></i>\n\n\n\n\n\n\n\n\n\n<i class='kb kb-Arrows-Left'></i>"],
12[{y:-0.9,x:4,fa:[5,0,0,0,0,0,0,0,0,0,7]},"<i class='kb kb-Unicode-Scroll-1'></i>\n\n\n\n\n\n\n\n\n\n<i class='kb kb-Arrows-Bottom-4'></i>"],
13[{y:-0.75,x:5,a:7,h:1.5},""],
14[{y:-0.95,x:2},""],
15[{y:-0.65,x:1},"",{x:1},""],
16[{y:-0.75},""],
17[{y:-0.9,x:4,c:"#ffe08d"},""],
18[{r:-10,rx:7,ry:0.965,y:-0.2,x:2,c:"#cccccc",a:4,f:3},"F10"],
19[{y:-0.65,x:1,f:3},"F9",{x:1,f:3},"F11"],
20[{y:-0.75,x:4,f:3},"F12"],
21[{y:-0.9,a:7},""],
22[{y:-0.7,x:2,a:4,f:3},"F6"],
23[{y:-0.65,x:1,f:3},"F5",{x:1,f:3},"F7"],
24[{y:-0.75,x:4,f:3},"F8"],
25[{y:-0.9,a:7},""],
26[{y:-0.7,x:2,a:4,f:3},"F2"],
27[{y:-0.65,x:1,f:3},"F1",{x:1,f:3},"F3"],
28[{y:-0.75,x:4,f:3},"F4"],
29[{y:-0.9,a:7},""],
30[{y:-0.75,x:-1,h:1.5},""],
31[{y:-0.95,x:2},""],
32[{y:-0.65,x:1},"",{x:1},""],
33[{y:-0.75,x:4},""],
34[{y:-0.9,c:"#ffe08d"},""]
35
diff --git a/keyboards/atreus/keymaps/replicaJunction/kle/i-layer.txt b/keyboards/atreus/keymaps/replicaJunction/kle/i-layer.txt
deleted file mode 100644
index 45bef783a..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/kle/i-layer.txt
+++ /dev/null
@@ -1,34 +0,0 @@
1[{r:10,rx:1,y:-0.1,x:2},"{"],
2[{y:-0.65,x:1},"@",{x:1},"}"],
3[{y:-0.75},"!"],
4[{y:-0.9,x:4},"/"],
5[{y:-0.7,x:2},"("],
6[{y:-0.65,x:1},"$",{x:1},")"],
7[{y:-0.75},"#"],
8[{y:-0.9,x:4},"|"],
9[{y:-0.7,x:2},"["],
10[{y:-0.65,x:1},"^",{x:1},"]"],
11[{y:-0.75},"%"],
12[{y:-0.9,x:4},"\\"],
13[{y:-0.75,x:5,a:7,h:1.5},""],
14[{y:-0.95,x:2,a:4},"<"],
15[{y:-0.65,x:1},"&",{x:1},">"],
16[{y:-0.75,a:7},""],
17[{y:-0.9,x:4},""],
18[{r:-10,rx:7,ry:0.965,y:-0.2,x:2,a:4},"`"],
19[{y:-0.65,x:1},"_",{x:1,a:7},""],
20[{y:-0.75,x:4},""],
21[{y:-0.9},""],
22[{y:-0.7,x:2,a:4},"'"],
23[{y:-0.65,x:1},"-",{x:1,c:"#5dcde3",a:7},""],
24[{y:-0.75,x:4,c:"#cccccc"},""],
25[{y:-0.9},""],
26[{y:-0.7,x:2,a:4},"\""],
27[{y:-0.65,x:1},"~",{x:1,a:7},""],
28[{y:-0.75,x:4},""],
29[{y:-0.9},""],
30[{y:-0.75,x:-1,h:1.5},""],
31[{y:-0.95,x:2},""],
32[{y:-0.65,x:1},"",{x:1},""],
33[{y:-0.75,x:4},""],
34[{y:-0.9},""]
diff --git a/keyboards/atreus/keymaps/replicaJunction/kle/r-layer.txt b/keyboards/atreus/keymaps/replicaJunction/kle/r-layer.txt
deleted file mode 100644
index 3d4438386..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/kle/r-layer.txt
+++ /dev/null
@@ -1,34 +0,0 @@
1[{r:10,rx:1,y:-0.1,x:2,a:7},""],
2[{y:-0.65,x:1},"",{x:1},""],
3[{y:-0.75},""],
4[{y:-0.9,x:4},""],
5[{y:-0.7,x:2,a:4},"&"],
6[{y:-0.65,x:1,c:"#45b866",a:7},"",{x:1,c:"#cccccc",a:4},"|"],
7[{y:-0.75,a:7},""],
8[{y:-0.9,x:4},""],
9[{y:-0.7,x:2},""],
10[{y:-0.65,x:1},"",{x:1},""],
11[{y:-0.75},""],
12[{y:-0.9,x:4},""],
13[{y:-0.75,x:5,h:1.5},""],
14[{y:-0.95,x:2},""],
15[{y:-0.65,x:1},"",{x:1},""],
16[{y:-0.75},""],
17[{y:-0.9,x:4},""],
18[{r:-10,rx:7,ry:0.965,y:-0.2,x:2,a:4},"8"],
19[{y:-0.65,x:1},"7",{x:1},"9"],
20[{y:-0.75,x:4},"/"],
21[{y:-0.9},":"],
22[{y:-0.7,x:2},"5"],
23[{y:-0.65,x:1},"4",{x:1},"6"],
24[{y:-0.75,x:4},"*"],
25[{y:-0.9},"#"],
26[{y:-0.7,x:2},"2"],
27[{y:-0.65,x:1},"1",{x:1},"3"],
28[{y:-0.75,x:4},"-"],
29[{y:-0.9},"<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>"],
30[{y:-0.75,x:-1,a:7,h:1.5},""],
31[{y:-0.95,x:2,a:4},"."],
32[{y:-0.65,x:1},"0",{x:1},"="],
33[{y:-0.75,x:4},"+"],
34[{y:-0.9},"Space"]
diff --git a/keyboards/atreus/keymaps/replicaJunction/kle/space-layer.txt b/keyboards/atreus/keymaps/replicaJunction/kle/space-layer.txt
deleted file mode 100644
index d1ffa35f8..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/kle/space-layer.txt
+++ /dev/null
@@ -1,34 +0,0 @@
1[{r:10,rx:1,y:-0.1,x:2,a:7},""],
2[{y:-0.65,x:1},"",{x:1,fa:[7]},"<i class='kb kb-Hamburger-Menu'></i>"],
3[{y:-0.75},""],
4[{y:-0.9,x:4},"<i class='fa fa-terminal'></i>"],
5[{y:-0.7,x:2,a:4,f:3},"Alt"],
6[{y:-0.65,x:1,f:3},"Shift",{x:1,f:3},"Ctrl"],
7[{y:-0.75,a:7},"<i class='fa fa-windows'></i>"],
8[{y:-0.9,x:4},""],
9[{y:-0.7,x:2},""],
10[{y:-0.65,x:1},"",{x:1},"<i class='fa fa-search'></i>"],
11[{y:-0.75},""],
12[{y:-0.9,x:4},"<i class='fa fa-clipboard'></i>"],
13[{y:-0.75,x:5,h:1.5},""],
14[{y:-0.95,x:2},""],
15[{y:-0.65,x:1},"",{x:1},""],
16[{y:-0.75},""],
17[{y:-0.9,x:4},""],
18[{r:-10,rx:7,ry:0.965,y:-0.2,x:2},"<i class='kb kb-Arrows-Up'></i>"],
19[{y:-0.65,x:1,a:4,f:3},"Home",{x:1,f:3},"End"],
20[{y:-0.75,x:4,f:3},"Delete"],
21[{y:-0.9,f:3},"PgUp"],
22[{y:-0.7,x:2,a:7},"<i class='kb kb-Arrows-Down'></i>"],
23[{y:-0.65,x:1},"<i class='kb kb-Arrows-Left'></i>",{x:1},"<i class='kb kb-Arrows-Right'></i>"],
24[{y:-0.75,x:4,a:4,f:3},"Bksp"],
25[{y:-0.9,f:3},"PgDn"],
26[{y:-0.7,x:2,f:3},"Tab"],
27[{y:-0.65,x:1,f:3},"Shift+\n\n\n\n\n\nTab",{x:1,a:7},""],
28[{y:-0.75,x:4,a:4,f:3},"Insert"],
29[{y:-0.9,a:7},""],
30[{y:-0.75,x:-1,h:1.5},""],
31[{y:-0.95,x:2},""],
32[{y:-0.65,x:1},"",{x:1},""],
33[{y:-0.75,x:4,a:4,f:3},"Prnt Scrn"],
34[{y:-0.9,c:"#ffe08d",a:7},""]
diff --git a/keyboards/atreus/keymaps/replicaJunction/readme.md b/keyboards/atreus/keymaps/replicaJunction/readme.md
index f1d6c47b1..6aa356f4f 100644
--- a/keyboards/atreus/keymaps/replicaJunction/readme.md
+++ b/keyboards/atreus/keymaps/replicaJunction/readme.md
@@ -1,103 +1,7 @@
1# replicaJunction - Atreus Layout 1# replicaJunction - Atreus Layout
2 2
3This layout is designed to make the absolute most out of the Atreus 40% keyboard. 3I no longer actively use this keyboard. I've replaced it with the [Keyboardio Atreus](../../../keyboardio/atreus/keymaps/replicaJunction/readme.md).
4 4
5This layout is probably not perfect for you. That's okay! Use it for ideas as you design your own perfect layout. 5I still try to make sure the layout compiles, but I'm no longer tweaking it or adding new features.
6 6
7Most of the custom logic in this keyboard is actually not in these files. Instead, it's in the directory `/users/replicaJunction` (from the root of the QMK repo). This allows me to share macros and custom logic between multiple keyboards. A `process_record_keyboard()` function defined weakly in `replicaJunction.h` allows keyboards to process records individually as well without overriding the `process_record_user()` function. (My Ergodox uses this to handle its LEDs, for example.) 7Most of the interesting features in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Refer to the documentation and code there for more details.
8
9The default letter layout in this keymap is [Colemak-ModDH](https://colemakmods.github.io/mod-dh/). I use the "matrix version" of that layout, which retains the M key on the home row as in normal Colemak.
10
11## Design Goals
12
13I designed this layout with the following goals in mind:
14
15* Nothing may interfere with ordinary typing.
16* Symbols need to be accessible quickly and organized in a manner I can remember.
17* Limit more difficult finger movements (and pinky usage in general).
18
19### Nothing may interfere with ordinary typing
20
21For a long time, this meant that I couldn't use letters or home row keys as dual-role keys. I'm a fast typer, and I'm sometimes already typing the next letter before I've fully released the previous one. Normal keyboards don't care about this, but if I started adding dual-role functionality to letters, I found that I would sometimes type the next letter before releasing the layer toggle, and the letter I tried to send would still be sent under the layer I thought I'd left off.
22
23Fortunately, though, QMK has addressed this with the `PERMISSIVE_HOLD` flag. [Details are on the QMK docs page.](https://docs.qmk.fm/#/feature_advanced_keycodes?id=permissive-hold)
24
25Using that flag, I'm comfortable having layer shift keys on the home row, and this goes a long way to eliminate finger stress.
26
27### Sympols need to be accessible quickly
28
29Symbols are available under my left hand by holding the I key (on my right hand). I've grouped parenthesis, slashes, and braces together; the remaining symbols are ordered in the same way as they appear on USA keycap legends (for example, 1 is !, so that symbol is first in my lineup). Practically, I just had to get used to these other "misc" symbols.
30
31This also means that some symbols are accessible in more than one way. For example, the carats (greater than and less than) are available both in the "normal" location (Shift+Comma / Shift+Period) and on the symbol layer. I make regular changes to some of the symbols I don't use as commonly as I think of them.
32
33### Limit more difficult finger movements
34
35This is why I kept trying to put layer toggles on the home row keys instead of just placing them on random thumb keys. I suffer from RSI, and it's important for me to watch out for more "stressful" finger movements.
36
37The home row is the easiest row for your fingers to hit, followed by the upper row, and the lower row is noticeably more difficult to press. Because of this, I favored the upper row over the lower one any time I had the option to do so.
38
39## Features
40
41### ZXC Mods
42
43Keys on the bottom row of each half of this keyboard can be held to send modifier keys. I've tried to map this in a relatively logical manner:
44
45* Z / Slash: Ctrl
46* X / Period: GUI
47* C / Comma: Ctrl+Alt
48* D / H: Alt
49
50Combined with Shift keys on the thumbs, this makes all modifiers quick to access on either hand.
51
52### Layer tap dance
53
54The lower-left key on the left hand can be used to apply or remove layers based on a number of taps:
55
56* 1 tap sends Escape, and also disables any persistent layers.
57* 2 taps enables the Number pad layer.
58* 5 or more taps resets the keyboard.
59
60## Extend Layer
61
62[Originally found on the Colemak forums](https://forum.colemak.com/topic/2014-extend-extra-extreme/), having a QMK-powered keyboard allows a super easy implementation of this concept. The idea is to place commonly-used keys under easy reach of your hands. Since I work with text often, my most common needs are things like Ctrl+Shift+arrow keys, and they're easy to access using this layer. (While technically it's four keypresses instead of just three, since it takes one key to enter the layer, that one key is a thumb button and the other three are all on the home row, so I find it much more comfortable than modifiers on a traditional keyboard.)
63
64Also featured in this layer is easy access to Tab, plus a Shift+Tab key. Alt-Tabbing back and forth, along with Ctrl-Tab, are super easy and friendly. When I need Ctrl+Alt+Delete, I typically use the ones found on this layer.
65
66## Layout Images
67
68Colored keys indicate keys that swap to another layer when held.
69
70These images are located in the `kle` folder of this directory. Also included is the "raw data" from Keyboard-Layout-Editor in a corresponding text file.
71
72### Base layer
73
74![Base layer](kle/base-layer.png)
75
76### R layer
77
78![R layer](kle/r-layer.png)
79
80### E layer
81
82![E layer](kle/i-layer.png)
83
84### I layer
85
86![I layer](kle/i-layer.png)
87
88### Space layer
89
90![Space layer](kle/space-layer.png)
91
92### Function layer
93
94![Function layer](kle/fn-layer.png)
95
96## Credits
97
98* [Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme.md)
99 * User / keymap function ideas
100* [Jeremy](https://github.com/qmk/qmk_firmware/blob/master/keyboards/atreus/keymaps/jeremy/readme.md)
101 * Sanity check on the Function keys (_of course they should be in rows of 4, not rows of 3 like a number pad. Why did I ever use anything else?_)
102* [DreymaR of the Colemak forums](https://forum.colemak.com/topic/2014-extend-extra-extreme/)
103 * Original idea of the Extend layer
diff --git a/keyboards/atreus/keymaps/replicaJunction/rules.mk b/keyboards/atreus/keymaps/replicaJunction/rules.mk
index 9ff9c3fbb..13730aec6 100644
--- a/keyboards/atreus/keymaps/replicaJunction/rules.mk
+++ b/keyboards/atreus/keymaps/replicaJunction/rules.mk
@@ -1,12 +1,28 @@
1# https://docs.qmk.fm/getting_started_make_guide.html 1# Userspace options
2USER_CAPS_WORD_ENABLE = yes
3USER_MOUSE_JIGGLE_ENABLE = yes
4USER_NUM_WORD_ENABLE = yes
5USER_SECRETS_ENABLE = yes
2 6
3MOUSEKEY_ENABLE = yes 7DYNAMIC_MACRO_ENABLE = yes
4TAP_DANCE_ENABLE = yes
5# KEY_LOCK_ENABLE = yes
6# CONSOLE_ENABLE = no
7# COMMAND_ENABLE = no
8 8
9# Use the "Unicode map" method 9# Extra features that are nice but takes space. Enable only if they're
10# UNICODE_ENABLE = no 10# used in the layout.
11# UNICODEMAP_ENABLE = yes 11WPM_ENABLE = no
12# EXTRAKEY_ENABLE = no # For volume keys and similar
13# MOUSEKEY_ENABLE = no # Them mouse keys yo
14KEY_OVERRIDE_ENABLE = no
15LEADER_ENABLE = no
16TAP_DANCE_ENABLE = no
17# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
18RGB_MATRIX_ENABLE = no
12 19
20# Features I definitely don't care aboud
21LTO_ENABLE = yes
22CONSOLE_ENABLE = no
23VERBOSE = no
24DEBUG_MATRIX_SCAN_RATE = no
25DEBUG_MATRIX = no
26MAGIC_ENABLE = no
27SPACE_CADET_ENABLE = no
28GRAVE_ESC_ENABLE = no
diff --git a/keyboards/keyboardio/atreus/keymaps/replicaJunction/config.h b/keyboards/keyboardio/atreus/keymaps/replicaJunction/config.h
new file mode 100644
index 000000000..a02f9a95d
--- /dev/null
+++ b/keyboards/keyboardio/atreus/keymaps/replicaJunction/config.h
@@ -0,0 +1,51 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// Do not allow one macro to contain the other macro
20#define DYNAMIC_MACRO_NO_NESTING
21
22// "THE most important tap hold configuration setting"
23// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
24// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
25#define IGNORE_MOD_TAP_INTERRUPT
26
27// This one is a style choice. Play with it both on and off to see which
28// one suits you better.
29// https://precondition.github.io/home-row-mods#permissive-hold
30// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
31#define PERMISSIVE_HOLD
32
33// If you press a dual-role key for longer than TAPPING_TERM, then
34// release it without pressing another key, without this setting nothing
35// would happen. With this setting, it sends the key's tap function.
36// https://precondition.github.io/home-row-mods#retro-tapping
37#define RETRO_TAPPING
38
39// Disable some unused features to save space
40#undef LOCKING_SUPPORT_ENABLE
41#undef LOCKING_RESYNC_ENABLE
42
43/////
44// Flags for stuff in my userspace
45
46#define USER_INCLUDE_GAMING_LAYER
47#define USER_INCLUDE_MACRO_LAYER
48
49// "Super Alt-Tab"
50// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
51#define USER_SUPER_ALT_TAB_TIMEOUT 500
diff --git a/keyboards/keyboardio/atreus/keymaps/replicaJunction/keymap.c b/keyboards/keyboardio/atreus/keymaps/replicaJunction/keymap.c
new file mode 100644
index 000000000..9e47155f4
--- /dev/null
+++ b/keyboards/keyboardio/atreus/keymaps/replicaJunction/keymap.c
@@ -0,0 +1,94 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18#include "replicaJunction.h"
19
20#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
21#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
22#define EQL_FUN LT(L_FN, KC_EQL)
23
24#define ESC_SFT LSFT_T(KC_ESC)
25#define TAB_SFT RSFT_T(KC_TAB)
26
27#define DF_TYPE DF(L_BASE)
28#define DF_GAME DF(L_GAMING)
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31
32[L_BASE] = LAYOUT(
33 KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
34 KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O,
35 KC_Z, KC_X, KC_C, KC_D, KC_V, SALTTAB,KC_BSLS,KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,
36 KC_ESC, KC_LGUI,KC_TAB, ESC_SFT,BSP_SYM,CTL_DEL,ALT_ENT,SPC_NAV,TAB_SFT,KC_MINS,KC_QUOT,EQL_FUN
37),
38
39[L_GAMING] = LAYOUT(
40 _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
41 _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
42 _______,_______,KC_C, KC_D, _______,_______,KC_LOCK,_______,_______,_______,_______,_______,
43 _______,KC_TAB, KC_LALT,KC_LSFT,KC_SPC, KC_LCTL,KC_LALT,KC_BSPC,KC_BTN1,KC_BTN2,KC_BTN3,_______
44),
45
46[L_NUMBERS] = LAYOUT(
47 _______,_______,_______,_______,_______, KC_HASH,KC_7, KC_8, KC_9, KC_SLSH,
48 _______,_______,_______,_______,_______, KC_PLUS,KC_4, KC_5, KC_6, KC_ASTR,
49 _______,_______,_______,_______,_______,_______,_______,KC_MINS,KC_1, KC_2, KC_3, KC_BSLS,
50 _______,_______,_______,_______,_______,_______,_______,_______,KC_0, KC_0, KC_DOT, KC_ENT
51),
52
53[L_SYMBOLS] = LAYOUT(
54 KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,
55 KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH, KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,
56 KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX,_______,_______,XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV,
57 _______,_______,_______,_______,ooooooo,_______,_______,ooooooo,CAPWORD,_______,_______,_______
58),
59
60[L_NAVIGATION] = LAYOUT(
61 OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL, KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL,
62 KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______, KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,
63 WIN_V, _______,_______,OS_FIND,SEARCH, _______,_______,_______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,
64 _______,_______,_______,NUMWORD,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
65),
66
67[L_FN] = LAYOUT(
68 _______,_______,_______,_______,_______, KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12,
69 _______,_______,_______,_______,_______, KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8,
70 _______,K_SECR1,K_SECR2,K_SECR3,K_SECR4,MS_JIGL,RESET, KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4,
71 DF_TYPE,DF_GAME,_______,_______,_______,KC_LCTL,KC_LALT,_______,_______,_______,_______,ooooooo
72),
73
74[L_MACROS] = LAYOUT(
75 QK_MAKE,_______,DM_REC2,DM_REC1,DM_RSTP, _______,SHEBANG,_______,_______,_______,
76 QK_FLSH,_______,DM_PLY2,DM_PLY1,_______, PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,
77 QK_VERS,_______,_______,_______,_______,_______,_______,_______,PS_ITEM,FS_PIPE,_______,FS_ARR,
78 _______,_______,_______,_______,ooooooo,_______,_______,ooooooo,_______,_______,_______,_______
79)
80
81
82// Template
83// [L_FUNC] = LAYOUT(
84// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
85// _______,_______,_______,_______,_______, _______,_______,_______,_______,_______,
86// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
87// _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
88// ),
89
90};
91
92layer_state_t layer_state_set_user(layer_state_t state) {
93 return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
94}
diff --git a/keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md b/keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md
new file mode 100644
index 000000000..88f948a94
--- /dev/null
+++ b/keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md
@@ -0,0 +1,6 @@
1replicaJunction - Keyboardio Atreus
2===================================
3
4A 44-key layout designed for daily programming usage and occasional, light gaming.
5
6Most of the interesting logic in this is defined and described in [my userspace](../../../../../users/replicaJunction/readme.md), so check that out if you're interested in how things work. The CAPSWORD and NUMWORD features are especially important for a keyboard this size.
diff --git a/keyboards/keyboardio/atreus/keymaps/replicaJunction/rules.mk b/keyboards/keyboardio/atreus/keymaps/replicaJunction/rules.mk
new file mode 100644
index 000000000..7e0b3c9ca
--- /dev/null
+++ b/keyboards/keyboardio/atreus/keymaps/replicaJunction/rules.mk
@@ -0,0 +1,29 @@
1# Userspace options
2USER_CAPS_WORD_ENABLE = yes
3USER_MOUSE_JIGGLE_ENABLE = yes
4USER_NUM_WORD_ENABLE = yes
5USER_SECRETS_ENABLE = yes
6USER_SUPER_ALT_TAB_ENABLE = yes
7
8DYNAMIC_MACRO_ENABLE = yes
9
10# Extra features that are nice but takes space. Enable only if they're
11# used in the layout.
12WPM_ENABLE = no
13# EXTRAKEY_ENABLE = no # For volume keys and similar
14# MOUSEKEY_ENABLE = no # Them mouse keys yo
15KEY_OVERRIDE_ENABLE = no
16LEADER_ENABLE = no
17TAP_DANCE_ENABLE = no
18# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
19RGB_MATRIX_ENABLE = no
20
21# Features I definitely don't care aboud
22LTO_ENABLE = yes
23CONSOLE_ENABLE = no
24VERBOSE = no
25DEBUG_MATRIX_SCAN_RATE = no
26DEBUG_MATRIX = no
27MAGIC_ENABLE = no
28SPACE_CADET_ENABLE = no
29GRAVE_ESC_ENABLE = no
diff --git a/keyboards/xd75/keymaps/replicaJunction/config.h b/keyboards/xd75/keymaps/replicaJunction/config.h
new file mode 100644
index 000000000..a02f9a95d
--- /dev/null
+++ b/keyboards/xd75/keymaps/replicaJunction/config.h
@@ -0,0 +1,51 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// Do not allow one macro to contain the other macro
20#define DYNAMIC_MACRO_NO_NESTING
21
22// "THE most important tap hold configuration setting"
23// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
24// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
25#define IGNORE_MOD_TAP_INTERRUPT
26
27// This one is a style choice. Play with it both on and off to see which
28// one suits you better.
29// https://precondition.github.io/home-row-mods#permissive-hold
30// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
31#define PERMISSIVE_HOLD
32
33// If you press a dual-role key for longer than TAPPING_TERM, then
34// release it without pressing another key, without this setting nothing
35// would happen. With this setting, it sends the key's tap function.
36// https://precondition.github.io/home-row-mods#retro-tapping
37#define RETRO_TAPPING
38
39// Disable some unused features to save space
40#undef LOCKING_SUPPORT_ENABLE
41#undef LOCKING_RESYNC_ENABLE
42
43/////
44// Flags for stuff in my userspace
45
46#define USER_INCLUDE_GAMING_LAYER
47#define USER_INCLUDE_MACRO_LAYER
48
49// "Super Alt-Tab"
50// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
51#define USER_SUPER_ALT_TAB_TIMEOUT 500
diff --git a/keyboards/xd75/keymaps/replicaJunction/keymap.c b/keyboards/xd75/keymaps/replicaJunction/keymap.c
new file mode 100644
index 000000000..71ef2a668
--- /dev/null
+++ b/keyboards/xd75/keymaps/replicaJunction/keymap.c
@@ -0,0 +1,138 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18#include "replicaJunction.h"
19
20// enum additional_keyboard_layers {
21// L_RGB = _LAYER_SAFE_RANGE
22// };
23
24#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
25#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
26#define ESC_NUM LT(L_NUMBERS, KC_ESC)
27#define MO_FN MO(L_FN)
28#define MO_MAC MO(L_MACROS)
29
30#define DF_TYPE DF(L_BASE)
31#define DF_GAME DF(L_GAMING)
32
33#define ESC_SFT LSFT_T(KC_ESC)
34#define TAB_SFT RSFT_T(KC_TAB)
35
36
37const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
38 [L_BASE] = LAYOUT_ortho_5x15(
39 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
40 KC_EQL, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
41 KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_G, SALTTAB, KC_UP, KC_END, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
42 NUMWORD, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LEFT, KC_DOWN, KC_RGHT, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, CAPWORD,
43 KC_LCTL, KC_LGUI, KC_LALT, MO_FN, ESC_SFT, BSP_SYM, CTL_DEL, KC_ENT, ALT_ENT, SPC_NAV, TAB_SFT, MO_FN, KC_RALT, KC_RGUI, KC_RCTL
44 ),
45
46
47 [L_GAMING] = LAYOUT_ortho_5x15(
48 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
49 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
50 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
51 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
52 KC_LCTL, KC_LCTL, KC_LALT, KC_LSFT, KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_SPC, MO_FN, KC_RALT, KC_RGUI, KC_RCTL
53 ),
54
55
56 // [L_QWERTY] = LAYOUT_ortho_5x15(
57 // KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
58 // KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
59 // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
60 // KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
61 // KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL
62 // ),
63
64
65 // [L_CURSOR] = LAYOUT_ortho_5x15(
66 // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
67 // _______, _______, _______, _______, _______, _______, _______, _______, _______, OS_SALL, OS_COPY, OS_PAST, OS_CUT, OS_UNDO, _______,
68 // _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, SEARCH, SALTTAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______,
69 // _______, KC_RGUI, KC_RALT, KC_RSFT, KC_RCTL, _______, _______, _______, _______, OS_FIND, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______,
70 // _______, _______, _______, _______, _______, ooooooo, _______, _______, _______, SPC_NAV, _______, _______, _______, _______, _______
71 // ),
72
73
74 [L_NUMBERS] = LAYOUT_ortho_5x15(
75 _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, _______, _______, _______, _______, _______,
76 _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HASH, KC_P7, KC_P8, KC_P9, KC_PSLS, SFT_TAB,
77 _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, _______, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TAB,
78 _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_BSLS, KC_EQL,
79 _______, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PENT, _______
80 ),
81
82
83 [L_SYMBOLS] = LAYOUT_ortho_5x15(
84 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
85 _______, KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX, _______, _______, _______, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, XXXXXXX, _______,
86 _______, KC_BSLS, KC_LPRN, KC_DQUO, KC_RPRN, KC_HASH, _______, _______, _______, KC_PERC, KC_LCBR, KC_EQL, KC_RCBR, KC_PIPE, _______,
87 _______, KC_EXLM, KC_COLN, KC_ASTR, KC_PLUS, XXXXXXX, _______, _______, _______, XXXXXXX, KC_AMPR, KC_CIRC, KC_TILD, KC_GRV, _______,
88 _______, _______, _______, _______, _______, ooooooo, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
89 ),
90
91
92 [L_NAVIGATION] = LAYOUT_ortho_5x15(
93 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
94 _______, OS_UNDO, OS_CUT, OS_PAST, OS_COPY, OS_SALL, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______,
95 _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, _______,
96 _______, WIN_V, _______, _______, OS_FIND, SEARCH, _______, _______, _______, _______, SFT_TAB, KC_TAB, KC_APP, KC_PSCR, _______,
97 _______, _______, _______, _______, _______, ooooooo, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
98 ),
99
100
101 [L_FN] = LAYOUT_ortho_5x15(
102 DF_TYPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, MS_JIGL, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
103 DF_GAME, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, KC_F12,
104 _______, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_CAPS, RESET, _______, KC_MUTE, _______, _______, _______, _______, _______,
105 _______, RGB_M_P, RGB_M_B, _______, _______, _______, _______, _______, _______, KC_VOLD, K_SECR1, K_SECR2, K_SECR3, K_SECR4, _______,
106 _______, _______, _______, ooooooo, _______, _______, _______, _______, _______, _______, _______, ooooooo, _______, _______, _______
107 ),
108
109
110 [L_MACROS] = LAYOUT_ortho_5x15(
111 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
112 _______, QK_MAKE, _______, DM_REC2, DM_REC1, _______, _______, _______, _______, _______, SHEBANG, _______, _______, _______, _______,
113 _______, QK_FLSH, _______, DM_PLY2, DM_PLY1, DM_RSTP, _______, _______, _______, PRG_NE, PRG_EQ, PRG_GEQ, PRG_LEQ, PRG_ARR, _______,
114 _______, QK_VERS, _______, _______, _______, _______, _______, _______, _______, _______, PS_ITEM, FS_PIPE, _______, FS_ARR, _______,
115 _______, _______, _______, _______, ooooooo, _______, _______, _______, _______, ooooooo, _______, _______, _______, _______, _______
116 )
117
118 // [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
119 // _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NLCK, KC_SLSH, KC_ASTR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
120 // KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_F12,
121 // KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______,
122 // KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______,
123 // _______, _______, RGB_TOG, ooooooo, RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, ooooooo, _______, _______, _______
124 // )
125
126 // // Template
127 // [_LAYER] = LAYOUT_ortho_5x15(
128 // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
129 // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
130 // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
131 // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
132 // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
133 // ),
134};
135
136layer_state_t layer_state_set_user(layer_state_t state) {
137 return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
138}
diff --git a/keyboards/xd75/keymaps/replicaJunction/readme.md b/keyboards/xd75/keymaps/replicaJunction/readme.md
new file mode 100644
index 000000000..980a2f727
--- /dev/null
+++ b/keyboards/xd75/keymaps/replicaJunction/readme.md
@@ -0,0 +1,5 @@
1# replicaJunction - XD75 layout
2
3As a longtime ortho user, I prefer the "pseudo-split" keymap, where the center 3 columns are used for other purposes. This leaves 6 columns on each side to used like a split Preonic.
4
5Most of the goodies in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Better explanations of the interesting features are provided there.
diff --git a/keyboards/xd75/keymaps/replicaJunction/rules.mk b/keyboards/xd75/keymaps/replicaJunction/rules.mk
new file mode 100644
index 000000000..7e0b3c9ca
--- /dev/null
+++ b/keyboards/xd75/keymaps/replicaJunction/rules.mk
@@ -0,0 +1,29 @@
1# Userspace options
2USER_CAPS_WORD_ENABLE = yes
3USER_MOUSE_JIGGLE_ENABLE = yes
4USER_NUM_WORD_ENABLE = yes
5USER_SECRETS_ENABLE = yes
6USER_SUPER_ALT_TAB_ENABLE = yes
7
8DYNAMIC_MACRO_ENABLE = yes
9
10# Extra features that are nice but takes space. Enable only if they're
11# used in the layout.
12WPM_ENABLE = no
13# EXTRAKEY_ENABLE = no # For volume keys and similar
14# MOUSEKEY_ENABLE = no # Them mouse keys yo
15KEY_OVERRIDE_ENABLE = no
16LEADER_ENABLE = no
17TAP_DANCE_ENABLE = no
18# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
19RGB_MATRIX_ENABLE = no
20
21# Features I definitely don't care aboud
22LTO_ENABLE = yes
23CONSOLE_ENABLE = no
24VERBOSE = no
25DEBUG_MATRIX_SCAN_RATE = no
26DEBUG_MATRIX = no
27MAGIC_ENABLE = no
28SPACE_CADET_ENABLE = no
29GRAVE_ESC_ENABLE = no
diff --git a/layouts/community/ergodox/replicaJunction/config.h b/layouts/community/ergodox/replicaJunction/config.h
index 9ffd74dcc..a02f9a95d 100644
--- a/layouts/community/ergodox/replicaJunction/config.h
+++ b/layouts/community/ergodox/replicaJunction/config.h
@@ -1,13 +1,51 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#pragma once 17#pragma once
2 18
3// Layer definitions 19// Do not allow one macro to contain the other macro
4 20#define DYNAMIC_MACRO_NO_NESTING
5#define L_COLEMAK 0 21
6#define L_QWERTY 1 22// "THE most important tap hold configuration setting"
7#define L_NUM 2 23// https://precondition.github.io/home-row-mods#ignore-mod-tap-interrupt
8#define L_EXTEND 3 24// https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
9#define L_FUNC 4 25#define IGNORE_MOD_TAP_INTERRUPT
10#define L_GAMING 5 26
11#define L_LL_R 6 27// This one is a style choice. Play with it both on and off to see which
12#define L_LL_E 7 28// one suits you better.
13#define L_LL_I 8 29// https://precondition.github.io/home-row-mods#permissive-hold
30// https://docs.qmk.fm/#/tap_hold?id=permissive-hold
31#define PERMISSIVE_HOLD
32
33// If you press a dual-role key for longer than TAPPING_TERM, then
34// release it without pressing another key, without this setting nothing
35// would happen. With this setting, it sends the key's tap function.
36// https://precondition.github.io/home-row-mods#retro-tapping
37#define RETRO_TAPPING
38
39// Disable some unused features to save space
40#undef LOCKING_SUPPORT_ENABLE
41#undef LOCKING_RESYNC_ENABLE
42
43/////
44// Flags for stuff in my userspace
45
46#define USER_INCLUDE_GAMING_LAYER
47#define USER_INCLUDE_MACRO_LAYER
48
49// "Super Alt-Tab"
50// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
51#define USER_SUPER_ALT_TAB_TIMEOUT 500
diff --git a/layouts/community/ergodox/replicaJunction/keymap.c b/layouts/community/ergodox/replicaJunction/keymap.c
index ce0400be5..0c36abcf7 100644
--- a/layouts/community/ergodox/replicaJunction/keymap.c
+++ b/layouts/community/ergodox/replicaJunction/keymap.c
@@ -1,427 +1,378 @@
1/* 1/* Copyright 2021 Joshua T.
2 * Keyboard: Ergodox 2 *
3 * Keymap: replicaJunction 3 * This program is free software: you can redistribute it and/or modify
4 * Version: 2.1 4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
5 */ 15 */
6 16
7#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
8#include "config.h"
9#include "replicaJunction.h" 18#include "replicaJunction.h"
10 19
11const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 20// Most layers are defined in my userspace, but this keyboard has
21// an extra one.
22enum additional_keyboard_layers {
23 L_SYSLEDS = _LAYER_SAFE_RANGE
24};
12 25
13[L_COLEMAK] = LAYOUT_ergodox( 26#define BSP_SYM LT(L_SYMBOLS, KC_BSPC)
14//--------|--------|--------|--------|--------|--------|--------| 27#define SPC_NAV LT(L_NAVIGATION, KC_SPC)
15 KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_GRV ,
16//--------|--------|--------|--------|--------|--------|--------|
17 KX_ECTL ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,KC_LBRC ,
18//--------|--------|--------|--------|--------|--------|--------|
19 KC_TAB ,KC_A ,KC_R_LT ,KC_S_LT ,KC_T ,KC_G,
20//--------|--------|--------|--------|--------|--------|--------|
21 KC_LSFT ,KX_Z_MT ,KX_X_MT ,KX_C_MT ,KX_D_MT ,KC_V ,KC_RBRC ,
22//--------|--------|--------|--------|--------|--------|--------|
23 TD_LAYR ,KC_LGUI ,KC_HYPR ,KX_CTSF ,KC_LCTL ,
24//--------|--------|--------|--------|--------|--------|--------|
25 KC_HOME ,KC_END ,
26// |--------|--------|
27 KC_PGUP ,
28// |--------|--------|--------|
29 KX_BKNM ,KX_DCTL ,KC_PGDN ,
30// |--------|--------|--------|
31
32//--------|--------|--------|--------|--------|--------|-------|
33 TG_GAME ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_EQL ,
34//--------|--------|--------|--------|--------|--------|-------|
35 KC_DEL ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_BSLS,
36//--------|--------|--------|--------|--------|--------|-------|
37 KC_M ,KC_N ,KC_E_LT ,KC_I_LT ,KC_O ,KC_QUOT,
38//--------|--------|--------|--------|--------|--------|-------|
39 KC_LOCK ,KC_K ,KX_H_MT ,KX_COMT ,KX_DOMT ,KX_SLMT ,KC_RSFT,
40//--------|--------|--------|--------|--------|--------|-------|
41 KC_LALT ,KC_MINS ,KC_QUOT ,KC_EQL ,TT_NUM ,
42//--------|--------|--------|--------|--------|--------|-------|
43 KC_LEFT ,KC_RGHT ,
44//--------|--------|
45 KC_UP ,
46//--------|--------|--------|
47 KC_DOWN ,KX_NALT ,KX_SPAC
48//--------|--------|--------|
49 28
50), 29#define MO_FN MO(L_FN)
30#define MO_MAC MO(L_MACROS)
31#define MO_SLED MO(L_SYSLEDS)
32
33#define TG_GAME TG(L_GAMING)
34
35#define ESC_SFT LSFT_T(KC_ESC)
36#define TAB_SFT RSFT_T(KC_TAB)
51 37
52 38
39const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
40
53 41
54[L_QWERTY] = LAYOUT_ergodox( 42[L_BASE] = LAYOUT_ergodox(
55//--------|--------|--------|--------|--------|--------|--------| 43 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS,
56 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , 44 KC_EQL, KC_Q, KC_W, KC_F, KC_P, KC_B, NUMWORD,
57//--------|--------|--------|--------|--------|--------|--------| 45 KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_G,
58 _______ ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,_______ , 46 KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_RBRC,
59//--------|--------|--------|--------|--------|--------|--------| 47 KC_LCTL, KC_LGUI ,KC_LALT, MO_FN, ESC_SFT,
60 _______ ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , 48 KC_HOME, KC_END,
61//--------|--------|--------|--------|--------|--------|--------| 49 KC_PGUP,
62 _______ ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,_______ , 50 BSP_SYM, CTL_DEL, KC_PGDN,
63//--------|--------|--------|--------|--------|--------|--------| 51
64 _______ ,_______ ,_______ ,_______ ,_______ , 52 TG_GAME, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
65//--------|--------|--------|--------|--------|--------|--------| 53 CAPWORD, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
66 _______ ,_______ , 54 KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
67// |--------|--------| 55 KC_LOCK, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
68 _______ , 56 TAB_SFT, MO_FN, KC_RALT, KC_RGUI, MO_SLED,
69// |--------|--------|--------| 57 KC_LEFT, KC_RGHT,
70 _______ ,_______ ,_______ , 58 KC_UP,
71// |--------|--------|--------| 59 KC_DOWN, ALT_ENT, SPC_NAV
72
73//--------|--------|--------|--------|--------|--------|--------|
74 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,KC_EQL ,
75//--------|--------|--------|--------|--------|--------|--------|
76 _______ ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,_______ ,
77//--------|--------|--------|--------|--------|--------|--------|
78 KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,
79//--------|--------|--------|--------|--------|--------|--------|
80 KC_LOCK ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
81//--------|--------|--------|--------|--------|--------|--------|
82 KC_RALT ,KC_MINS ,KC_QUOT ,KC_EQL ,TT_NUM ,
83//--------|--------|--------|--------|--------|--------|--------|
84 KC_LEFT ,KC_RGHT ,
85//--------|--------|
86 KC_UP ,
87//--------|--------|--------|
88 KC_DOWN ,KX_NALT ,KX_SPAC
89//--------|--------|--------|
90), 60),
91 61
92 62
63[L_GAMING] = LAYOUT_ergodox(
64 KC_GRV, _______,_______,_______,_______,_______,_______,
65 KC_TAB, _______,_______,_______,_______,_______,_______,
66 KC_ESC, KC_A, KC_R, KC_S, KC_T, _______,
67 KC_LSFT,_______,_______,KC_C, KC_D, _______,_______,
68 _______,_______,KC_TAB, KC_LALT,KC_LCTL,
69 KC_LOCK,_______,
70 _______,
71 KC_SPC, KC_LSFT,_______,
72
73 ooooooo,_______,_______,_______,_______,_______,_______,
74 _______,_______,_______,_______,_______,_______,_______,
75 _______,KC_N, KC_E, KC_I, KC_O, _______,
76 _______,_______,_______,_______,_______,_______,_______,
77 MO_FN, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,
78 KC_BTN3,_______,
79 KC_BTN2,
80 KC_BTN1,KC_ENT, KC_BSPC
81),
82
93 83
94[L_NUM] = LAYOUT_ergodox( 84[L_NUMBERS] = LAYOUT_ergodox(
95//--------|--------|--------|--------|--------|--------|--------| 85 _______,_______,_______,_______,_______,_______,_______,
96 _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,_______ , 86 _______,_______,_______,_______,_______,_______,_______,
97//--------|--------|--------|--------|--------|--------|--------| 87 _______,KC_LGUI,KC_LALT,KC_LSFT,KC_LCTL,_______,
98 _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_SLSH ,_______ , 88 _______,_______,_______,_______,_______,_______,_______,
99//--------|--------|--------|--------|--------|--------|--------| 89 _______,_______,_______,_______,_______,
100 _______ ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_PIPE, 90 _______,_______,
101//--------|--------|--------|--------|--------|--------|--------| 91 _______,
102 _______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_BSLS ,_______ , 92 _______,_______,_______,
103//--------|--------|--------|--------|--------|--------|--------| 93
104 _______ ,_______ ,KC_AMPR ,KC_LABK ,KC_RABK, 94 _______,KC_NLCK,_______,_______,_______,_______,_______,
105//--------|--------|--------|--------|--------|--------|--------| 95 KC_NLCK,KC_HASH,KC_P7, KC_P8, KC_P9, KC_PSLS,SFT_TAB,
106 _______ ,_______ , 96 KC_PPLS,KC_P4, KC_P5, KC_P6, KC_PAST,KC_TAB,
107// |--------|--------| 97 _______,KC_PMNS,KC_P1, KC_P2, KC_P3, KC_BSLS,KC_EQL,
108 _______ , 98 KC_P0, KC_P0, KC_PDOT,KC_PENT,_______,
109// |--------|--------|--------| 99 _______,_______,
110 _______ ,_______ ,_______ , 100 _______,
111// |--------|--------|--------| 101 _______,_______,_______
112
113//--------|--------|--------|--------|--------|--------|--------|
114 _______ ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
115//--------|--------|--------|--------|--------|--------|--------|
116 _______ ,KC_COLN ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PSLS ,KC_F12 ,
117//--------|--------|--------|--------|--------|--------|--------|
118 KC_HASH ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PAST ,KC_BSPC ,
119//--------|--------|--------|--------|--------|--------|--------|
120 _______ ,KC_BSPC ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PMNS ,KC_TAB ,
121//--------|--------|--------|--------|--------|--------|--------|
122 KC_P0 ,KC_PDOT ,KC_PEQL ,KC_PPLS ,_______ ,
123//--------|--------|--------|--------|--------|--------|--------|
124 _______ ,_______ ,
125//--------|--------|
126 _______ ,
127//--------|--------|--------|
128 _______ ,KC_PENT ,MO_FUNC
129//--------|--------|--------|
130), 102),
131 103
132 104
105[L_SYMBOLS] = LAYOUT_ergodox(
106 _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
107 _______,KC_AT, KC_LT, KC_DLR, KC_GT, XXXXXXX,_______,
108 _______,KC_BSLS,KC_LPRN,KC_DQUO,KC_RPRN,KC_HASH,
109 _______,KC_EXLM,KC_COLN,KC_ASTR,KC_PLUS,XXXXXXX,_______,
110 _______,_______,_______,_______,_______,
111 _______,_______,
112 _______,
113 ooooooo,_______,_______,
114
115 _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
116 _______,XXXXXXX,KC_LBRC,KC_UNDS,KC_RBRC,XXXXXXX,KC_F12,
117 KC_PERC,KC_LCBR,KC_EQL, KC_RCBR,KC_PIPE,_______,
118 _______,XXXXXXX,KC_AMPR,KC_CIRC,KC_TILD,KC_GRV, _______,
119 _______,_______,_______,_______,_______,
120 _______,_______,
121 _______,
122 _______,_______,ooooooo
123),
124
133 125
134[L_EXTEND] = LAYOUT_ergodox( 126[L_NAVIGATION] = LAYOUT_ergodox(
135//--------|--------|--------|--------|--------|--------|--------| 127 _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
136 _______ ,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, 128 _______,OS_UNDO,OS_CUT, OS_PAST,OS_COPY,OS_SALL,_______,
137//--------|--------|--------|--------|--------|--------|--------| 129 _______,KC_LGUI,KC_LSFT,KC_LALT,KC_LCTL,_______,
138 _______ ,_______ ,_______ ,_______ ,KC_APP ,KX_CGR, KC_VOLU, 130 _______,WIN_V, _______,_______,OS_FIND,SEARCH, _______,
139//--------|--------|--------|--------|--------|--------|--------| 131 _______,_______,_______,_______,_______,
140 _______ ,KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, _______ , 132 _______,_______,
141//--------|--------|--------|--------|--------|--------|--------| 133 _______,
142 _______ ,_______ ,_______ ,_______ ,KX_SRCH, KX_PAST, KC_VOLD, 134 _______,_______,_______,
143//--------|--------|--------|--------|--------|--------|--------| 135
144 _______ ,_______ ,_______ ,_______ ,_______ , 136 _______,KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
145//--------|--------|--------|--------|--------|--------|--------| 137 _______,KC_PGUP,KC_HOME,KC_UP, KC_END, KC_DEL, KC_F12,
146 _______ ,_______ , 138 KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_BSPC,_______,
147// |--------|--------|--------| 139 _______,_______,SFT_TAB,KC_TAB, KC_APP, KC_PSCR,_______,
148 _______ , 140 _______,_______,_______,_______,_______,
149// |--------|--------|--------| 141 _______,_______,
150 MO_FUNC, _______ ,_______ , 142 _______,
151// |--------|--------|--------| 143 _______,_______,ooooooo
152
153//--------|--------|--------|--------|--------|--------|--------|
154 KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______ ,
155//--------|--------|--------|--------|--------|--------|--------|
156 _______ ,KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______ ,
157//--------|--------|--------|--------|--------|--------|--------|
158 KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_MENU,
159//--------|--------|--------|--------|--------|--------|--------|
160 _______ ,_______ ,KX_STAB, KC_TAB, _______ ,KC_INS, KC_PSCR,
161//--------|--------|--------|--------|--------|--------|--------|
162 _______ ,_______ ,_______ ,KC_PSCR, _______ ,
163//--------|--------|--------|--------|--------|--------|--------|
164 _______ ,_______ ,
165//--------|--------|--------|--------|--------|--------|--------|
166 _______ ,
167//--------|--------|--------|--------|--------|--------|--------|
168 _______ ,_______ ,_______
169//--------|--------|--------|--------|--------|--------|--------|
170), 144),
171 145
172 146
147[L_FN] = LAYOUT_ergodox(
148 _______,_______,_______,_______,_______,_______,_______,
149 _______,QK_VERS,_______,DM_REC2,DM_REC1,DM_RSTP,_______,
150 _______,QK_MAKE,_______,DM_PLY2,DM_PLY1,_______,
151 _______,QK_FLSH,K_SECR1,K_SECR2,K_SECR3,K_SECR4,_______,
152 _______,_______,_______,ooooooo,_______,
153 _______,_______,
154 _______,
155 KC_LCTL,_______,_______,
156
157 _______,_______,_______,_______,_______,_______,_______,
158 _______,KC_VOLU,KC_F9, KC_F10, KC_F11, KC_F12, _______,
159 KC_MUTE,KC_F5, KC_F6, KC_F7, KC_F8, _______,
160 _______,KC_VOLD,KC_F1, KC_F2, KC_F3, KC_F4, _______,
161 _______,ooooooo,_______,_______,_______,
162 _______,RESET,
163 _______,
164 _______,_______,KC_LALT
165),
173 166
174[L_FUNC] = LAYOUT_ergodox( 167
175//--------|--------|--------|--------|--------|--------|--------| 168[L_MACROS] = LAYOUT_ergodox(
176 _______ ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,_______ , 169 _______,_______,_______,_______,_______,_______,_______,
177//--------|--------|--------|--------|--------|--------|--------| 170 _______,_______,_______,DM_REC2,DM_REC1,_______,_______,
178 _______ ,_______ ,_______ ,M_LCLIK, M_RCLIK, M_MCLIK, _______ , 171 _______,_______,_______,DM_PLY2,DM_PLY1,DM_RSTP,
179//--------|--------|--------|--------|--------|--------|--------| 172 _______,_______,_______,_______,_______,_______,_______,
180 _______ ,KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, M_WHLUP, 173 _______,_______,_______,_______,_______,
181//--------|--------|--------|--------|--------|--------|--------| 174 _______,_______,
182 _______ ,M_LEFT, M_DOWN, M_UP ,M_RIGHT, M_WHLDN, _______ , 175 _______,
183//--------|--------|--------|--------|--------|--------|--------| 176 ooooooo,_______,_______,
184 _______ ,_______ ,_______ ,_______ ,_______ , 177
185//--------|--------|--------|--------|--------|--------|--------| 178 _______,_______,_______,_______,_______,_______,_______,
186 _______ ,_______ , 179 _______,_______,SHEBANG,_______,_______,_______,_______,
187// |--------|--------|--------| 180 PRG_NE, PRG_EQ, PRG_GEQ,PRG_LEQ,PRG_ARR,_______,
188 _______ , 181 _______,_______,PS_ITEM,FS_PIPE,_______,FS_ARR, _______,
189// |--------|--------|--------| 182 _______,_______,_______,_______,_______,
190 _______ ,_______ ,_______ , 183 _______,_______,
191// |--------|--------|--------| 184 _______,
192 185 _______,_______,ooooooo
193//--------|--------|--------|--------|--------|--------|--------|
194 _______ ,KC_F16 ,KC_F17 ,KC_F18 ,KC_F19 ,KC_F20 ,_______ ,
195//--------|--------|--------|--------|--------|--------|--------|
196 _______ ,KC_VOLU, KC_F9, KC_F10, KC_F11, KC_F12, _______ ,
197//--------|--------|--------|--------|--------|--------|--------|
198 KC_MUTE, KC_F5, KC_F6, KC_F7, KC_F8, _______ ,
199//--------|--------|--------|--------|--------|--------|--------|
200 _______ ,KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, _______ ,
201//--------|--------|--------|--------|--------|--------|--------|
202 _______ ,_______ ,_______ ,_______ ,_______ ,
203//--------|--------|--------|--------|--------|--------|--------|
204 _______ ,_______ ,
205//--------|--------|--------|--------|--------|--------|--------|
206 _______ ,
207//--------|--------|--------|--------|--------|--------|--------|
208 _______ ,_______ ,_______
209//--------|--------|--------|--------|--------|--------|--------|
210), 186),
211 187
212 188
213 189
214[L_GAMING] = LAYOUT_ergodox( 190[L_SYSLEDS] = LAYOUT_ergodox(
215//--------|--------|--------|--------|--------|--------|--------| 191 _______,_______,_______,_______,_______,_______,_______,
216 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , 192 _______,_______,_______,_______,_______,_______,_______,
217//--------|--------|--------|--------|--------|--------|--------| 193 _______,_______,_______,_______,_______,_______,
218 KC_ESC ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , 194 _______,_______,_______,_______,_______,_______,_______,
219//--------|--------|--------|--------|--------|--------|--------| 195 _______,_______,_______,_______,_______,
220 _______ ,_______ ,KC_R ,KC_S ,_______ ,_______ , 196 _______,_______,
221//--------|--------|--------|--------|--------|--------|--------| 197 _______,
222 KC_LSFT, _______ ,_______ ,_______ ,_______ ,_______ ,_______ , 198 _______,_______,_______,
223//--------|--------|--------|--------|--------|--------|--------| 199
224 _______ ,_______ ,_______ ,KC_LALT ,KC_LCTL , 200 KC_NLCK,_______,_______,_______,_______,_______,_______,
225//--------|--------|--------|--------|--------|--------|--------| 201 KC_CAPS,_______,_______,_______,_______,_______,_______,
226 _______ ,_______ , 202 _______,_______,_______,_______,_______,_______,
227// |--------|--------| 203 KC_SLCK,_______,_______,_______,_______,_______,_______,
228 _______ , 204 _______,_______,_______,_______,ooooooo,
229// |--------|--------|--------| 205 _______,_______,
230 KC_SPC, KC_LSFT, _______ , 206 _______,
231// |--------|--------|--------| 207 _______,_______,_______
232
233//--------|--------|--------|--------|--------|--------|--------|
234 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
235//--------|--------|--------|--------|--------|--------|--------|
236 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
237//--------|--------|--------|--------|--------|--------|--------|
238 _______ ,_______ ,KC_E ,KC_I ,_______ ,_______ ,
239//--------|--------|--------|--------|--------|--------|--------|
240 _______ ,_______ ,_______ ,_______ ,_______ ,KC_UP, KC_SLSH,
241//--------|--------|--------|--------|--------|--------|--------|
242 _______ ,_______ ,KC_LEFT, KC_DOWN, KC_RGHT,
243//--------|--------|--------|--------|--------|--------|--------|
244 M_MCLIK ,_______ ,
245//--------|--------|--------|--------|--------|--------|--------|
246 M_RCLIK ,
247//--------|--------|--------|--------|--------|--------|--------|
248 M_LCLIK ,KC_ENT ,KC_BSPC
249//--------|--------|--------|--------|--------|--------|--------|
250)
251,
252
253// "Letter Layers"
254
255[L_LL_R] = LAYOUT_ergodox(
256//--------|--------|--------|--------|--------|--------|--------|
257 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
258//--------|--------|--------|--------|--------|--------|--------|
259 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
260//--------|--------|--------|--------|--------|--------|--------|
261 _______ ,_______ ,ooooooo ,KC_AMPR ,KC_PIPE ,_______ ,
262//--------|--------|--------|--------|--------|--------|--------|
263 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
264//--------|--------|--------|--------|--------|--------|--------|
265 _______ ,_______ ,_______ ,_______ ,_______ ,
266//--------|--------|--------|--------|--------|--------|--------|
267 _______ ,_______ ,
268// |--------|--------|
269 _______ ,
270// |--------|--------|--------|
271 _______ ,_______ ,_______ ,
272// |--------|--------|--------|
273
274//--------|--------|--------|--------|--------|--------|--------|
275 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
276//--------|--------|--------|--------|--------|--------|--------|
277 _______ ,KC_COLN ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PSLS ,_______ ,
278//--------|--------|--------|--------|--------|--------|--------|
279 KC_HASH ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PAST ,KC_TAB ,
280//--------|--------|--------|--------|--------|--------|--------|
281 _______ ,KC_BSPC ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PMNS ,_______ ,
282//--------|--------|--------|--------|--------|--------|--------|
283 KC_P0 ,KC_PDOT ,KC_PEQL ,KC_PPLS ,_______ ,
284//--------|--------|--------|--------|--------|--------|--------|
285 _______ ,_______ ,
286//--------|--------|
287 _______ ,
288//--------|--------|--------|
289 _______ ,KC_PENT ,MO_FUNC
290//--------|--------|--------|
291)
292,
293
294[L_LL_E] = LAYOUT_ergodox(
295//--------|--------|--------|--------|--------|--------|--------|
296 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
297//--------|--------|--------|--------|--------|--------|--------|
298 RJ_QMKV ,RJ_MAKE ,RJ_EQ ,RJ_LEQ ,RJ_GEQ ,RJ_GEQR ,_______ ,
299//--------|--------|--------|--------|--------|--------|--------|
300 _______ ,_______ ,_______ ,RJ_SELS ,RJ_DUND ,_______ ,
301//--------|--------|--------|--------|--------|--------|--------|
302 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
303//--------|--------|--------|--------|--------|--------|--------|
304 _______ ,_______ ,_______ ,_______ ,_______ ,
305//--------|--------|--------|--------|--------|--------|--------|
306 _______ ,_______ ,
307// |--------|--------|
308 _______ ,
309// |--------|--------|--------|
310 _______ ,_______ ,_______ ,
311// |--------|--------|--------|
312
313//--------|--------|--------|--------|--------|--------|--------|
314 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
315//--------|--------|--------|--------|--------|--------|--------|
316 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
317//--------|--------|--------|--------|--------|--------|--------|
318 _______ ,_______ ,ooooooo ,_______ ,_______ ,_______ ,
319//--------|--------|--------|--------|--------|--------|--------|
320 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
321//--------|--------|--------|--------|--------|--------|--------|
322 _______ ,_______ ,_______ ,_______ ,_______ ,
323//--------|--------|--------|--------|--------|--------|--------|
324 _______ ,_______ ,
325//--------|--------|
326 _______ ,
327//--------|--------|--------|
328 _______ ,_______ ,_______
329//--------|--------|--------|
330)
331,
332
333[L_LL_I] = LAYOUT_ergodox(
334//--------|--------|--------|--------|--------|--------|--------|
335 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
336//--------|--------|--------|--------|--------|--------|--------|
337 _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_SLSH ,_______ ,
338//--------|--------|--------|--------|--------|--------|--------|
339 _______ ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_PIPE,
340//--------|--------|--------|--------|--------|--------|--------|
341 _______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_BSLS ,_______ ,
342//--------|--------|--------|--------|--------|--------|--------|
343 _______ ,_______ ,KC_AMPR ,KC_LABK ,KC_RABK,
344//--------|--------|--------|--------|--------|--------|--------|
345 _______ ,_______ ,
346// |--------|--------|
347 _______ ,
348// |--------|--------|--------|
349 _______ ,_______ ,_______ ,
350// |--------|--------|--------|
351
352//--------|--------|--------|--------|--------|--------|--------|
353 _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
354//--------|--------|--------|--------|--------|--------|--------|
355 _______ ,_______ ,KC_UNDS, KC_GRV ,_______ ,_______ ,_______ ,
356//--------|--------|--------|--------|--------|--------|--------|
357 _______ ,KC_MINS ,KC_QUOT ,ooooooo ,_______ ,_______ ,
358//--------|--------|--------|--------|--------|--------|--------|
359 _______ ,_______ ,KC_TILD, KC_DQT ,_______ ,_______ ,_______ ,
360//--------|--------|--------|--------|--------|--------|--------|
361 _______ ,_______ ,_______ ,_______ ,_______ ,
362//--------|--------|--------|--------|--------|--------|--------|
363 _______ ,_______ ,
364//--------|--------|--------|--------|--------|--------|--------|
365 _______ ,
366//--------|--------|--------|--------|--------|--------|--------|
367 _______ ,_______ ,_______
368//--------|--------|--------|--------|--------|--------|--------|
369) 208)
370 209
210// Template
211// [_NUMBERS] = LAYOUT_ergodox(
212// _______,_______,_______,_______,_______,_______,_______,
213// _______,_______,_______,_______,_______,_______,_______,
214// _______,_______,_______,_______,_______,_______,
215// _______,_______,_______,_______,_______,_______,_______,
216// _______,_______,_______,_______,_______,
217// _______,_______,
218// _______,
219// _______,_______,_______,
220
221// _______,_______,_______,_______,_______,_______,_______,
222// _______,_______,_______,_______,_______,_______,_______,
223// _______,_______,_______,_______,_______,_______,
224// _______,_______,_______,_______,_______,_______,_______,
225// _______,_______,_______,_______,_______,
226// _______,_______,
227// _______,
228// _______,_______,_______
229// ),
371 230
372}; 231};
373 232
374// The normal QMK functions ending in _user are overridden in the 233void keyboard_post_init_user_kb(void) {
375// replicaJunction userspace. Those functions handle my global 234 ergodox_right_led_1_on();
376// settings, and redirect to these _keymap functions if something 235}
377// is unhandled. This allows me to keep most of my global preferences 236
378// in one place while still allowing keyboard-specific code. 237
238////////////////////////////////////////////////////////////
239// System LED code
240////////////////////////////////////////////////////////////
241
242// We need to track both the layer state and the system LED state in
243// order to update the LEDs appropriately when either one changes.
244// These are both represented as a bitmask.
245//
246// There is a global 'layer_state' variable but it is set after the call
247// to layer_state_set_user(), so it doesn't work properly for our
248// purposes.
249static uint32_t current_layer_state = 0;
250static uint8_t sys_led_state = 0;
251
252// Whether the given layer (one of the constant defined at the top) is active.
253#define LAYER_ON(state, layer) (state & (1<<layer))
254
255// Brightness of LEDs (0-255)
256// Default value is 255. Use a lesser value for dimmer LEDs.
257static const uint8_t max_led_value = 255;
258
259void led_1_on(void) {
260 ergodox_right_led_1_on();
261 ergodox_right_led_1_set(max_led_value);
262}
263
264void led_2_on(void) {
265 ergodox_right_led_2_on();
266 ergodox_right_led_2_set(max_led_value);
267}
268
269void led_3_on(void) {
270 ergodox_right_led_3_on();
271 ergodox_right_led_3_set(max_led_value);
272}
273
274// The onboard LED doesn't support brightness, but this function keeps
275// things consistent.
276void led_board_on(void) {
277 ergodox_board_led_on();
278}
279
280void led_1_off(void) {
281 ergodox_right_led_1_off();
282}
283
284void led_2_off(void) {
285 ergodox_right_led_2_off();
286}
287
288void led_3_off(void) {
289 ergodox_right_led_3_off();
290}
291
292void led_board_off(void) {
293 ergodox_board_led_off();
294}
379 295
380// The idea was shamelessly copied from the amazing Drashna. 296void set_leds_by_system_state(uint8_t led_state) {
297 led_t host_led_state = host_keyboard_led_state();
381 298
382// Nothing to do here, so I've commented it out. 299 if (led_state & host_led_state.num_lock) {
383// bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { 300 led_1_on();
384// return true; 301 }
385// } 302 else {
303 led_1_off();
304 }
305
306 if (led_state & host_led_state.caps_lock) {
307 led_2_on();
308 }
309 else {
310 led_2_off();
311 }
312
313 if (led_state & host_led_state.scroll_lock) {
314 led_3_on();
315 }
316 else {
317 led_3_off();
318 }
319}
320
321void set_leds_by_layer_state(uint32_t layer_state) {
322 if (LAYER_ON(layer_state, L_FN)) {
323 led_1_on();
324 led_2_on();
325 led_3_on();
326 led_board_off();
327 }
328 else if (LAYER_ON(layer_state, L_GAMING)) {
329 led_1_off();
330 led_2_off();
331 led_3_off();
332 led_board_on();
333 }
334 else if (LAYER_ON(layer_state, L_NUMBERS)) {
335 led_1_on();
336 led_2_off();
337 led_3_off();
338 led_board_off();
339 }
340 else if (LAYER_ON(layer_state, L_NAVIGATION)) {
341 led_1_off();
342 led_2_on();
343 led_3_off();
344 led_board_off();
345 }
346 else {
347 led_1_on();
348 led_2_off();
349 led_3_off();
350 led_board_off();
351 }
352}
386 353
387// void matrix_init_keymap(void) {}; 354void led_set_kb(uint8_t usb_led) {
355 sys_led_state = usb_led;
388 356
389void matrix_scan_keymap(void) { 357 if (LAYER_ON(current_layer_state, L_SYSLEDS)) {
358 set_leds_by_system_state(sys_led_state);
359 }
360 else {
361 set_leds_by_layer_state(current_layer_state);
362 }
390 363
391 uint8_t layer = biton32(layer_state); 364 led_set_user(usb_led);
392 // uint8_t default_layer = biton32(layer_state); 365}
393 366
394 ergodox_board_led_off(); 367layer_state_t layer_state_set_kb(layer_state_t state) {
368 current_layer_state = state;
395 369
396 switch (layer) { 370 if (LAYER_ON(state, L_SYSLEDS)) {
397 case L_COLEMAK: 371 set_leds_by_system_state(sys_led_state);
398 ergodox_right_led_1_on(); 372 }
399 ergodox_right_led_2_off(); 373 else {
400 ergodox_right_led_3_off(); 374 set_leds_by_layer_state(state);
401 break;
402 case L_NUM:
403 ergodox_right_led_1_on();
404 ergodox_right_led_2_on();
405 ergodox_right_led_3_off();
406 break;
407 case L_EXTEND:
408 ergodox_right_led_1_on();
409 ergodox_right_led_2_off();
410 ergodox_right_led_3_on();
411 break;
412 case L_FUNC:
413 ergodox_right_led_1_on();
414 ergodox_right_led_2_on();
415 ergodox_right_led_3_on();
416 break;
417 case L_GAMING:
418 ergodox_right_led_1_off();
419 ergodox_right_led_2_on();
420 ergodox_right_led_3_on();
421 break;
422 default:
423 // none
424 break;
425 } 375 }
426 376
427}; 377 return update_tri_layer_state(state, L_SYMBOLS, L_NAVIGATION, L_MACROS);
378}
diff --git a/layouts/community/ergodox/replicaJunction/readme.md b/layouts/community/ergodox/replicaJunction/readme.md
index 9a1c09550..57e448047 100644
--- a/layouts/community/ergodox/replicaJunction/readme.md
+++ b/layouts/community/ergodox/replicaJunction/readme.md
@@ -1,94 +1,5 @@
1# replicaJunction - Ergodox (EZ) Layout 1# replicaJunction - Ergodox (EZ) Layout
2 2
3This keymap is designed to complement my Atreus keyboard layout, found in keyboards/atreus. The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox. Since I use both keyboards, I've designed these layouts in an effort to make switching between the two as easy as possible. 3Most of the goodies in this layout are defined in [my userspace folder](../../../../users/replicaJunction/readme.md). Better explanations of the interesting features are provided there.
4 4
5I've also tried to make use of the extra keys on the Ergodox in as logical of a manner as possible, adding to the layers in the Atreus config without disturbing what's there already. This allows for things like F11-F20, the Application (Menu) key, and better media key placement. 5One feature is worth pointing out here, since it's keyboard-specific: handling of the LEDs. Normally, I use the LEDs to indicate layer state, but it's occasionally useful to be able to view the system state as well (num lock, caps lock, scroll lock). The final layer in the keymap, `L_SYSLEDS`, is used to indicate this. I have a MO key that temporarily switches the LED behavior to show system state, and on this layer, the three keys with LEDs are each used to toggle the respective lock.
6
7Because of this design philosophy, there are several cases where functionality is duplicated and keys are available in more than one place. I don't find that a bad thing.
8
9This layout makes heavy use of dual-role keys. Dual-role keys seemed to affect my typing speed for quite some time until I discovered the [`USE_PERMISSIVE_HOLD` flag](https://docs.qmk.fm/features/advanced-keycodes#permissive-hold). After applying this flag, I haven't had an issue with dual-role keys and typing quickly.
10
11The default letter layout in this keymap is [Colemak-ModDH](https://colemakmods.github.io/mod-dh/). I use the "matrix version" of that layout, which retains the M key on the home row as in normal Colemak.
12
13## Design Goals
14
15I designed this layout with the following goals in mind:
16
17* Atreus layout compatibility.
18* Nothing may interfere with ordinary typing.
19* Symbols need to be accessible quickly and organized in a manner I can remember.
20* Limit more difficult finger movements (and pinky usage in general).
21* Gaming should be easy.
22
23### Atreus layout compatibility
24
25Most of the functionality in this layout isn't strictly necessary - the Ergodox is a 76-key keyboard, and it's got plenty of room for extra keys and functionality compared to smaller boards like the Atreus. However, I've replicated a lot of 40% functionality on this layout in order to preserve my muscle memory.
26
27The biggest deviation is the Shift keys. My Atreus uses thumb keys for Shift, but the Ergodox doesn't have corresponding thumb keys in a comfortable enough location. I briefly tried using the outermost 1u keys in the bottom row as Shift keys, but they take a large enough thumb movement that it interfered with typing.
28
29### Nothing may interfere with ordinary typing
30
31For a long time, this meant that I couldn't use letters or home row keys as dual-role keys. I'm a fast typer, and I'm sometimes already typing the next letter before I've fully released the previous one. Normal keyboards don't care about this, but if I started adding dual-role functionality to letters, I found that I would sometimes type the next letter before releasing the layer toggle, and the letter I tried to send would still be sent under the layer I thought I'd left off.
32
33Fortunately, though, QMK has addressed this with the `PERMISSIVE_HOLD` flag. [Details are on the QMK docs page.](https://docs.qmk.fm/#/feature_advanced_keycodes?id=permissive-hold)
34
35Using that flag, I'm comfortable having layer shift keys on the home row, and this goes a long way to eliminate finger stress.
36
37### Sympols need to be accessible quickly
38
39Symbols are available under my left hand by holding the I key (on my right hand). I've grouped parenthesis, slashes, and braces together; the remaining symbols are ordered in the same way as they appear on USA keycap legends (for example, 1 is !, so that symbol is first in my lineup). Practically, I just had to get used to these other "misc" symbols.
40
41This also means that some symbols are accessible in more than one way. For example, the carats (greater than and less than) are available both in the "normal" location (Shift+Comma / Shift+Period) and on the symbol layer. I make regular changes to some of the symbols I don't use as commonly as I think of them.
42
43### Limit more difficult finger movements
44
45This is why I kept trying to put layer toggles on the home row keys instead of just placing them on random thumb keys. I suffer from RSI, and it's important for me to watch out for more "stressful" finger movements.
46
47The home row is the easiest row for your fingers to hit, followed by the upper row, and the lower row is noticeably more difficult to press. Because of this, I favored the upper row over the lower one any time I had the option to do so.
48
49### Gaming should be easy
50
51I've added a dedicated gaming layer accessible by pressing the upper-right key on the right hand (next to the 6 key). This layer disables most of the tap/hold functionality to allow keys to act normally. This layer also reverses Backspace and Space (so Space is available on the left thumb while the right hand is on the mouse).
52
53I've also added a lock key on the right hand's bottom 1.5u key and mouse keys on the right thumb cluster. This has been amazingly helpful for games that involve holding keys for extended times (for example, I can hold the left mouse button in Minecraft to continually mine).
54
55I strongly recommend using ESDF (QWERTY positions) for movement on the Ergodox rather than WASD. This makes the thumb keys much more accessible.
56
57Finally, I considered having the gaming layer revert to a QWERTY layout, but decided against it because it really threw me off when I needed to type in chat. I've accepted that I will need to rebind keys in most games as a reasonable compromise.
58
59## Features
60
61### ZXC Mods
62
63Keys on the bottom row of each half of this keyboard can be held to send modifier keys. I've tried to map this in a relatively logical manner:
64
65* Z / Slash: Ctrl
66* X / Period: GUI
67* C / Comma: Ctrl+Alt
68* D / H: Alt
69
70This is an example of maintaining compatibility with the Atreus layout. An Ergodox doesn't really need these keys, but I've grown accustomed to them on the Atreus, so they're copied here to preserve compatibility.
71
72### Layer Switching - Tap Dance
73
74The lower-left key on the left hand can be used to apply or remove layers based on a number of taps:
75
76* 1 tap sends Escape, and also disables any persistent layers.
77* 2 taps enables the Number pad layer.
78* 3 taps enables the QWERTY layer.
79* 5 or more taps resets the keyboard.
80
81## Extend Layer
82
83[Originally found on the Colemak forums](https://forum.colemak.com/topic/2014-extend-extra-extreme/), having a QMK-powered keyboard allows a super easy implementation of this concept. The idea is to place commonly-used keys under easy reach of your hands. Since I work with text often, my most common needs are things like Ctrl+Shift+arrow keys, and they're easy to access using this layer. (While technically it's four keypresses instead of just three, since it takes one key to enter the layer, that one key is a thumb button and the other three are all on the home row, so I find it much more comfortable than modifiers on a traditional keyboard.)
84
85Also featured in this layer is easy access to Tab, plus a Shift+Tab key. Alt-Tabbing back and forth, along with Ctrl-Tab, are super easy and friendly. When I need Ctrl+Alt+Delete, I typically use the ones found on this layer.
86
87## Credits
88
89* [Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme.md)
90 * User / keymap function ideas
91* [Jeremy](https://github.com/qmk/qmk_firmware/blob/master/keyboards/atreus/keymaps/jeremy/readme.md)
92 * Sanity check on the Function keys (_of course they should be in rows of 4, not rows of 3 like a number pad. Why did I ever use anything else?_)
93* [DreymaR of the Colemak forums](https://forum.colemak.com/topic/2014-extend-extra-extreme/)
94 * Original idea of the Extend layer
diff --git a/layouts/community/ergodox/replicaJunction/rules.mk b/layouts/community/ergodox/replicaJunction/rules.mk
index 8a719766c..523639cc4 100644
--- a/layouts/community/ergodox/replicaJunction/rules.mk
+++ b/layouts/community/ergodox/replicaJunction/rules.mk
@@ -1,8 +1,33 @@
1# https://docs.qmk.fm/getting_started_make_guide.html 1# https://docs.qmk.fm/getting_started_make_guide.html
2 2
3MOUSEKEY_ENABLE = yes 3# Userspace options
4TAP_DANCE_ENABLE = yes 4USER_CAPS_WORD_ENABLE = yes
5USER_NUM_WORD_ENABLE = yes
6USER_SECRETS_ENABLE = yes
7USER_SUPER_ALT_TAB_ENABLE = yes
8
9# Features to enable
10DYNAMIC_MACRO_ENABLE = yes
5KEY_LOCK_ENABLE = yes 11KEY_LOCK_ENABLE = yes
6RGBLIGHT_ENABLE = no 12
7# CONSOLE_ENABLE = no 13# Extra features that are nice but takes space. Enable only if they're
8# COMMAND_ENABLE = no 14# used in the layout.
15WPM_ENABLE = no
16# EXTRAKEY_ENABLE = no # For volume keys and similar
17# MOUSEKEY_ENABLE = no # Them mouse keys yo
18KEY_OVERRIDE_ENABLE = no
19LEADER_ENABLE = no
20TAP_DANCE_ENABLE = no
21# RGBLIGHT_ENABLE = no # Keyboard RGB underglow
22RGB_MATRIX_ENABLE = no
23
24# Features I definitely don't care aboud
25LTO_ENABLE = yes
26CONSOLE_ENABLE = no
27VERBOSE = no
28DEBUG_MATRIX_SCAN_RATE = no
29DEBUG_MATRIX = no
30MAGIC_ENABLE = no
31SPACE_CADET_ENABLE = no
32GRAVE_ESC_ENABLE = no
33
diff --git a/users/replicaJunction/config.h b/users/replicaJunction/config.h
deleted file mode 100644
index 4b58b579f..000000000
--- a/users/replicaJunction/config.h
+++ /dev/null
@@ -1,66 +0,0 @@
1#pragma once
2
3
4////////////////////////////////////////////////////////////////////////////////
5// Features That Can Be Enabled
6// https://docs.qmk.fm/reference/config-options#features-that-can-be-enabled
7////////////////////////////////////////////////////////////////////////////////
8
9////////////////////////////////////////////////////////////////////////////////
10// Behaviors That Can Be Configured
11// https://docs.qmk.fm/reference/config-options#behaviors-that-can-be-configured
12////////////////////////////////////////////////////////////////////////////////
13
14// MS the button needs to be held before a tap becomes a hold (default: 200)
15#undef TAPPING_TERM
16#define TAPPING_TERM 250
17
18// Makes it easier for fast typists to use dual-role keys. See additional details here:
19// https://docs.qmk.fm/features/advanced-keycodes#permissive-hold
20#define PERMISSIVE_HOLD
21
22// MS after tapping the Leader key to listen for a sequence (default: 300)
23#undef LEADER_TIMEOUT
24#define LEADER_TIMEOUT 750
25
26// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
27// (for example, if z becomes ctrl when you hold it, when this option isn't enabled, z rapidly
28// followed by x actually sends Ctrl-x. That's bad.)
29#define IGNORE_MOD_TAP_INTERRUPT
30
31
32
33////////////////////////////////////////////////////////////////////////////////
34// Mouse Key Options
35// https://docs.qmk.fm/reference/config-options#mouse-key-options
36////////////////////////////////////////////////////////////////////////////////
37
38#ifdef MOUSEKEY_ENABLE
39// Mouse key config
40
41// Frequency with which cursor movements are sent. Lower means more resolution / DPI.
42// Default: 20
43// #undef MOUSEKEY_INTERVAL
44// #define MOUSEKEY_INTERVAL 20
45
46// MS after pressing the key before initial movement begins. Lower means quicker response.
47// Default: 0
48// #undef MOUSEKEY_DELAY
49// #define MOUSEKEY_DELAY 0
50
51// MS it takes the cursor to accelerate to max speed
52// Default: 60
53// #undef MOUSEKEY_TIME_TO_MAX
54// #define MOUSEKEY_TIME_TO_MAX 60
55
56// Maximum speed for the mouse keys
57// Default: 7
58// #undef MOUSEKEY_MAX_SPEED
59// #define MOUSEKEY_MAX_SPEED 7
60
61// Delay before the mouse wheel
62// Default: 0
63// #undef MOUSEKEY_WHEEL_DELAY
64// #define MOUSEKEY_WHEEL_DELAY 0
65
66#endif // MOUSEKEY_ENABLE
diff --git a/users/replicaJunction/features/.gitignore b/users/replicaJunction/features/.gitignore
new file mode 100644
index 000000000..9b590ee80
--- /dev/null
+++ b/users/replicaJunction/features/.gitignore
@@ -0,0 +1,2 @@
1# Do not include the secrets definitions
2secret_definitions.h
diff --git a/users/replicaJunction/features/caps_word.c b/users/replicaJunction/features/caps_word.c
new file mode 100644
index 000000000..536da81ec
--- /dev/null
+++ b/users/replicaJunction/features/caps_word.c
@@ -0,0 +1,105 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "caps_word.h"
18
19static bool is_caps_word_on = false;
20
21bool is_caps_word_enabled(void) {
22 return is_caps_word_on;
23}
24
25void enable_caps_word(void) {
26 if (is_caps_word_on) return;
27 is_caps_word_on = true;
28 tap_code(KC_CAPS);
29}
30
31void disable_caps_word(void) {
32 if (!is_caps_word_on) return;
33 is_caps_word_on = false;
34 tap_code(KC_CAPS);
35}
36
37void toggle_caps_word(void) {
38 if (is_caps_word_on) {
39 disable_caps_word();
40 }
41 else {
42 enable_caps_word();
43 }
44}
45
46bool should_terminate_caps_word(uint16_t keycode, const keyrecord_t *record) {
47 switch (keycode) {
48 // Keycodes which should not disable caps word mode
49 case KC_A ... KC_Z:
50 case KC_1 ... KC_0:
51 case KC_MINS:
52 case KC_UNDS:
53 case KC_BSPC:
54 return false;
55
56 default:
57 if (record->event.pressed) {
58 return true;
59 }
60 return false;
61 }
62
63 // Should be unreachable
64 return false;
65}
66
67
68bool process_record_caps_word(uint16_t keycode, const keyrecord_t *record) {
69 // Nothing in this function acts on key release
70 if (!record->event.pressed) {
71 return true;
72 }
73
74 // Handle the custom keycodes that go with this feature
75 if (keycode == CAPWORD) {
76 enable_caps_word();
77 return false;
78 }
79
80 // If the behavior isn't enabled and the keypress isn't a keycode to
81 // toggle the behavior, allow QMK to handle the keypress as usual
82 if (!is_caps_word_on) {
83 return true;
84 }
85
86 // Get the base keycode of a mod or layer tap key
87 switch (keycode) {
88 case QK_MOD_TAP ... QK_MOD_TAP_MAX:
89 case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
90 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
91 // Earlier return if this has not been considered tapped yet
92 if (record->tap.count == 0)
93 return true;
94 keycode = keycode & 0xFF;
95 break;
96 default:
97 break;
98 }
99
100 if (should_terminate_caps_word(keycode, record)) {
101 disable_caps_word();
102 }
103
104 return true;
105}
diff --git a/users/replicaJunction/features/caps_word.h b/users/replicaJunction/features/caps_word.h
new file mode 100644
index 000000000..4182ce582
--- /dev/null
+++ b/users/replicaJunction/features/caps_word.h
@@ -0,0 +1,26 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include QMK_KEYBOARD_H
19#include "rj_keycodes.h"
20
21bool is_caps_word_enabled(void);
22void enable_caps_word(void);
23void disable_caps_word(void);
24void toggle_caps_word(void);
25
26bool process_record_caps_word(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/features/mouse_jiggle.c b/users/replicaJunction/features/mouse_jiggle.c
new file mode 100644
index 000000000..b2c451d33
--- /dev/null
+++ b/users/replicaJunction/features/mouse_jiggle.c
@@ -0,0 +1,46 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "mouse_jiggle.h"
18
19bool is_mouse_jiggle_active = false;
20
21void matrix_scan_mouse_jiggle(void) {
22 if (is_mouse_jiggle_active) {
23 tap_code(KC_MS_UP);
24 tap_code(KC_MS_DOWN);
25 }
26}
27
28bool process_record_mouse_jiggle(uint16_t keycode, const keyrecord_t *record) {
29 if (!record->event.pressed) {
30 return true;
31 }
32
33 if (is_mouse_jiggle_active) {
34 // If active, quit whenever another key is pressed
35 is_mouse_jiggle_active = false;
36 return true;
37 }
38
39 if (keycode != MS_JIGL) {
40 return true;
41 }
42
43 is_mouse_jiggle_active = true;
44 SEND_STRING("Mouse jiggler enabled");
45 return false;
46}
diff --git a/users/replicaJunction/features/mouse_jiggle.h b/users/replicaJunction/features/mouse_jiggle.h
new file mode 100644
index 000000000..ba2c6e757
--- /dev/null
+++ b/users/replicaJunction/features/mouse_jiggle.h
@@ -0,0 +1,23 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include QMK_KEYBOARD_H
19#include "rj_keycodes.h"
20
21void matrix_scan_mouse_jiggle(void);
22
23bool process_record_mouse_jiggle(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/features/num_word.c b/users/replicaJunction/features/num_word.c
new file mode 100644
index 000000000..4cca5c19a
--- /dev/null
+++ b/users/replicaJunction/features/num_word.c
@@ -0,0 +1,129 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "num_word.h"
18
19static uint16_t num_word_timer = 0;
20static bool is_num_word_on = false;
21
22bool is_num_word_enabled(void) {
23 return is_num_word_on;
24}
25
26void enable_num_word(void) {
27 if (is_num_word_on) return;
28 is_num_word_on = true;
29 layer_on(L_NUMBERS);
30}
31
32void disable_num_word(void) {
33 if (!is_num_word_on) return;
34 is_num_word_on = false;
35 layer_off(L_NUMBERS);
36}
37
38void toggle_num_word(void) {
39 if (is_num_word_on) {
40 disable_num_word();
41 }
42 else {
43 enable_num_word();
44 }
45}
46
47bool should_terminate_num_word(uint16_t keycode, const keyrecord_t *record) {
48 switch (keycode) {
49 // Keycodes which should not disable num word mode.
50 // We could probably be more brief with these definitions by using
51 // a couple more ranges, but I believe "explicit is better than
52 // implicit"
53 case KC_1 ... KC_0:
54 case KC_EQL:
55 case KC_SCLN:
56 case KC_MINS:
57 case KC_DOT:
58
59 // Numpad keycodes
60 case KC_P1 ... KC_P0:
61 case KC_PSLS ... KC_PPLS:
62 case KC_PDOT:
63
64 // Misc
65 case KC_UNDS:
66 case KC_BSPC:
67 return false;
68
69 default:
70 if (record->event.pressed) {
71 return true;
72 }
73 return false;
74 }
75
76 // Should be unreachable
77 return false;
78}
79
80
81bool process_record_num_word(uint16_t keycode, const keyrecord_t *record) {
82 // Handle the custom keycodes that go with this feature
83 if (keycode == NUMWORD) {
84 if (record->event.pressed) {
85 enable_num_word();
86 num_word_timer = timer_read();
87 return false;
88 }
89 else {
90 if (timer_elapsed(num_word_timer) > TAPPING_TERM) {
91 // If the user held the key longer than TAPPING_TERM,
92 // consider it a hold, and disable the behavior on
93 // key release.
94 disable_num_word();
95 return false;
96 }
97 }
98 }
99
100 // Other than the custom keycodes, nothing else in this feature will
101 // activate if the behavior is not on, so allow QMK to handle the
102 // event as usual
103 if (!is_num_word_on) return true;
104
105 // Nothing else acts on key release, either
106 if (!record->event.pressed) {
107 return true;
108 }
109
110 // Get the base keycode of a mod or layer tap key
111 switch (keycode) {
112 case QK_MOD_TAP ... QK_MOD_TAP_MAX:
113 case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
114 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
115 // Earlier return if this has not been considered tapped yet
116 if (record->tap.count == 0)
117 return true;
118 keycode = keycode & 0xFF;
119 break;
120 default:
121 break;
122 }
123
124 if (should_terminate_num_word(keycode, record)) {
125 disable_num_word();
126 }
127
128 return true;
129}
diff --git a/users/replicaJunction/features/num_word.h b/users/replicaJunction/features/num_word.h
new file mode 100644
index 000000000..194c4e2e0
--- /dev/null
+++ b/users/replicaJunction/features/num_word.h
@@ -0,0 +1,27 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include QMK_KEYBOARD_H
19#include "rj_keycodes.h"
20#include "rj_layers.h"
21
22bool is_num_word_enabled(void);
23void enable_num_word(void);
24void disable_num_word(void);
25void toggle_num_word(void);
26
27bool process_record_num_word(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/features/secrets.c b/users/replicaJunction/features/secrets.c
new file mode 100644
index 000000000..3e1ea283d
--- /dev/null
+++ b/users/replicaJunction/features/secrets.c
@@ -0,0 +1,51 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17// Before you can compile with this feature, you'll need to manually
18// create a file in this directory called "secret_definitions.h"
19// containing the data to be added.
20//
21// Example implementation:
22//
23// #pragma once
24// static const char * const secrets[] = {
25// "secret1",
26// "secret2",
27// "secret3",
28// "secret4"
29// }
30
31#include QMK_KEYBOARD_H
32#include "replicaJunction.h"
33#include "secrets.h"
34#include "secret_definitions.h"
35
36#ifndef MACRO_TIMER
37# define MACRO_TIMER 5
38#endif
39
40bool process_record_secrets(uint16_t keycode, const keyrecord_t *record) {
41 switch (keycode) {
42 case K_SECR1 ... K_SECR4: // Secrets! Externally defined strings, not stored in repo
43 if (!record->event.pressed) {
44 clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
45 send_string_with_delay(secrets[keycode - K_SECR1], MACRO_TIMER);
46 }
47 return false;
48 }
49
50 return true;
51}
diff --git a/users/replicaJunction/features/secrets.h b/users/replicaJunction/features/secrets.h
new file mode 100644
index 000000000..ef4396227
--- /dev/null
+++ b/users/replicaJunction/features/secrets.h
@@ -0,0 +1,30 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include QMK_KEYBOARD_H
19
20// NOTE: In some implementations of the "secrets" functionality, the
21// secrets.h file is the file that actually contains secret text.
22//
23// This is not the case in my implementation. That file is called
24// "secret_definitions.h", and it's in a local .gitignore file so it
25// does not get committed.
26//
27// The inclusion of this file is not an error, and there is no sensitive
28// text here.
29
30bool process_record_secrets(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/features/super_alt_tab.c b/users/replicaJunction/features/super_alt_tab.c
new file mode 100644
index 000000000..9759898c8
--- /dev/null
+++ b/users/replicaJunction/features/super_alt_tab.c
@@ -0,0 +1,52 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "super_alt_tab.h"
18
19// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab
20
21bool is_alt_tab_active = false;
22uint16_t alt_tab_timer = 0;
23
24void matrix_scan_super_alt_tab(void) {
25 if (is_alt_tab_active) {
26 if (timer_elapsed(alt_tab_timer) > USER_SUPER_ALT_TAB_TIMEOUT) {
27 unregister_code(KC_LALT);
28 is_alt_tab_active = false;
29 }
30 }
31}
32
33
34bool process_record_super_alt_tab(uint16_t keycode, const keyrecord_t *record) {
35 if (keycode != SALTTAB) {
36 return true;
37 }
38
39 if (record->event.pressed) {
40 if (!is_alt_tab_active) {
41 is_alt_tab_active = true;
42 register_code(KC_LALT);
43 }
44 alt_tab_timer = timer_read();
45 register_code(KC_TAB);
46 }
47 else {
48 unregister_code(KC_TAB);
49 }
50
51 return false;
52}
diff --git a/users/replicaJunction/features/super_alt_tab.h b/users/replicaJunction/features/super_alt_tab.h
new file mode 100644
index 000000000..8bdf2bc22
--- /dev/null
+++ b/users/replicaJunction/features/super_alt_tab.h
@@ -0,0 +1,27 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include QMK_KEYBOARD_H
19#include "rj_keycodes.h"
20
21#ifndef USER_SUPER_ALT_TAB_TIMEOUT
22# define USER_SUPER_ALT_TAB_TIMEOUT 500
23#endif
24
25void matrix_scan_super_alt_tab(void);
26
27bool process_record_super_alt_tab(uint16_t keycode, const keyrecord_t *record);
diff --git a/users/replicaJunction/keycode_aliases.h b/users/replicaJunction/keycode_aliases.h
new file mode 100644
index 000000000..b1006a863
--- /dev/null
+++ b/users/replicaJunction/keycode_aliases.h
@@ -0,0 +1,85 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include QMK_KEYBOARD_H
20
21// Transparent, but indicates that this key must be blocked (for example, a layer shift key)
22#define ooooooo KC_TRNS
23
24
25#define SFT_TAB LSFT(KC_TAB)
26#define WIN_TAB LGUI(KC_TAB)
27#define WIN_L LGUI(KC_L)
28#define WIN_V LGUI(KC_V)
29#define ALT_F4 LALT(KC_F4)
30#define CTL_DEL LCTL_T(KC_DEL)
31#define CTL_ESC CTL_T(KC_ESC)
32#define ALT_ENT ALT_T(KC_ENT)
33#define ALT_TAB ALT_T(KC_TAB)
34
35#define OSM_LSF OSM(MOD_LSFT)
36#define OSM_RSF OSM(MOD_RSFT)
37
38// OS shortcuts (Windows)
39#define OS_COPY LCTL(KC_C)
40#define OS_PAST LCTL(KC_V)
41#define OS_CUT LCTL(KC_X)
42#define OS_UNDO LCTL(KC_Z)
43#define OS_SALL LCTL(KC_A)
44#define OS_FIND LCTL(KC_F)
45
46
47// Home row modifiers
48#define GUI_A LGUI_T(KC_A)
49#define ALT_R LALT_T(KC_R)
50#define SFT_S LSFT_T(KC_S)
51#define CRT_T LCTL_T(KC_T) // we can't call this CTL_T because that name is taken!
52
53#define CRT_N RCTL_T(KC_N)
54#define SFT_E RSFT_T(KC_E)
55#define ALT_I RALT_T(KC_I)
56#define GUI_O RGUI_T(KC_O)
57
58
59// Mouse keys
60#define M_UP KC_MS_UP
61#define M_DOWN KC_MS_DOWN
62#define M_LEFT KC_MS_LEFT
63#define M_RIGHT KC_MS_RIGHT
64#define M_LCLIK KC_MS_BTN1
65#define M_RCLIK KC_MS_BTN2
66#define M_MCLIK KC_MS_BTN3
67#define M_WHLUP KC_WH_U
68#define M_WHLDN KC_WH_D
69
70
71// Windows 10 shortcuts: change desktop to the left/right
72#define DESKLFT LCTL(LGUI(KC_LEFT))
73#define DESKRGT LCTL(LGUI(KC_RGHT))
74
75
76// Application-specific shortcuts
77
78// Search: defined in Everything Search Engine as the keypress to show/hide the window
79#define SEARCH HYPR(KC_S)
80
81// Microsoft PowerToys hotkeys
82// https://github.com/microsoft/PowerToys
83#define PTYRUN LALT(KC_SPC) // PowerToys Run
84#define PTYZONE LGUI(KC_GRV) // PowerToys FancyZones
85#define PTYCOLR LGUI(LSFT(KC_C)) // PowerToys ColorPicker
diff --git a/users/replicaJunction/matrix_scan.c b/users/replicaJunction/matrix_scan.c
new file mode 100644
index 000000000..969799550
--- /dev/null
+++ b/users/replicaJunction/matrix_scan.c
@@ -0,0 +1,35 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18#include "replicaJunction.h"
19
20__attribute__ ((weak))
21void matrix_scan_user_kb(void) { }
22
23// Runs on every matrix scan. Be careful what goes here - you can really impact the
24// responsiveness of your keyboard if you add too much in this function.
25void matrix_scan_user(void) {
26#ifdef USER_MOUSE_JIGGLE_ENABLE
27 matrix_scan_mouse_jiggle();
28#endif
29
30#ifdef USER_SUPER_ALT_TAB_ENABLE
31 matrix_scan_super_alt_tab();
32#endif
33
34 matrix_scan_user_kb();
35}
diff --git a/users/replicaJunction/process_records.c b/users/replicaJunction/process_records.c
new file mode 100644
index 000000000..abce21526
--- /dev/null
+++ b/users/replicaJunction/process_records.c
@@ -0,0 +1,149 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18#include "process_records.h"
19
20uint8_t mod_state;
21
22
23__attribute__ ((weak))
24bool process_record_user_kb(uint16_t keycode, keyrecord_t *record) {
25 return true;
26}
27
28// Runs for each key down or up event.
29bool process_record_user(uint16_t keycode, keyrecord_t *record) {
30 // Returning true here will cause QMK to continue handling the key normally.
31 // Returning false indicates that we've handled everything the keycode should do, and QMK
32 // should not continue handling the keypress.
33 //
34 // NOTE: There is also a process_record_kb function that can be defined in the keyboard-
35 // specific code. This allows the keyboard to have its own process_record function.
36 // This is supposed to be "higher" than the user function, meaning the kb function
37 // is shared for all keymaps for the keyboard.
38 //
39 // For this reason, I add my own function, called process_record_user_kb, and at the end
40 // of this function, I defer to that one if it exists.
41 // return process_record_user(keycode, record);
42
43
44 // Custom keycode / function handling, based on the core function
45 // process_record_quantum
46 // https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c
47
48 if (!(
49#ifdef USER_CAPS_WORD_ENABLE
50 process_record_caps_word(keycode, record) &&
51#endif
52#ifdef USER_MOUSE_JIGGLE_ENABLE
53 process_record_mouse_jiggle(keycode, record) &&
54#endif
55#ifdef USER_NUM_WORD_ENABLE
56 process_record_num_word(keycode, record) &&
57#endif
58#ifdef USER_SECRETS_ENABLE
59 process_record_secrets(keycode, record) &&
60#endif
61#ifdef USER_SUPER_ALT_TAB_ENABLE
62 process_record_super_alt_tab(keycode, record) &&
63#endif
64 true)) {
65 return false;
66 }
67
68
69 // Miscellaneous keycode handling
70 mod_state = get_mods();
71
72 switch(keycode)
73 {
74 case QK_MAKE: {
75 if (record->event.pressed)
76 SEND_STRING("qmk compile --keyboard " QMK_KEYBOARD " --keymap " QMK_KEYMAP);
77 return false;
78 }
79 case QK_FLSH: {
80 if (record->event.pressed) {
81 SEND_STRING("qmk flash --keyboard " QMK_KEYBOARD " --keymap " QMK_KEYMAP);
82 }
83 return false;
84 }
85 case QK_VERS: {
86 if (record->event.pressed) {
87 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE);
88 }
89 return false;
90 }
91 case PRG_EQ: {
92 if (record->event.pressed) {
93 SEND_STRING("==");
94 }
95 return false;
96 }
97 case PRG_NE: {
98 if (record->event.pressed) {
99 SEND_STRING("!=");
100 }
101 return false;
102 }
103 case PRG_GEQ: {
104 if (record->event.pressed) {
105 SEND_STRING(">=");
106 }
107 return false;
108 }
109 case PRG_LEQ: {
110 if (record->event.pressed) {
111 SEND_STRING("<=");
112 }
113 return false;
114 }
115 case PRG_ARR: {
116 if (record->event.pressed) {
117 SEND_STRING("=>");
118 }
119 return false;
120 }
121
122 case PS_ITEM: {
123 if (record->event.pressed) {
124 SEND_STRING("$_");
125 }
126 return false;
127 }
128 case FS_PIPE: {
129 if (record->event.pressed) {
130 SEND_STRING("|>");
131 }
132 return false;
133 }
134 case FS_ARR: {
135 if (record->event.pressed) {
136 SEND_STRING("->");
137 }
138 return false;
139 }
140 case SHEBANG: {
141 if (record->event.pressed) {
142 SEND_STRING("#!");
143 }
144 return false;
145 }
146 }
147
148 return process_record_user_kb(keycode, record);
149}
diff --git a/users/replicaJunction/process_records.h b/users/replicaJunction/process_records.h
new file mode 100644
index 000000000..224bc6f4f
--- /dev/null
+++ b/users/replicaJunction/process_records.h
@@ -0,0 +1,21 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include QMK_KEYBOARD_H
19#include "replicaJunction.h"
20
21bool process_record_user_kb(uint16_t keycode, keyrecord_t *record);
diff --git a/users/replicaJunction/readme.md b/users/replicaJunction/readme.md
index 2a9cad272..9d728f902 100644
--- a/users/replicaJunction/readme.md
+++ b/users/replicaJunction/readme.md
@@ -1,14 +1,93 @@
1Copyright 2018 @<replicaJunction> 1replicaJunction QMK Userspace
2=============================
2 3
3This program is free software: you can redistribute it and/or modify 4# Overview
4it under the terms of the GNU General Public License as published by 5I alternate between a few keyboards, one of which is the 44-key Keyboardio Atreus. Small keyboards require a liberal use of layers. Even though larger keyboards don't rely on layers as heavily, my muscle memory adapted to my Atreus layout, so I've ended up building several of those features in my keymaps for larger boards as well.
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7 6
8This program is distributed in the hope that it will be useful, 7The result, I believe, is a good compromise between ergonomics and ease of use.
9but WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11GNU General Public License for more details.
12 8
13You should have received a copy of the GNU General Public License 9The code in this userspace is designed to be very modular. I use a few different keyboards, and I'm constantly tweaking one or another, so I want the ability to add and remove features from the firmware at compile-time. While my endgame goal is to get all the layouts to be compatible, in practice, it's been years and I'm still not to that point...
14along with this program. If not, see <http://www.gnu.org/licenses/>. \ No newline at end of file 10
11Modular code also means that it should be easy to identify and adapt specific pieces to your own firmware.
12
13## Keyboards and Keymaps
14
15The following keyboards use the files in this userspace:
16
17* [Atreus](../../keyboards/atreus/keymaps/replicaJunction/readme.md) (42-key)
18* [Ergodox](../../layouts/community/ergodox/replicaJunction/readme.md)
19* [Keyboardio Atreus](../../keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md) (44-key)
20* [XD75](../../keyboards/xd75/keymaps/replicaJunction/readme.md)
21
22# Features
23
24* **Secrets**, as [explained by Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md)
25* **CAPSWORD** and **NUMWORD**
26* Mouse jiggler
27* Super alt-tab
28
29## Secrets
30My implementation of the "secrets" concept is very similar to Drashna's, but I've chosen to allow most of the supporting code to be committed to the repo. The only thing missing is a file called `secret_definitions.h`, which contains the actual text contained in those macros.
31
32To use my implementation, create a file of that name in the same directory. Make sure you've got a `.gitignore` file in place, and add these contents to the definitions file:
33
34```c
35#pragma once
36static const char * const secrets[] = {
37 "secret1",
38 "secret2",
39 "secret3",
40 "secret4"
41}
42```
43
44Change the quoted text to the text you'd like and you're golden. If you need more (or fewer) items, you'll probably need to adjust the code in `secrets.c` as well, since it looks for up to four items in a switch case.
45
46## CAPSWORD and NUMWORD
47The concept here is simple: more often than you'd think, you need to type a single word in ALL CAPS. An easy example for me, as a programmer, is a constant value; in most programming languages, constants are typed in all caps by convention.
48
49You typically have a few choices, but each one comes with a drawback. Here are the options I'm aware of:
50
51* Use proper typing technique and alternate which hand holds Shift for each keypress
52 * This can often end up requiring you to switch / re-press Shift again and again, making this a tedious process
53* Hold a single Shift key down
54 * This can lead to uncomfortable finger gymnastics
55* Hit the Caps Lock key, then hit it again when you're done
56 * Requires you to remember to hit it again, meaning a higher cognitive load
57 * In some layouts for smaller keyboards, Caps Lock is not easily accessible (sometimes not mapped at all)
58
59The solution to this problem is CAPSWORD. When enabled, it activates Caps Lock and begins running an additional callback on each keypress. If the keypress is an alphanumeric key or one of a specific few symbols (such as the underscore), nothing happens. Otherwise, before processing the keypress, Caps Lock is disabled again.
60
61NUMWORD is a similar concept, but has a slightly more elaborate implementation. There's a bit of extra logic in the NUMWORD code that allows the keycode to act as a tap/hold key as well. Tapping enables NUMWORD while number keys are in use, while holding the key enables a number layer for the duration of the key hold and disables it again afterwards.
62
63**Note:** The implementation of NUMWORD requires that the keyboard's layer definitions be accessible in a header file. In my case, since I use a fairly standard set of layers, I've declared it in my userspace.
64
65## Mouse Jiggler
66This adds a keycode that will move the mouse cursor on each matrix scan. Used to prevent the screen from locking if you're temporarily doing something else (working on a different machine, reading / writing, etc.).
67
68When you press the keycode, the keyboard will write the text "Mouse jiggler enabled" to signify that the behavior is active. I suggest opening a Notepad window before pressing the key.
69
70Pressing any key will automatically disable the feature again. This is because it causes a huge hit to the reliability and performance of the keyboard while it's active (adding stuff to every matrix scan will do that). I kept forgetting to turn it off before trying to use the keyboard again, so I decided to make it automatically disable itself.
71
72Enable this by setting `USER_MOUSE_JIGGLE_ENABLE = yes` in your `rules.mk` file. The feature also depends on the Mouse Keys feature, so ensure you don't disable `MOUSEKEY_ENABLE`.
73
74## Super Alt-Tab
75Taken [straight out of the QMK documentation](https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab), this is an easy way to shift between a couple different windows. I use it with a very low interval when I'm alternating back and forth between two known windows with no real need for the visual feedback and thought. If you want to be able to browse the open windows before the function releases Alt, I'd suggest raising `USER_SUPER_ALT_TAB_TIMEOUT` to a higher value.
76
77# Credits
78I'm absolutely sure I've missed a few sources here. If you see something in my code that you think is yours and isn't credited here, I sincerely apologize.
79
80[bpruitt-goddard](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/bpruitt-goddard/readme.md)
81* Dynamic macro tap-dance (no longer used, but I did use this for a while)
82
83[Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme.md)
84* Secrets concept and basic implementation
85* "Wrappers" concept (no longer used, but I did use this for a while)
86
87[Treeman](https://github.com/treeman/qmk_firmware/blob/master/keyboards/kyria/keymaps/treeman)
88* CAPSWORD and NUMBERWORD concept
89 * I re-implented some of the code based on my own prefences, but I did use some implementation code from here
90 * [Treeman's blog post](https://www.jonashietala.se/blog/2021/06/03/the-t-34-keyboard-layout/) provides more context on these features, and is a great read
91
92[QMK issue #452](https://github.com/qmk/qmk_firmware/issues/452)
93* Helped clarify a good organizational structure for the individual features in this userspace
diff --git a/users/replicaJunction/replicaJunction.c b/users/replicaJunction/replicaJunction.c
index f0bc59d25..55d8b7716 100644
--- a/users/replicaJunction/replicaJunction.c
+++ b/users/replicaJunction/replicaJunction.c
@@ -1,149 +1,25 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
1#include "replicaJunction.h" 18#include "replicaJunction.h"
2#include "version.h"
3
4#ifdef TAP_DANCE_ENABLE
5void dance_layer(qk_tap_dance_state_t *state, void *user_data)
6{
7 uint8_t layer = biton32(layer_state);
8
9 if (state->count >= 5)
10 {
11 // 5 or more taps resets the keyboard
12 reset_keyboard();
13 }
14 #ifdef L_QWERTY
15 else if (state->count == 3)
16 {
17 // Triple tap changes to QWERTY layer
18 if (layer == L_QWERTY)
19 {
20 layer_off(L_QWERTY);
21 }
22 else
23 {
24 layer_on(L_QWERTY);
25 }
26 }
27 #endif
28 #ifdef L_NUM
29 else if (state->count == 2)
30 {
31 // Double tap toggles Number layer
32 if (layer == L_NUM)
33 {
34 layer_off(L_NUM);
35 }
36 else
37 {
38 layer_on(L_NUM);
39 }
40 }
41 #endif
42 else
43 {
44 // Single tap sends Escape, and also turns off layers
45 // That's mostly in case I get stuck and forget where I am
46 #ifdef L_NUM
47 layer_off(L_NUM);
48 #endif
49 #ifdef L_EXTEND
50 layer_off(L_EXTEND);
51 #endif
52 #ifdef L_SYMBOL
53 layer_off(L_SYMBOL);
54 #endif
55 #ifdef L_QWERTY
56 layer_off(L_QWERTY);
57 #endif
58 register_code(KC_ESC);
59 unregister_code(KC_ESC);
60 }
61};
62
63// Tap Dance Definitions
64// Note - this needs to come AFTER the function is declared
65qk_tap_dance_action_t tap_dance_actions[] = {
66 [TD_LAYER_TOGGLE] = ACTION_TAP_DANCE_FN(dance_layer)
67};
68
69#endif // TAP_DANCE_ENABLE
70
71// These functions can be overridden in individual keymap files.
72// This allows a user function to be shared for all my keyboards, while each
73// keyboard can also have a keyboard-specific section.
74
75// Note that keymaps don't need to override these if there's nothing to
76// override them with.
77__attribute__ ((weak))
78void matrix_init_keymap(void) {}
79 19
80__attribute__ ((weak)) 20__attribute__ ((weak))
81void matrix_scan_keymap(void) {} 21void keyboard_post_init_user_kb(void) { }
82 22
83__attribute__ ((weak)) 23void keyboard_post_init_user(void) {
84bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { 24 keyboard_post_init_user_kb();
85 return true;
86};
87
88// Runs just one time when the keyboard initializes.
89void matrix_init_user(void) {
90 #ifdef UNICODEMAP_ENABLE
91 // Set Unicode input to use WinCompose
92 // https://github.com/samhocevar/wincompose
93 set_unicode_input_mode(UC_WINC);
94 #endif // UNICODEMAP_ENABLE
95
96 matrix_init_keymap();
97};
98
99// Runs constantly in the background, in a loop.
100void matrix_scan_user(void) {
101 matrix_scan_keymap();
102} 25}
103
104bool process_record_user(uint16_t keycode, keyrecord_t *record) {
105 if (record->event.pressed)
106 return true;
107
108 switch(keycode)
109 {
110 case RJ_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
111 SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
112 #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
113 ":dfu"
114 #elif defined(BOOTLOADER_HALFKAY)
115 ":teensy"
116 #elif defined(BOOTLOADER_CATERINA)
117 ":avrdude"
118 #endif // bootloader options
119 //SS_TAP(X_ENTER)
120 );
121 return false;
122 case RJ_QMKV:
123 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
124 return false;
125 case RJ_EQ:
126 SEND_STRING("==");
127 return false;
128 case RJ_NEQ:
129 SEND_STRING("!=");
130 return false;
131 case RJ_GEQ:
132 SEND_STRING(">=");
133 return false;
134 case RJ_LEQ:
135 SEND_STRING("<=");
136 return false;
137 case RJ_GEQR:
138 SEND_STRING("=>");
139 return false;
140 case RJ_DUND:
141 SEND_STRING("$_");
142 return false;
143 case RJ_SELS:
144 SEND_STRING("select *");
145 return false;
146 }
147
148 return process_record_keymap(keycode, record);
149};
diff --git a/users/replicaJunction/replicaJunction.h b/users/replicaJunction/replicaJunction.h
index 9b5772543..f3b7bcea0 100644
--- a/users/replicaJunction/replicaJunction.h
+++ b/users/replicaJunction/replicaJunction.h
@@ -1,114 +1,42 @@
1#pragma once 1/* Copyright 2021 Joshua T.
2 2 *
3#include "quantum.h" 3 * This program is free software: you can redistribute it and/or modify
4 4 * it under the terms of the GNU General Public License as published by
5/////////////////////////////////////////////////////////////////////////////// 5 * the Free Software Foundation, either version 2 of the License, or
6// Keymap definitions 6 * (at your option) any later version.
7/////////////////////////////////////////////////////////////////////////////// 7 *
8 8 * This program is distributed in the hope that it will be useful,
9// Layer definitions 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10// #define L_COLEMAK 0 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// #define L_QWERTY 1 11 * GNU General Public License for more details.
12// #define L_NUM 2 12 *
13// #define L_EXTEND 3 13 * You should have received a copy of the GNU General Public License
14// #define L_FUNC 4 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15// #define L_GAMING 5 15 */
16// #define L_SYMBOL 6
17// #define L_LL_R 7
18// #define L_LL_S 8
19// #define L_LL_E 9
20// #define L_LL_I 10
21
22// Keyboard aliases
23#define ooooooo KC_TRNS
24
25#define MO_FUNC MO(L_FUNC)
26#define TT_NUM TT(L_NUM)
27#define TG_GAME TG(L_GAMING)
28#define OSL_SYM OSL(L_SYMBOL)
29
30#define OSM_LSF OSM(MOD_LSFT)
31#define OSM_RSF OSM(MOD_RSFT)
32
33#define KX_CTSF LCTL(KC_LSFT)
34#define KX_STAB LSFT(KC_TAB)
35#define KX_CGR LCTL(KC_GRV)
36#define KX_PAST LCTL(LGUI(LALT(KC_V)))
37#define KX_SRCH LCTL(LGUI(LALT(KC_S)))
38 16
39#define KX_BKNM LT(L_NUM, KC_BSPC) 17#pragma once
40#define KX_DCTL CTL_T(KC_DEL) 18#include QMK_KEYBOARD_H
41#define KX_NALT ALT_T(KC_ENT) 19#include "rj_keycodes.h"
42#define KX_ECTL CTL_T(KC_ESC) 20#include "rj_layers.h"
43#define KX_SPAC LT(L_EXTEND, KC_SPC) 21#include "keycode_aliases.h"
44 22#include "version.h"
45#define KX_Z_MT CTL_T(KC_Z) 23
46#define KX_X_MT GUI_T(KC_X) 24#ifdef USER_CAPS_WORD_ENABLE
47#define KX_C_MT MT(MOD_LCTL | MOD_LALT, KC_C) 25# include "features/caps_word.h"
48#define KX_D_MT ALT_T(KC_D)
49
50#define KX_SLMT CTL_T(KC_SLSH)
51#define KX_DOMT GUI_T(KC_DOT)
52#define KX_COMT MT(MOD_LCTL | MOD_LALT, KC_COMM)
53#define KX_H_MT ALT_T(KC_H)
54
55#ifdef L_LL_R
56 #define KC_R_LT LT(L_LL_R, KC_R)
57#else
58 #define KC_R_LT KC_R
59#endif 26#endif
60 27
61#ifdef L_LL_S 28#ifdef USER_MOUSE_JIGGLE_ENABLE
62 #define KC_S_LT LT(L_LL_S, KC_S) 29# include "features/mouse_jiggle.h"
63#else
64 #define KC_S_LT KC_S
65#endif 30#endif
66 31
67#ifdef L_LL_E 32#ifdef USER_NUM_WORD_ENABLE
68 #define KC_E_LT LT(L_LL_E, KC_E) 33# include "features/num_word.h"
69#else
70 #define KC_E_LT KC_E
71#endif 34#endif
72 35
73#ifdef L_LL_I 36#ifdef USER_SECRETS_ENABLE
74 #define KC_I_LT LT(L_LL_I, KC_I) 37# include "features/secrets.h"
75#else
76 #define KC_I_LT KC_I
77#endif 38#endif
78 39
79// "Macro" functions 40#ifdef USER_SUPER_ALT_TAB_ENABLE
80enum userspace_custom_keycodes { 41# include "features/super_alt_tab.h"
81 RJ_MAKE = SAFE_RANGE, // QMK make command 42#endif
82 RJ_QMKV, // QMK version
83 RJ_EQ, // ==
84 RJ_NEQ, // !=
85 RJ_GEQ, // >=
86 RJ_LEQ, // <=
87 RJ_GEQR, // => ("greater than or equal - right")
88 RJ_DUND, // $_
89 RJ_SELS, // select * (used for PowerShell)
90 RJ_MUTE, // Discord mute (GUI+Shift+M)
91 RJ_DEAF, // Discord deafen (GUI+Shift+D)
92 RJ_DOVR // Toggle Discord overlay (GUI+Shift+O)
93};
94
95// Mouse keys
96#define M_UP KC_MS_UP
97#define M_DOWN KC_MS_DOWN
98#define M_LEFT KC_MS_LEFT
99#define M_RIGHT KC_MS_RIGHT
100#define M_LCLIK KC_MS_BTN1
101#define M_RCLIK KC_MS_BTN2
102#define M_MCLIK KC_MS_BTN3
103#define M_WHLUP KC_WH_U
104#define M_WHLDN KC_WH_D
105
106// Used in macro definitions
107#define TAP(code) register_code (code); unregister_code (code);
108
109// Tap Dance
110#ifdef TAP_DANCE_ENABLE
111#define TD_LAYER_TOGGLE 0
112extern void dance_layer(qk_tap_dance_state_t *state, void *user_data);
113#define TD_LAYR TD(TD_LAYER_TOGGLE)
114#endif // TAP_DANCE_ENABLE
diff --git a/users/replicaJunction/rj_keycodes.h b/users/replicaJunction/rj_keycodes.h
new file mode 100644
index 000000000..fde2698df
--- /dev/null
+++ b/users/replicaJunction/rj_keycodes.h
@@ -0,0 +1,63 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include QMK_KEYBOARD_H
19
20// Custom keycodes and macros
21enum userspace_custom_keycodes {
22 QK_MAKE = SAFE_RANGE, // QMK make command
23 QK_FLSH, // QMK flash command
24 QK_VERS, // QMK version
25
26 // Programming macros
27 PRG_EQ, // ==
28 PRG_NE, // !=
29 PRG_GEQ, // >=
30 PRG_LEQ, // <=
31 PRG_ARR, // =>
32 PS_ITEM, // $_ (PowerShell - $PSItem variable)
33 FS_PIPE, // |> (F# pipe operator)
34 FS_ARR, // -> (F# lambda / pattern matching)
35 SHEBANG, // #!
36
37 // USER_CAPS_WORD_ENABLE
38 CAPWORD,
39
40#ifdef USER_NUM_WORD_ENABLE
41 NUMWORD,
42#endif
43
44 // USER_ENABLE_CUSTOM_SHIFT_CODES
45 // Custom characters that send different symbols than usual when shifted
46 KCC_COM, // , or !
47 KCC_DOT, // . or @
48 KCC_QUO, // ' or ~
49
50 // USER_MOUSE_JIGGLE_ENABLE
51 MS_JIGL,
52
53 // USER_ENABLE_SUPER_ALT_TAB
54 SALTTAB,
55
56 // USER_ENABLE_SECRETS
57 K_SECR1,
58 K_SECR2,
59 K_SECR3,
60 K_SECR4,
61
62 DYNAMIC_MACRO_RANGE
63};
diff --git a/users/replicaJunction/rj_layers.h b/users/replicaJunction/rj_layers.h
new file mode 100644
index 000000000..f6296af05
--- /dev/null
+++ b/users/replicaJunction/rj_layers.h
@@ -0,0 +1,40 @@
1/* Copyright 2021 Joshua T.
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19enum rj_layers {
20 L_BASE,
21
22#ifdef USER_INCLUDE_QWERTY
23 L_QWERTY,
24#endif
25
26#ifdef USER_INCLUDE_GAMING_LAYER
27 L_GAMING,
28#endif
29
30 L_NUMBERS,
31 L_SYMBOLS,
32 L_NAVIGATION,
33 L_FN,
34
35#ifdef USER_INCLUDE_MACRO_LAYER
36 L_MACROS,
37#endif
38
39 _LAYER_SAFE_RANGE
40};
diff --git a/users/replicaJunction/rules.mk b/users/replicaJunction/rules.mk
index 30a330195..addaa04d9 100644
--- a/users/replicaJunction/rules.mk
+++ b/users/replicaJunction/rules.mk
@@ -1 +1,33 @@
1SRC += replicaJunction.c 1SRC += replicaJunction.c
2
3# Only load these source files if the features are enabled. Keyboards can
4# enable or disable these features in their own rules.mk files.
5
6ifeq ($(strip $(USER_CAPS_WORD_ENABLE)), yes)
7 SRC += features/caps_word.c
8 OPT_DEFS += -DUSER_CAPS_WORD_ENABLE
9endif
10
11ifeq ($(strip $(USER_MOUSE_JIGGLE_ENABLE)), yes)
12 SRC += features/mouse_jiggle.c
13 OPT_DEFS += -DUSER_MOUSE_JIGGLE_ENABLE
14endif
15
16ifeq ($(strip $(USER_NUM_WORD_ENABLE)), yes)
17 SRC += features/num_word.c
18 OPT_DEFS += -DUSER_NUM_WORD_ENABLE
19endif
20
21ifeq ($(strip $(USER_SECRETS_ENABLE)), yes)
22 SRC += features/secrets.c
23 OPT_DEFS += -DUSER_SECRETS_ENABLE
24endif
25
26ifeq ($(strip $(USER_SUPER_ALT_TAB_ENABLE)), yes)
27 SRC += features/super_alt_tab.c
28 OPT_DEFS += -DUSER_SUPER_ALT_TAB_ENABLE
29endif
30
31# Define these last so any other logic can set up some defines first
32SRC += matrix_scan.c \
33 process_records.c