diff options
Diffstat (limited to 'users/ericgebhart/edge_keys.h')
| -rw-r--r-- | users/ericgebhart/edge_keys.h | 238 |
1 files changed, 238 insertions, 0 deletions
diff --git a/users/ericgebhart/edge_keys.h b/users/ericgebhart/edge_keys.h new file mode 100644 index 000000000..f37425322 --- /dev/null +++ b/users/ericgebhart/edge_keys.h | |||
| @@ -0,0 +1,238 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | ||
| 3 | Copyright 2018 Eric Gebhart <e.a.gebhart@gmail.com> | ||
| 4 | |||
| 5 | This program is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU General Public License as published by | ||
| 7 | the Free Software Foundation, either version 2 of the License, or | ||
| 8 | (at your option) any later version. | ||
| 9 | |||
| 10 | This program is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include "core_keysets.h" | ||
| 20 | |||
| 21 | /******************************************************************/ | ||
| 22 | /* This is where I put my Keyboard layouts, Everything on the */ | ||
| 23 | /* edges, the functions on keys like LT() and SFT_T() */ | ||
| 24 | /* can be applied here. The physical shape of the keyboard is */ | ||
| 25 | /* also accounted for here. This makes it very simple to add a */ | ||
| 26 | /* new keyboard and reuse all of my layouts and layers */ | ||
| 27 | /* */ | ||
| 28 | /* The particular pieces we define here (as needed) are: */ | ||
| 29 | /* * Edge pinky keys, */ | ||
| 30 | /* * Middle section keys */ | ||
| 31 | /* * Bottom/5th row */ | ||
| 32 | /* * Thumbkeys */ | ||
| 33 | /* * Any functional additions to wrap the keys. ie. LT() */ | ||
| 34 | /* */ | ||
| 35 | /* With all of that in hand, we then create a LAYOUT wrapper */ | ||
| 36 | /* macro that takes a list of keys, to create a keyboard matrix */ | ||
| 37 | /* that fits the keyboard. Simple. */ | ||
| 38 | /* */ | ||
| 39 | /* The thumb keys, the bottom rows, etc. */ | ||
| 40 | /* */ | ||
| 41 | /* An attempt has been made to adapt the kinesis and ergodox */ | ||
| 42 | /* Thumb keys to the rectangular shapes of the xd75 and viterbi. */ | ||
| 43 | /* which are 15x and 14x matrices respectively. */ | ||
| 44 | /* The Corne was a perfect fit */ | ||
| 45 | /******************************************************************/ | ||
| 46 | |||
| 47 | /******************************************************************/ | ||
| 48 | /* * The XD75 is a 5x15 Ortholinear matrix which means it has 3 */ | ||
| 49 | /* keys inbetween the usual left and right hand keys */ | ||
| 50 | /* * The Viterbi is a split 5x14 Ortholinear with 2 middle keys. */ | ||
| 51 | /* * The Ergodox is a split 5x14 Ortholinear with 2 middle keys, */ | ||
| 52 | /* thumbkeys. It is missing middle keys on (home) row 3. */ | ||
| 53 | /* * The Corne is a split 3x12 with 6 thumb keys. It has no */ | ||
| 54 | /* extra middle keys */ | ||
| 55 | /* */ | ||
| 56 | /******************************************************************/ | ||
| 57 | |||
| 58 | |||
| 59 | /******************************************************************/ | ||
| 60 | /* In all cases these keyboards are defined in a matrix which is */ | ||
| 61 | /* a set of rows. Maybe like so, or not. */ | ||
| 62 | /* */ | ||
| 63 | /* -------------------------|------------------------ */ | ||
| 64 | /* | Left0 | Numbers L | mid|dle0 | numbers R | Right0 | */ | ||
| 65 | /* | Left1 | keys0-5 | mid|dle1 | Keys6-10 | Right1 | */ | ||
| 66 | /* | Left2 | keys11-15 | mid|dle2 | Keys16-20 | Right2 | */ | ||
| 67 | /* | Left3 | keys20-25 | mid|dle3 | Keys25-30 | Right3 | */ | ||
| 68 | /* | Row5L | Row5R | */ | ||
| 69 | /* | ThumbsL | ThumbsR | */ | ||
| 70 | /* -------------------------|------------------------ */ | ||
| 71 | |||
| 72 | /* Generally speaking, the keys on the right and left don't change. */ | ||
| 73 | /* Neither does the bottom row or the thumbs. Frequently the numbers */ | ||
| 74 | /* row is identical across layers. Mostly, we want our Base layers to */ | ||
| 75 | /* be predctable. */ | ||
| 76 | |||
| 77 | // EDGES | ||
| 78 | // outside pinky keys row 0-3. | ||
| 79 | // Qwerty and Bepo, - Applies | ||
| 80 | // to foreign layouts on bepo. dvorak_bp, beakl_bp. | ||
| 81 | #define LEFT0 KC_GRV | ||
| 82 | #define LEFT1 KC_GRV | ||
| 83 | #define LEFT2 KC_TAB | ||
| 84 | #define LEFT3 KC_BSLASH | ||
| 85 | //#define LEFT3 KC_COLN | ||
| 86 | |||
| 87 | #define LEFT0_BP DB_GRV | ||
| 88 | #define LEFT1_BP DB_GRV | ||
| 89 | #define LEFT2_BP KC_TAB | ||
| 90 | #define LEFT3_BP DB_BACKSLASH | ||
| 91 | //#define LEFT3_BP BP_COLN | ||
| 92 | |||
| 93 | #define RIGHT0 KC_EQL | ||
| 94 | #define RIGHT1 KC_SLASH | ||
| 95 | #define RIGHT2 KC_MINS | ||
| 96 | #define RIGHT3 KC_SCLN | ||
| 97 | |||
| 98 | #define RIGHT0_BP BP_EQL | ||
| 99 | #define RIGHT1_BP BP_SLSH | ||
| 100 | #define RIGHT2_BP BP_MINS | ||
| 101 | #define RIGHT3_BP BP_SCLN | ||
| 102 | |||
| 103 | /******************************************************************/ | ||
| 104 | /* Middle Keysets for various keyboards */ | ||
| 105 | // MIDDLES | ||
| 106 | /// Middle left and right keys. | ||
| 107 | /******************************************************************/ | ||
| 108 | #define ___MIDDLE_LT___ OSL(_LAYERS) | ||
| 109 | #define ___MIDDLE_L1___ KC_CCCV | ||
| 110 | #define ___MIDDLE_L2___ TO(_SYMB) | ||
| 111 | #define ___MIDDLE_L3___ TO(_NAV) | ||
| 112 | |||
| 113 | #define ___MIDDLE_RT___ _X_ | ||
| 114 | #define ___MIDDLE_R1___ KC_CCCV | ||
| 115 | #define ___MIDDLE_R2___ TO(_TOPROWS) | ||
| 116 | #define ___MIDDLE_R3___ OSL(_KEYPAD) | ||
| 117 | |||
| 118 | #define ___MIDDLE_L1_BP___ BP_CCCV | ||
| 119 | #define ___MIDDLE_L2_BP___ TO(_SYMB_BP) | ||
| 120 | |||
| 121 | #define ___MIDDLE_R1_BP___ BP_CCCV | ||
| 122 | #define ___MIDDLE_R2_BP___ TO(_KEYPAD_BP) | ||
| 123 | #define ___MIDDLE_R3_BP___ OSL(_KEYPAD_BP) | ||
| 124 | |||
| 125 | // 3 keys in the middle of a 15x matrix | ||
| 126 | #define ___3_MIDDLE_T___ ___MIDDLE_LT___, LCTL(KC_A), ___MIDDLE_RT___ | ||
| 127 | #define ___3_MIDDLE_1___ ___MIDDLE_L1___, LCTL(KC_X), ___MIDDLE_R1___ | ||
| 128 | #define ___3_MIDDLE_2___ ___MIDDLE_L2___, TO(_RGB), ___MIDDLE_R2___ | ||
| 129 | #define ___3_MIDDLE_3___ ___MIDDLE_L3___, TO(_SYMB), ___MIDDLE_R3___ | ||
| 130 | |||
| 131 | // The same, for BEPO | ||
| 132 | #define ___3_MIDDLE_T_BP___ ___MIDDLE_LT___, LCTL(BP_A), ___MIDDLE_RT___ | ||
| 133 | #define ___3_MIDDLE_1_BP___ ___MIDDLE_L1_BP___, LCTL(BP_X), ___MIDDLE_R1_BP___ | ||
| 134 | #define ___3_MIDDLE_2_BP___ ___MIDDLE_L2_BP___, TO(_RGB), ___MIDDLE_R2_BP___ | ||
| 135 | #define ___3_MIDDLE_3_BP___ ___MIDDLE_L3___, TO(_SYMB_BP), ___MIDDLE_R3_BP___ | ||
| 136 | |||
| 137 | // 2 keys in the middle of a 14x matrix - For viterbi and ergodox. | ||
| 138 | #define ___2_MIDDLE_T___ ___MIDDLE_LT___, ___MIDDLE_RT___ | ||
| 139 | #define ___2_MIDDLE_1___ ___MIDDLE_L1___, ___MIDDLE_R1___ | ||
| 140 | #define ___2_MIDDLE_2___ ___MIDDLE_L2___, ___MIDDLE_R2___ | ||
| 141 | #define ___2_MIDDLE_3___ ___MIDDLE_L3___, ___MIDDLE_R3___ | ||
| 142 | |||
| 143 | // The same, for BEPO | ||
| 144 | #define ___2_MIDDLE_T_BP___ ___MIDDLE_LT___, ___MIDDLE_RT___ | ||
| 145 | #define ___2_MIDDLE_1_BP___ ___MIDDLE_L1_BP___, ___MIDDLE_R1_BP___ | ||
| 146 | #define ___2_MIDDLE_2_BP___ ___MIDDLE_L2_BP___, ___MIDDLE_R2_BP___ | ||
| 147 | #define ___2_MIDDLE_3_BP___ ___MIDDLE_L3___, ___MIDDLE_R3_BP___ | ||
| 148 | |||
| 149 | /********************************************************************/ | ||
| 150 | /* THUMBS */ | ||
| 151 | /* Define the thumb clusters for all the keyboards. */ | ||
| 152 | /********************************************************************/ | ||
| 153 | |||
| 154 | // for xd75 or other layouts with a center column. | ||
| 155 | // #define ___5_MIDDLE_THUMBS___ CTL_BSPC, ALT_DEL, XMONAD_ESC, ALT_ENT, CTL_SPC | ||
| 156 | #define ___5_MIDDLE_THUMBS___ ALT_DEL, BSPC_TOPR, ESC_SYMB, ENT_NAV, SPC_TOPR | ||
| 157 | #define ___5_MIDDLE_THUMBS_BP___ ALT_DEL, BSPC_TOPR_BP, ESC_SYMB_BP, ENT_NAV, SPC_TOPR_BP | ||
| 158 | |||
| 159 | // for a last, 4th thumb row. for rebound. | ||
| 160 | // backtab, home end, ----, pgup, pgdn, tab ? | ||
| 161 | #define ___13_BOTTOM___ \ | ||
| 162 | KC_BKTAB, HOME_END, KC_TAB, TT(_NAV), BSPC_SYMB, ESC_TOPR, \ | ||
| 163 | OSL(_LAYERS), \ | ||
| 164 | ENT_NAV, SPC_TOPR, KC_LEFT, KC_PGUP, KC_PGDN, KC_RIGHT | ||
| 165 | |||
| 166 | #define ___13_BOTTOM_BP___ \ | ||
| 167 | KC_BKTAB, HOME_END, KC_TAB, TT(_NAV), BSPC_SYMB_BP, ESC_TOPR_BP, \ | ||
| 168 | OSL(_LAYERS), \ | ||
| 169 | ENT_NAV, SPC_TOPR_BP, KC_LEFT, KC_PGUP, KC_PGDN, KC_RIGHT | ||
| 170 | |||
| 171 | // becomes the upper thumbs, the real 4th row if we throw away | ||
| 172 | // the number row at the top. | ||
| 173 | // this is the 4th row on the viterbi above the thumbrow if the number | ||
| 174 | // row is not used for numbers. | ||
| 175 | #define ___4_MIDDLE_4___ LSFT(KC_TAB), HOME_END, KC_PGDN, KC_TAB | ||
| 176 | #define ___4_MIDDLE_4b___ TAB_BKTAB, HOME_END, KC_PGDN, KC_PGUP | ||
| 177 | |||
| 178 | /********************************************************************/ | ||
| 179 | /** The bottom row and thumbs as needed. **/ | ||
| 180 | /********************************************************************/ | ||
| 181 | // I do not use those pinky keys. I had useful things there but there | ||
| 182 | // are better more useful ways than those pinkys. | ||
| 183 | #define ___5_BOTTOM_LEFT___ ___X2___, KC_INS, KC_LEFT, KC_RIGHT | ||
| 184 | #define ___5_BOTTOM_RIGHT___ KC_UP, KC_DOWN, KC_BSLASH, ___X2___ | ||
| 185 | |||
| 186 | #define ___4_BOTTOM_LEFT___ LCTL(KC_V), KC_INS, KC_LEFT, KC_RIGHT | ||
| 187 | #define ___4_BOTTOM_RIGHT___ KC_UP, KC_DOWN, KC_BSLASH, LCTL(KC_C) | ||
| 188 | |||
| 189 | // the bottom rows for keyboards on bepo. | ||
| 190 | // bepo on bepo - not enough space to go around.... | ||
| 191 | #define ___5_BOTTOM_LEFT_BP___ _X_, BP_EACU, _X_, KC_LEFT, KC_RIGHT | ||
| 192 | #define ___5_BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC | ||
| 193 | |||
| 194 | #define ___4_BOTTOM_LEFT_BP___ LCTL(BP_C), BP_EACU, KC_LEFT, KC_RIGHT | ||
| 195 | #define ___4_BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED | ||
| 196 | |||
| 197 | // for dvorak and beakl on bepo | ||
| 198 | #define ___5_BOTTOM_LEFT_FR___ ___X3___, KC_LEFT, KC_RIGHT | ||
| 199 | #define ___5_BOTTOM_RIGHT_FR___ KC_UP, KC_DOWN, DB_BACKSLASH, ___X2___ | ||
| 200 | |||
| 201 | // basically a 5th row in a 5x matrix. but maybe a 4th if there isnt a number row. | ||
| 202 | #define ___15_BOTTOM___ ___5_BOTTOM_LEFT___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT___ | ||
| 203 | #define ___15_BOTTOM_FR___ ___5_BOTTOM_LEFT_FR___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT_FR___ | ||
| 204 | #define ___15_BOTTOM_BP___ ___5_BOTTOM_LEFT_BP___, ___5_MIDDLE_THUMBS___, ___5_BOTTOM_RIGHT_BP___ | ||
| 205 | |||
| 206 | #define ___14_BOTTOM___ ___5_BOTTOM_LEFT___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT___ | ||
| 207 | #define ___14_BOTTOM_FR___ ___5_BOTTOM_LEFT_FR___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT_FR___ | ||
| 208 | #define ___14_BOTTOM_BP___ ___5_BOTTOM_LEFT_BP___, ___4_MIDDLE_4b___, ___5_BOTTOM_RIGHT_BP___ | ||
| 209 | #define ___14_THUMBS_BOTTOM___ ___X4___, ___6_MIDDLE_THUMBS___, ___X4___ | ||
| 210 | |||
| 211 | // bottom row of ergodox thumbs, bottom middle of all layouts. | ||
| 212 | // start with the minimilist thumb row of 6, like the Corne, 2x3. | ||
| 213 | |||
| 214 | #define ___THUMBS_1___ TT(_KEYPAD), MO(_ADJUST), MO(_LAYERS), OSL(_TOPROWS) | ||
| 215 | #define ___THUMBS_1_BP___ TT(_KEYPAD_BP), MO(_ADJUST), MO(_LAYERS), OSL(_TOPROWS_BP) | ||
| 216 | #define ___THUMBS_2___ HOME_END, KC_PGUP | ||
| 217 | #define ___THUMBS_3___ ___6_ERGO_THUMBS___ | ||
| 218 | |||
| 219 | #define ___4_THUMBS_1_BP___ TT(_KEYPAD_BP), KC_HOME, KC_PGUP, OSL(_TOPROWS_BP) | ||
| 220 | #define ___4_THUMBS_1___ TT(_KEYPAD), KC_HOME, KC_PGUP, OSL(_TOPROWS) | ||
| 221 | #define ___6_THUMBS_2___ KC_LSFT, KC_BKTAB, KC_END, KC_PGDN, KC_TAB, KC_RSFT | ||
| 222 | |||
| 223 | #define ___6_THUMBS_2b___ BSPC_SYMB, ESC_TOPR, KC_END, KC_PGUP, ENT_NAV, SPC_TOPR | ||
| 224 | #define ___6_ERGO_THUMBSb___ TT(_LAYERS), BSPC_SYMB, KC_XM_PORD, KC_PGDN, TT(_NAV), KC_XM_PORD | ||
| 225 | #define ___6_THUMBS_2b_BP___ BSPC_SYMB_BP, ESC_TOPR_BP, KC_END, KC_PGDN, ENT_TOPR_BP, SPC_NAV | ||
| 226 | |||
| 227 | #define ___6_ERGO_THUMBS___ TT(_NAV), BSPC_SYMB, ESC_TOPR, ENT_NAV, SPC_TOPR, KC_XM_PORD | ||
| 228 | #define ___6_ERGO_THUMBS_BP___ TT(_NAV), BSPC_SYMB_BP, ESC_TOPR, ENT_NAV, SPC_TOPR_BP, BP_XM_PORD | ||
| 229 | |||
| 230 | #define ___6_MIDDLE_THUMBS___ ___6_ERGO_THUMBS___ | ||
| 231 | |||
| 232 | #define ___12_DOX_ALL_THUMBS___ ___THUMBS_1___, ___THUMBS_2___, ___THUMBS_3___ | ||
| 233 | #define ___12_DOX_ALL_THUMBS_BP___ ___THUMBS_1_BP___, ___THUMBS_2___, ___THUMBS_3___ | ||
| 234 | |||
| 235 | #define ___16_ALL_THUMBSb___ ___4_THUMBS_1___, ___6_THUMBS_2b___, ___6_ERGO_THUMBSb___ | ||
| 236 | #define ___16_ALL_THUMBS___ ___4_THUMBS_1___, ___6_THUMBS_2___, ___6_ERGO_THUMBS___ | ||
| 237 | #define ___16_ALL_THUMBSb_BP___ ___4_THUMBS_1_BP___, ___6_THUMBS_2b_BP___, ___6_ERGO_THUMBS___ | ||
| 238 | #define ___16_ALL_THUMBS_BP___ ___4_THUMBS_1_BP___, ___6_THUMBS_2_BP___, ___6_ERGO_THUMBS_BP___ | ||
