keymap.c (10517B)
1 /* 2 * Good on you for modifying your layout, this is the most nonQMK layout you will come across 3 * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer 4 * 5 * Don't modify the steno layer directly, instead add chords using the keycodes and macros 6 * from sten.h to the layout you want to modify. 7 * 8 * Observe the comment above processQWERTY! 9 * 10 * http://docs.gboards.ca 11 */ 12 13 #include QMK_KEYBOARD_H 14 #include "sten.h" 15 16 // Steno Layers 17 #define FUNCT ( LSD | LK | LP | LH ) 18 #define MEDIA ( LSD | LK | LW | LR ) 19 #define MOVE ( LSD | LK ) 20 #define NUM ( PWR ) 21 #define SYM ( RZ ) 22 23 // Keys and chords that, once they appear, are added to every subsequent partial chord 24 // until the whole thing is sent. 25 uint32_t stenoLayers[] = {NUM, SYM, MOVE, MEDIA, FUNCT}; 26 27 // QMK Layers 28 #define STENO_LAYER 0 29 #define GAMING 1 30 #define GAMING_2 2 31 32 /* Keyboard Layout 33 * ,---------------------------------. ,------------------------------. 34 * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | 35 * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| 36 * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RB | RG | RS | RZ | 37 * `---------------------------------' `------------------------------' 38 * ,---------------, .---------------. 39 * | LNO | LA | LO | | RE | RU | RNO | 40 * `---------------' `---------------' 41 */ 42 43 // Note: You can only use basic keycodes here! 44 // 45 // P() is just a wrapper to make your life easier. 46 // PC() applies the mapping to all of the StenoLayers. For overloading, define these last. 47 // 48 // FN is unavailable. That is reserved for system use. 49 // Chords containing PWR are always available, even in steno mode. 50 // 51 // http://docs.gboards.ca 52 uint32_t processQwerty(bool lookup) { 53 // Special keys 54 P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__)); 55 P( LFT | LK | LP | LW, REPEAT()); 56 57 // Mouse Keys 58 /* P( LO | LSD | LK, CLICK_MOUSE(MS_BTN2)); */ 59 /* P( LO | LR | LW, CLICK_MOUSE(MS_BTN1)); */ 60 61 62 /* Function layer 63 * ,-----------------------------------, ,-----------------------------------, 64 * | | | | NCTFUNCTF | | | | F1 | F2 | F3 | F4 | | 65 * | + + + + + | | + F5 + F6 + F7 + F8 + | 66 * | | FUNCTFUNC | | | | | | F9 | F10 | F11 | F12 | | 67 * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' 68 */ 69 P( FUNCT | RF, SEND(KC_F1)); 70 P( FUNCT | RP, SEND(KC_F2)); 71 P( FUNCT | RL, SEND(KC_F3)); 72 P( FUNCT | RT, SEND(KC_F4)); 73 74 P( FUNCT | RF | RR, SEND(KC_F5)); 75 P( FUNCT | RP | RB, SEND(KC_F6)); 76 P( FUNCT | RL | RG, SEND(KC_F7)); 77 P( FUNCT | RT | RS, SEND(KC_F8)); 78 79 P( FUNCT | RR, SEND(KC_F9)); 80 P( FUNCT | RG, SEND(KC_F10)); 81 P( FUNCT | RB, SEND(KC_F11)); 82 P( FUNCT | RS, SEND(KC_F12)); 83 84 85 /* Movement layer 86 * ,-----------------------------------, ,-----------------------------------, 87 * | | | | | | | | | <- | ↓ | ↑ | -> | | 88 * | + + + + + | | + + + + + | 89 * | | MOVEMOVEM | | | | | | Hm | PgD | PgU | End | | 90 * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' 91 */ 92 P( MOVE | RF, SEND(KC_LEFT)); 93 P( MOVE | RP, SEND(KC_DOWN)); 94 P( MOVE | RL, SEND(KC_UP)); 95 P( MOVE | RT, SEND(KC_RIGHT)); 96 97 P( MOVE | RR, SEND(KC_HOME)); 98 P( MOVE | RB, SEND(KC_PGDN)); 99 P( MOVE | RG, SEND(KC_PGUP)); 100 P( MOVE | RS, SEND(KC_END)); 101 102 103 /* Media Layer 104 * ,-----------------------------------, ,-----------------------------------, 105 * | | | | | | | | |Prev |Play | PLY |Next | VolU| 106 * | + + + + + | | + + + + + | 107 * | | MEDIAMEDIAMEDIAMEDIAM | | | | | | |Mute | VolD| 108 * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' 109 */ 110 P( MEDIA | RF, SEND(KC_MPRV)); 111 P( MEDIA | RP, SEND(KC_MPLY)); 112 P( MEDIA | RL, SEND(KC_MPLY)); 113 P( MEDIA | RT, SEND(KC_MNXT)); 114 P( MEDIA | RD, SEND(KC_VOLU)); 115 116 P( MEDIA | RS, SEND(KC_MUTE)); 117 P( MEDIA | RZ, SEND(KC_VOLD)); 118 119 120 /* Numbers 121 * ,-----------------------------------, ,-----------------------------------, 122 * | | | a | b | c | | | : | 1 | 2 | 3 | . | | 123 * | + + d + e + f + | | 0 + 4 + 5 + 6 + - + | 124 * | NUM | | | | | | | | 7 | 8 | 9 | 0 | | 125 * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' 126 */ 127 P( NUM | LFT, SEND(KC_A)); 128 P( NUM | LP, SEND(KC_B)); 129 P( NUM | LH, SEND(KC_C)); 130 P( NUM | LK, SEND(KC_D)); 131 P( NUM | LW, SEND(KC_E)); 132 P( NUM | LR, SEND(KC_F)); 133 134 // Right hand 135 P( NUM | ST3, SEND_STRING(":")); 136 P( NUM | RF, SEND(KC_1)); 137 P( NUM | RP, SEND(KC_2)); 138 P( NUM | RL, SEND(KC_3)); 139 P( NUM | RT, SEND(KC_DOT)); 140 141 P( NUM | ST3 | ST4, SEND(KC_0)); 142 P( NUM | RF | RR, SEND(KC_4)); 143 P( NUM | RP | RB, SEND(KC_5)); 144 P( NUM | RG | RL, SEND(KC_6)); 145 P( NUM | RT | RS, SEND(KC_MINUS)); 146 147 P( NUM | RR, SEND(KC_7)); 148 P( NUM | RB, SEND(KC_8)); 149 P( NUM | RG, SEND(KC_9)); 150 P( NUM | RS, SEND(KC_0)); 151 152 153 /* Symbols 154 * ,-----------------------------------, ,-----------------------------------, 155 * | | ` | [ | { | ( | < | | > | ) | } | ] | ? | | 156 * | + ~ + - + ' + : + _ | | \ + = + " + + + ? + | 157 * | | ! | @ | # | $ | % | | | | ^ | & | * | ? | SYM | 158 * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' 159 */ 160 // Left hand 161 P( SYM | LSU, SEND(KC_GRV)); 162 P( SYM | LFT, SEND(KC_LBRC)); 163 P( SYM | LP, SEND_STRING("{")); 164 P( SYM | LH, SEND_STRING("(")); 165 P( SYM | ST1, SEND_STRING("<")); 166 167 P( SYM | LSU | LSD, SEND_STRING("~")); 168 P( SYM | LFT | LK, SEND(KC_MINS)); 169 P( SYM | LP | LW, SEND(KC_QUOTE)); 170 P( SYM | LH | LR, SEND_STRING(":")); 171 P( SYM | ST1 | ST2, SEND_STRING("_")); 172 173 P( SYM | LSD, SEND_STRING("!")); 174 P( SYM | LK, SEND_STRING("@")); 175 P( SYM | LW, SEND_STRING("#")); 176 P( SYM | LR, SEND_STRING("$")); 177 P( SYM | ST2, SEND_STRING("%")); 178 179 // Right hand 180 P( SYM | ST3, SEND_STRING(">")); 181 P( SYM | RF, SEND_STRING(")")); 182 P( SYM | RP, SEND_STRING("}")); 183 P( SYM | RL, SEND_STRING("]")); 184 P( SYM | RT, SEND_STRING("?")); 185 186 P( SYM | ST3 | ST4, SEND(KC_BACKSLASH)); 187 P( SYM | RF | RR, SEND(KC_EQUAL)); 188 P( SYM | RP | RB, SEND_STRING("\"")); 189 P( SYM | RG | RL, SEND_STRING("+")); 190 P( SYM | RT | RS, SEND_STRING("?")); 191 192 P( SYM | ST4, SEND_STRING("|")); 193 P( SYM | RR, SEND_STRING("^")); 194 P( SYM | RB, SEND_STRING("&")); 195 P( SYM | RG, SEND_STRING("*")); 196 P( SYM | RS, SEND_STRING("?")); 197 198 199 /* Letters 200 * ,-----------------------------------, ,-----------------------------------, 201 * | | Q | W | F | P | B | | J | L | U | Y | ; | ctl | 202 * +-----+- A -+- R -+- S -+- T -+- G -| |- M -+- N -+- E -+- I -+- O -+-----| 203 * | bsp | Z | X | C | D | V | | K | H | , | . | / | del | 204 * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' 205 * ,---------------, .---------------. 206 * | alt | ent|shfr| | spc| gui| alt | 207 * `---------------' `---------------' 208 */ 209 // Left hand 210 P( LSU, SEND(KC_Q)); 211 P( LFT, SEND(KC_W)); 212 P( LP, SEND(KC_F)); 213 P( LH, SEND(KC_P)); 214 P( ST1, SEND(KC_B)); 215 216 P( LSU | LSD, SEND(KC_A)); 217 P( LFT | LK, SEND(KC_R)); 218 P( LP | LW, SEND(KC_S)); 219 P( LH | LR, SEND(KC_T)); 220 P( ST1 | ST2, SEND(KC_G)); 221 222 P( LSD, SEND(KC_Z)); 223 P( LK, SEND(KC_X)); 224 P( LW, SEND(KC_C)); 225 P( LR, SEND(KC_D)); 226 P( ST2, SEND(KC_V)); 227 228 // Right hand 229 P( ST3, SEND(KC_J)); 230 P( RF, SEND(KC_L)); 231 P( RP, SEND(KC_U)); 232 P( RL, SEND(KC_Y)); 233 P( RT, SEND(KC_SCLN)); 234 235 P( ST3 | ST4, SEND(KC_M)); 236 P( RF | RR, SEND(KC_N)); 237 P( RP | RB, SEND(KC_E)); 238 P( RG | RL, SEND(KC_I)); 239 P( RT | RS, SEND(KC_O)); 240 241 P( ST4, SEND(KC_K)); 242 P( RR, SEND(KC_H)); 243 P( RB, SEND(KC_COMM)); 244 P( RG, SEND(KC_DOT)); 245 P( RS, SEND(KC_SLSH)); 246 247 // Thumb Chords and modifiers 248 // 249 PC( LNO | RNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); 250 PC( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); 251 252 // overrides 253 P( PWR | LO, SEND(KC_LSFT); SEND(KC_BSPC)); 254 P( PWR | RD, SEND(KC_LCTL); SEND(KC_BSPC)); 255 P( RZ | RD, SEND(KC_LCTL); SEND(KC_DEL)); 256 257 PC( LNO | LA | LO, SEND(KC_LSFT); SEND(KC_ESC)); 258 PC( LA | LO, SEND(KC_ESC)); 259 PC( LNO, SEND(KC_LALT)); 260 PC( LA, SEND(KC_ENT)); 261 PC( LO, SEND(KC_LSFT)); 262 263 PC( RNO, SEND(KC_RALT)); 264 PC( RE | RU, SEND(KC_TAB)); 265 PC( RE, SEND(KC_SPC)); 266 PC( RU, SEND(KC_LGUI)); 267 268 PC( PWR, SEND(KC_BSPC)); 269 PC( RD, SEND(KC_LCTL)); 270 P( RZ, SEND(KC_DEL)); 271 272 return 0; 273 } 274 275 // "Layers" 276 // Steno layer should be first in your map. 277 // When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. 278 // If you need more space for chords, remove the two gaming layers. 279 // Note: If using NO_ACTION_TAPPING, LT will not work! 280 281 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 282 // Main layer, everything goes through here 283 [STENO_LAYER] = LAYOUT_georgi( 284 STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, 285 STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, 286 STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7 287 ), 288 // Gaming layer with Numpad, Very limited 289 [GAMING] = LAYOUT_georgi( 290 KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, 291 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO, 292 KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER) 293 ), 294 295 [GAMING_2] = LAYOUT_georgi( 296 KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, 297 KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, 298 KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER) 299 ) 300 }; 301 302 // Don't fuck with this, thanks. 303 size_t keymapsCount = ARRAY_SIZE(keymaps); 304 size_t stenoLayerCount = ARRAY_SIZE(stenoLayers);