thumbs.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. /*
  2. Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. // Split thumbs.
  15. // Split these down the middle to think in left and right hand.
  16. // Top row on kinesis, ergodox, etc.
  17. #define ___THUMBS_1___ \
  18. ___X___ , MO_ADJUST, MO_LAYERS, OSL(LN_TOPROWS)
  19. // Middle row on kinesis, ergodox, etc.
  20. #define ___THUMBS_2___ HOME_END, KC_PGUP
  21. #define ___4_THUMBS_1___ ___X___, KC_HOME, KC_PGUP, OSL(LN_TOPROWS)
  22. #define ___6_THUMBS_2___ KC_LSFT, KC_BKTAB, KC_END, KC_PGDN, KC_TAB, KC_RSFT
  23. #define ___6_THUMBS_2_CB___ KC_LSFT, KC_BKTAB, KC_END, KC_PGDN, KC_TAB, KC_RSFT
  24. #define ___6_THUMBS_2a___ BSPC_SYMB, ESC_TOPR, ESC_TOPR, ENT_NAV, ENT_NAV, SPC_TOPR
  25. #define ___6_THUMBS_2a_CB___ BSPC_SYMB, ESC_TOPR, ESC_TOPR, ENT_NAV, ENT_NAV, SPC_TOPR
  26. // This has become the default center group of thumbs for all
  27. // So here's the beakl wi thumbs adapted to this combined layer system.
  28. //
  29. #define ___6_ERGO_THUMBS_WI___ \
  30. ESC_TOPR, I_SYMB, TAB_NUM, ENT_NAV, SPC_SYMB, BSPC_NAV
  31. // Like my other thumb rows. With an I.
  32. #define ___6_ERGO_THUMBS_WIa___ \
  33. BSPC_NAV, I_SYMB, ESC_TOPR, ENT_NAV, SPC_TOPR, TAB_NUM
  34. #define ___6_ERGO_THUMBS_layers___ \
  35. SML_NAV, BSPC_SYMB, ESC_TOPR, ENT_NAV, SPC_TOPR, ACCCENTS_RALT
  36. #define ___6_ERGO_THUMBS_COMBO___ CB_TH1, CB_TH2, CB_TH3, CB_TH4, CB_TH5, CB_TH6
  37. #define ___6_ERGO_THUMBS_COMBO2___ CB2_TH1, CB2_TH2, CB2_TH3, CB2_TH4, CB2_TH5, CB2_TH6
  38. // Transparent.
  39. #define ___6_ERGO_THUMBS_trns___ ___6___
  40. // A place to test stuff.
  41. #define ___6_ERGO_THUMBS_tst___ \
  42. TT_KEYPAD, BSPC_SYMB, ESC_TOPR, ENT_NAV, SPC_TOPR, KC_XM_PORD
  43. #define ___6_ERGO_THUMBS_mods___ \
  44. ALT_DEL, CTL_BSPC, GUI_ESC, ALT_ENT, CTL_SPC, XC_XM_PORD
  45. #define ___6_ERGO_THUMBS_mod_layers___ \
  46. ALT_DEL, BSPC_SYMB, GUI_ESC, CTL_ENT, SPC_TOPR, ACCENTS_RALT
  47. #define ___6_ERGO_THUMBS_mod_layers_nav___ \
  48. ALT_DEL, BSPC_SYMB, GUI_ESC, ENT_NAV, SPC_TOPR, ACCENTS_RALT
  49. // for keymaps that need a letter on the thumb.
  50. #define ___6_ERGO_THUMBS_left_letter___ \
  51. BSPC_ALT, TH_LTR_SYM, GUI_ESC, ENT_NAV, SPC_TOPR, KC_TAB
  52. // an attempt at an approximation of the HD thumbs as they are on the site.
  53. // really should be expected to be a starting point that doesnt strand you.
  54. #define ___6_ERGO_THUMBS_hd___ \
  55. BSPC_ALT, TH_LTR_SYM, GUI_ESC, ENT_NAV, SPC_TOPR, ACCENTS_CTL
  56. #define ___6_ERGO_THUMBS_hd_a___ \
  57. OS_LSHIFT, TH_LTR_SYM, GUI_ESC, BSPC_ALT, SPC_TOPR, ACCENTS_CTL
  58. #define ___6_ERGO_THUMBS_hd_simple___ \
  59. MO_SYMB, THUMB_LETTER, KC_ENT, KC_BSPC, KC_SPC, MO_TOPROWS
  60. /* HD dash has thumbs of ,; and .: */
  61. #define ___6_ERGO_THUMBS_hd_dash___ \
  62. LANG_KC(TL_COMM), TL_DOT_SYMB, GUI_ESC, ENT_NAV, SPC_TOPR, BSPC_NUM
  63. #define ___6_ERGO_THUMBS_media___ ___3___, ___STOP_PLAY_MUTE___
  64. #define ___6_ERGO_THUMBS_mouse___ ___3___, ___3MOUSE_BTNS_R___
  65. #define ___6_ERGO_THUMBS_keypad___ \
  66. LANG_KC(_DOT), LANG_KC(_0), LANG_KC(_MINS), ___3___
  67. #define ___6_ERGO_THUMBS_symb___ \
  68. LANG_KC(_OCPRN), LANG_KC(_RPRN), LANG_KC(_UNDS), ___3___
  69. // miryoku thumbs, either its toprows or keypad for numbers.
  70. #define ___6_ERGO_THUMBS_miryoku_tr___ \
  71. ESC_MEDIA, SPACE_NAV, TAB_NAVM, ENT_SYM, BSPC_TOPR, DEL_FUN
  72. #define ___6_ERGO_THUMBS_miryoku___ \
  73. ESC_MEDIA, SPACE_NAV, TAB_NAVM, ENT_SYM, BSPC_NUM, DEL_FUN
  74. // lose the tab key, put a letter where space was.
  75. // move space to the right side, put backspace where tab was.
  76. #define ___6_ERGO_THUMBS_miryoku_ltr___ \
  77. ESC_MEDIA, TH_LTR_NAV, BSPC_NAVm, ENT_SYM, SPC_NUM, DEL_FUN
  78. #define ___6_ERGO_THUMBS_miryoku_tr_ltr___ \
  79. ESC_MEDIA, TH_LTR_NAV, BSPC_NAVm, ENT_SYM, SPC_TOPR, DEL_FUN
  80. #define ___6_ERGO_THUMBS_miryoku_ltr_tab___ \
  81. BSPC_MEDIA, TH_LTR_NAV, TAB_NAVM, ENT_SYM, SPC_NUM, DEL_FUN
  82. #define ___6_ERGO_THUMBS_miryoku_tr_ltr_tab___ \
  83. BSPC_MEDIA, TH_LTR_NAV, TAB_NAVM, ENT_SYM, SPC_TOPR, DEL_FUN
  84. // Give the right symbol suffix by the value of THUMBS_ARE
  85. // Basically we choose the right cluster here, so the layout
  86. // level doesn't know or care.
  87. //
  88. // ___foo --> ___foo_WI___, or ___foo_WIa___, or ___foo_def___.
  89. // THUMBS_ARE = WI, or WIa, or DEFAULT, TEST, TRNS, MOD_LAYERS, etc.
  90. // the value of THUMB_LETTER is the key used when needed.
  91. #define THUMB_EXT CAT(THUMBS_ARE, _EXT)
  92. #define WI_EXT _WI___
  93. #define WIa_EXT _WIa___
  94. #define DEFAULT_EXT _mod_layers_nav___ //change this to change the default.
  95. #define TEST_EXT _tst___
  96. #define TRNS_EXT _trns___
  97. #define MODS_EXT _mods___
  98. #define LAYERS_EXT _layers___
  99. #define MODS_LAYERS_EXT _mod_layers___
  100. #define MODS_LAYERS_NAV_EXT _mod_layers_nav___
  101. #define MIRYOKU_EXT _miryoku___
  102. #define MIRYOKU_TR_EXT _miryoku_tr___
  103. #define MIRYOKU_LTR_EXT _miryoku_ltr___ // miryoku versions with a letter
  104. #define MIRYOKU_LTR_TAB_EXT _miryoku_ltr_tab___
  105. #define MIRYOKU_TR_LTR_EXT _miryoku_tr_ltr___
  106. #define MIRYOKU_TR_LTR_TAB_EXT _miryoku_tr_ltr_tab___
  107. #define TH_LTR_EXT _left_letter___ // takes a letter for the left thumb.
  108. #define HD_DASH_EXT _hd_dash___
  109. #define HD_EXT _hd___ // takes a letter for the left thumb.
  110. #define HDA_EXT _hd_a___ // relocate backspace
  111. #define HD_SIMPLE_EXT _hd_simple___ // no LTs or MT´s.
  112. // for the function layers
  113. #define COMBO_EXT _COMBO___
  114. #define COMBO2_EXT _COMBO2___
  115. #define MEDIA_THUMBS_EXT _media___
  116. #define MOUSE_THUMBS_EXT _mouse___
  117. #define KEYPAD_THUMBS_EXT _keypad___
  118. #define SYMB_THUMBS_EXT _symb___
  119. #define ___6_ERGO_THUMBS___ CAT2(___6_ERGO_THUMBS, THUMB_EXT)
  120. // for the kyria, mostly for the combo reference layers.
  121. #define ___10_ERGO_THUMBS___ CATR(___10_ERGO_THUMBS, EXP_THUMB_EXT)
  122. #define ___4_THUMBS___ CAT2(___4_THUMBS, EXP_THUMB_EXT)
  123. /* #define ___6_ERGO_THUMBS___ ___6_ERGO_THUMBS_def___ */
  124. /* #define ___ERGODOX_THUMB_LEFT___ \ */
  125. /* OSL(SYMB), OSM(KC_LGUI), \ */
  126. /* HOME_END, \ */
  127. /* CTL_BSPC, ALT_DEL, XMONAD_ESC */
  128. /* #define ___ERGODOX_THUMB_RIGHT___ \ */
  129. /* XXX, OSL(KEYPAD), \ */
  130. /* KC_PGUP, \ */
  131. /* KC_PGDN, ALT_ENT, CTL_SPC */
  132. // Translation of LT thumb keys from beakl wi where function layers
  133. // have separate left and right to here, where I'm defining left and right in
  134. // one layer and using it that way. I don't feel that having both halves
  135. // on one layer hurts, if I invoke a layer, I'm not trying to use a non
  136. // layer part of the keyboard. I don't have an edit layer, might be a good idea.
  137. // have most of it on the Navigation layer.
  138. // use the keycodes on that original layer, so It's not defined here.
  139. // The wi keypad has a hexpad instead of a funcpad. All the other keypads
  140. // have a funcpad on the opposite side.
  141. // translation of the original wi layers to those here.
  142. // BSPC_NAV
  143. // SPC_SYMB
  144. // TAB_NUM
  145. // ESC_func -> ESC_TOPR
  146. // I_regex -> I_SYMB
  147. // ENT_edit -> ENT_NAV
  148. /* // consolidated for kinesis, ergodox, and dactyl */
  149. /* //for the ergodox and kinesis. */
  150. /* #define ___12_DOX_ALL_THUMBS___ \ */
  151. /* ___4___, \ */
  152. /* ___2___, \ */
  153. /* ___6___ */
  154. #define ___12_DOX_ALL_THUMBS___ ___12___
  155. /* ___THUMBS_1___, \ */
  156. /* ___xTHUMBS_2___, \ */
  157. /* ___6_ERGO_THUMBS___ */
  158. #define ___12_DOX_ALL_THUMBS_EN___ ___12_DOX_ALL_THUMBS___
  159. #define ___12_DOX_ALL_THUMBS_BP___ ___12_DOX_ALL_THUMBS___
  160. #define ___16_ALL_THUMBS___ \
  161. ___4_THUMBS_1___, \
  162. ___6_THUMBS_2___, \
  163. ___6_ERGO_THUMBS___
  164. #define ___16_ALL_THUMBS_EN___ ___16_ALL_THUMBS___
  165. #define ___16_ALL_THUMBS_BP___ ___16_ALL_THUMBS___
  166. #define ___16_ALL_THUMBSa___ \
  167. ___4_THUMBS_1___, \
  168. ___6_THUMBS_2a___, \
  169. ___6_ERGO_THUMBS___
  170. #define ___16_ALL_THUMBSa_EN___ ___16_ALL_THUMBSa___
  171. #define ___16_ALL_THUMBSa_BP___ ___16_ALL_THUMBSa___
  172. // For the Kyria
  173. #define ___4_THUMBS_def___ OS_LALT, OS_LCTL, SML_NAV, OS_LSFT
  174. #define ___10_ERGO_THUMBS_def___ _X_, _X_, ___6_ERGO_THUMBS___, _X_, _X_
  175. #define ___4_THUMBS_EN___ ___4_THUMBS_def___
  176. #define ___4_THUMBS_BP___ ___4_THUMBS_def___
  177. #define ___10_ERGO_THUMBS_EN___ ___10_ERGO_THUMBS_def___
  178. #define ___10_ERGO_THUMBS_BP___ ___10_ERGO_THUMBS_def___
  179. // combo reference layer thumbs for the kyria.
  180. // for the kyria, note the odd numbering...a 0 row, and a,b,c,d for the extras
  181. // on either side of the central 6 thumbs.
  182. #define ___2_THUMBS_CB___ CB_1TH1, CB_1TH2
  183. #define ___4_THUMBS_CB___ CB_0TH1, CB_0TH2, CB_0TH3, CB_0TH4
  184. #define ___6_THUMBS_CB___ CB_1TH1, CB_1TH2, CB_1TH3, CB_1TH4, CB_1TH5, CB_1TH6
  185. #define ___10_ERGO_THUMBS_CB___ CB_THA, CB_THB, \
  186. ___6_ERGO_THUMBS___, CB_THC, CB_THD
  187. #define ___12_ERGO_THUMBS_CB___ ___2_THUMBS_CB___, \
  188. CB_THA, CB_THB, ___6_ERGO_THUMBS___, CB_THC, CB_THD
  189. #define ___12_DOX_ALL_THUMBS_CB___ ___4_THUMBS_CB___, ___2_THUMBS_CB___, ___6_ERGO_THUMBS___
  190. #define ___16_DOX_ALL_THUMBS_CB___ ___4_THUMBS_CB___, ___6_THUMBS_2_CB___, ___6_ERGO_THUMBS___
  191. #define ___16_DOX_ALL_THUMBSa_CB___ ___4_THUMBS_CB___, ___6_THUMBS_2a_CB___, ___6_ERGO_THUMBS___
  192. #define ___2_THUMBS_CB2___ CB2_1TH1, CB2_1TH2
  193. #define ___4_THUMBS_CB2___ CB2_0TH1, CB2_0TH2, CB2_0TH3, CB2_0TH4
  194. #define ___6_THUMBS_CB2___ CB2_1TH1, CB2_1TH2, CB2_1TH3, CB2_1TH4, CB2_1TH5, CB2_1TH6
  195. #define ___10_ERGO_THUMBS_CB2___ CB2_THA, CB2_THB, \
  196. ___6_ERGO_THUMBS___, CB2_THC, CB2_THD
  197. #define ___12_ERGO_THUMBS_CB2___ ___2_THUMBS_CB2___, \
  198. CB2_THA, CB2_THB, ___6_ERGO_THUMBS___, CB2_THC, CB2_THD
  199. #define ___12_DOX_ALL_THUMBS_CB2___ ___4_THUMBS_CB2___, ___2_THUMBS_CB2___, ___6_ERGO_THUMBS___
  200. #define ___16_DOX_ALL_THUMBS_CB2___ ___4_THUMBS_CB2___, ___6_THUMBS_2_CB2___, ___6_ERGO_THUMBS___
  201. #define ___16_DOX_ALL_THUMBSa_CB2___ ___4_THUMBS_CB2___, ___6_THUMBS_2a_CB2___, ___6_ERGO_THUMBS___
  202. // Basically give the same 4 top thumbs and bottom outer 4 thumbs for everyone.
  203. // Could be different for every one, but the core 6 is enough for now I think.
  204. // Everyone is the same except the combo reference layers.
  205. // Let 6 ERGO_THUMBS do it´s thing inside.
  206. #define EXP_THUMB_EXT CAT(THUMBS_ARE, _EXP_EXT)
  207. #define WI_EXP_EXT _def___
  208. #define WIa_EXP_EXT _def___
  209. #define DEFAULT_EXP_EXT _def___
  210. #define TEST_EXP_EXT _def___
  211. #define TRNS_EXP_EXT _def___
  212. #define MODS_EXP_EXT _def___
  213. #define LAYERS_EXP_EXT _def___
  214. #define MODS_LAYERS_EXP_EXT _def___
  215. #define MODS_LAYERS_NAV_EXP_EXT _def___
  216. #define MIRYOKU_EXP_EXT _def___
  217. #define MIRYOKU_TR_EXP_EXT _def___
  218. #define MIRYOKU_LTR_EXP_EXT _def___
  219. #define MIRYOKU_TR_LTR_EXP_EXT _def___
  220. #define TH_LTR_EXP_EXT _def___
  221. #define HD_DASH_EXP_EXT _def___
  222. #define HD_EXP_EXT _def___
  223. #define HDA_EXP_EXT _def___
  224. #define HD_SIMPLE_EXP_EXT _def___
  225. // for the function layers
  226. #define COMBO_EXP_EXT _COMBO___
  227. #define COMBO2_EXT _COMBO2___
  228. #define MEDIA_THUMBS_EXP_EXT _def___
  229. #define MOUSE_THUMBS_EXP_EXT _def___
  230. #define KEYPAD_THUMBS_EXP_EXT _def___
  231. #define SYMB_THUMBS_EXP_EXT _def___