logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

keymap.c (10523B)


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