symbols.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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. /******************************************************************/
  15. /* */
  16. /* Symbol layers: */
  17. /* */
  18. /* The BEAKL15 Symbol layer with or without additions. */
  19. /* */
  20. /* There is the offical beakl symbol layer, an extended symbol */
  21. /* layer which is expanded with: !?@`'/-;. */
  22. /* */
  23. /* Placing these 8 keys in the pinky and index corners */
  24. /* at the edges of the, 3x3, BEAKL home Region. */
  25. /* */
  26. /* Beakl has these keys in it's base layer which isn't the case */
  27. /* for other layouts like dvorak, colemak, etc. */
  28. /* */
  29. /* The third layer moves /:? to more accessible places. */
  30. /* to make vi keybindings more accessible. */
  31. /* */
  32. /* Note that there are 2 widths. 12 and 10. The wider layer adds */
  33. /* - and ; to the middle row edges. */
  34. /* */
  35. /* Official: */
  36. /* <$> [_] */
  37. /* - \(")# %{=}| ; */
  38. /* :*+ &^~ */
  39. /* */
  40. /* not yet implemented */
  41. /* BEAKL27 (punctuation layer): */
  42. /* ↹@$#↹ ~^` */
  43. /* ↹<=> [_] */
  44. /* \(-)+ %{;}! */
  45. /* *:/⏎ |~& */
  46. /* */
  47. /* */
  48. /* BEAKL Extended symbol layer */
  49. /* Expanded with: !?@`'/-; */
  50. /* */
  51. /* A: */
  52. /* `<$>' ?[_]- */
  53. /* - \(")# %{=}| ; */
  54. /* @:*+; !&^~/ */
  55. /* */
  56. /* Optimized for Vi. */
  57. /* B: */
  58. /* */
  59. /* `<$>' ?[_]- */
  60. /* - \(")# !{:}/ ; */
  61. /* @=*+; %&^~| */
  62. /* */
  63. /* C: */
  64. /* */
  65. /* `<$>' ?[_-] */
  66. /* - \("#) !{:/} ; */
  67. /* @=*+; %&^~| */
  68. /* */
  69. /* */
  70. /* Both ; and ' could have found their dvorak positions. Analysis showed */
  71. /* that only caused pinky overuse. Rotating the symbols around Put better */
  72. /* keys on the index finger which showed a huge improvement in efficiency. */
  73. /* The same is true of the exclamation point. */
  74. /* */
  75. /* Beakl Wi */
  76. /* This Symbol layer does not improve on the above extended symbol */
  77. /* layers in my opinon, for my usage. */
  78. /* The original symbol was the Left side with defined/but/transparent */
  79. /* right. The regex layer was the opposite. I combined them into one, I am */
  80. /* not sure of the functionality that might be lost due to that, but they */
  81. /* are defined as original sans extra tap dance functions. It would be easy to */
  82. /* make two layers with transparent right and left. There is duplication */
  83. /* of | and *. */
  84. /* Symbols on the left */
  85. /* .*&+ */
  86. /* ?!/| */
  87. /* <>%@ */
  88. // regex on the right
  89. /* *[^] */
  90. /* ?($) */
  91. /* |{#} */
  92. // Altogether
  93. /* .*&+ *[^] */
  94. /* ?!/| ?($) */
  95. /* <>%@ |{#} */
  96. /******************************************************************/
  97. // Left
  98. #define ___SB_L1___ _OCLTGT, _DLR, _GT
  99. #define ___SB_L2___ _BSLS, _OCPRN, _OCDQUO, _RPRN, _HASH
  100. #define ___SB_L2c___ _BSLS, _OCPRN, _OCDQUO, _HASH, _RPRN
  101. #define ___SB_L3___ _COLN, _ASTR, _PLUS
  102. // Right
  103. #define ___SB_R1___ _OCBRC, _UNDS, _RBRC
  104. #define ___SB_R1c___ _OCBRC, _UNDS, _MINS
  105. #define ___SB_R2___ _PERC, _OCCBR, _EQL, _RCBR, _PIPE
  106. #define ___SB_R3___ _AMPR, _CIRC_ND, _TILD_ND
  107. // a and b... left and right.
  108. #define ___SB_L3b___ _EQL, _ASTR, _PLUS
  109. #define ___SB_R2a___ _PERC, _OCCBR, _EXLM, _RCBR, _PIPE
  110. #define ___SB_R2b___ _EXLM, _OCCBR, _COLN, _RCBR, _SLSH
  111. #define ___SB_R2c___ _EXLM, _OCCBR, _COLN, _SLSH, _RCBR
  112. // ---------------------------
  113. // ---------------------------
  114. #define CARTE_SYMB_BEAKL \
  115. carte_de_map(" <$> [_] ", \
  116. "-\\(\")# %{=}|;", \
  117. " :*+ &^~ ")
  118. #define ___SYMB_BEAKL_3x10___ \
  119. CHUNK_LANG_MAP(_TRNS, ___SB_L1___, _TRNS, _TRNS, ___SB_R1___, _TRNS, \
  120. ___SB_L2___, ___SB_R2___, \
  121. _TRNS, ___SB_L3___, _TRNS, _TRNS, ___SB_R3___, _TRNS)
  122. // ---------------------------
  123. // A: Extended.
  124. #define CARTE_SYMB_BEAKLA \
  125. carte_de_map(" `<$>' ?[_]-", \
  126. " -\\(\")# %{:}|;", \
  127. " @=*+; !&^~/")
  128. #define ___SYMB_BEAKLA_3x10___ \
  129. CHUNK_LANG_MAP(_OCGRV, ___SB_L1___, _OCQUOT, _QUES, ___SB_R1___, _MINS, \
  130. ___SB_L2___, ___SB_R2a___, \
  131. _AT, ___SB_L3___, _SCLN, _EXLM, ___SB_R3___, _SLSH)
  132. // ---------------------------
  133. // B: Extended & Vi
  134. #define CARTE_SYMB_BEAKLB \
  135. carte_de_map(" `<$>' ?[_]-", \
  136. " -\\(\")# !{:}/;", \
  137. " @=*+; %&^~|")
  138. #define ___SYMB_BEAKLB_3x10___ \
  139. CHUNK_LANG_MAP(_OCGRV, ___SB_L1___, _OCQUOT, _QUES, ___SB_R1___, _MINS, \
  140. ___SB_L2___, ___SB_R2b___, \
  141. _AT, ___SB_L3b___, _SCLN, _PERC, ___SB_R3___, _PIPE)
  142. // ---------------------------
  143. // C: Extended & Vi, move closing braces to pinky, seldom used.
  144. // because of tap hold - open_openclose feature.
  145. // Also emacs which mostly closes them.
  146. #define CARTE_SYMB_BEAKLC \
  147. carte_de_map(" `<$>' ?[_-]", \
  148. " -\\(\"#) !{:/};", \
  149. " @=*+; %&^~|")
  150. #define ___SYMB_BEAKLC_3x10___ \
  151. CHUNK_LANG_MAP(_OCGRV, ___SB_L1___, _OCQUOT, _QUES, ___SB_R1c___, _RBRC, \
  152. ___SB_L2c___, ___SB_R2c___, \
  153. _AT, ___SB_L3b___, _SCLN, _PERC, ___SB_R3___, _PIPE)
  154. // wants ( and ) on the left thumb.
  155. #define CARTE_SYMB_MIRYOKU \
  156. carte_de_map(" {&.(} ", \
  157. " :$%^+ ", \
  158. " ~!@#| ")
  159. #define ___SYMB_MIRYOKU_3x10___ \
  160. CHUNK_LANG_MAP(_OCCBR, _AMPR, _DOT, _OCPRN, _RCBR, ____5_, \
  161. _COLN, _DLR, _PERC, _CIRC_ND, _PLUS, ____5_, \
  162. _TILD_ND, _EXLM, _AT, _HASH, _PIPE, ____5_)
  163. // ---------------------------
  164. // WI: the Beakl Wi definition.
  165. #define ___SYMB_BKL_WI_L1___ ___, _DOT, _ASTR, _AMPR, _PLUS
  166. #define ___SYMB_BKL_WI_L2___ ___, _QUES, _EXLM, _SLSH, _PIPE
  167. #define ___SYMB_BKL_WI_L3___ ___, _LT, _GT, _PERC, _AT
  168. #define ___SYMB_BKL_WI_R1___ _ASTR, _OCBRC, _CIRC_ND, _RBRC, ___
  169. #define ___SYMB_BKL_WI_R2___ _QUES, _OCPRN, _DLR , _RPRN, ___
  170. #define ___SYMB_BKL_WI_R3___ _PIPE, _OCCBR, _HASH, _RCBR, ___
  171. #define CARTE_SYMB_BEAKLWI \
  172. carte_de_map(" .*&+ *[^] ", \
  173. " ?!/| ?($) ", \
  174. " <>%@ |{#} ")
  175. #define ___SYMB_BEAKL_WI_3x10___ \
  176. CHUNK_LANG_MAP(___SYMB_BKL_WI_L1___, ___SYMB_BKL_WI_R1___, \
  177. ___SYMB_BKL_WI_L2___, ___SYMB_BKL_WI_R2___, \
  178. ___SYMB_BKL_WI_L3___, ___SYMB_BKL_WI_R3___)
  179. // ---------------------------
  180. // Neo symbol layer
  181. #define ___SYMB_NEO_L1___ ___, _OCDQUOT, _UNDS, _OCLBRC, _RBRC, _CIRC_ND
  182. #define ___SYMB_NEO_L2___ ___, _SLSH, _MINS, _OCLCBR, _RCBR, _ASTR
  183. #define ___SYMB_NEO_L3___ ___, _HASH, _DLR, _PIPE, _TILD_ND, _OCGRV
  184. #define ___SYMB_NEO_R1___ _EXLM, _LT, _GT, _EQL, _AMPR
  185. #define ___SYMB_NEO_R2___ _QUES, _OCPRN, _RPRN , _QUOT, _COLN
  186. #define ___SYMB_NEO_R3___ _PLUS, _PERC, _BSLS, _AT, ___
  187. #define CARTE_SYMB_NEO \
  188. carte_de_map("\"_[]^ !<>=&", \
  189. "/-{}* ?()':", \
  190. "#$|~` +%\@")
  191. #define ___SYMB_NEO_3x10___ \
  192. CHUNK_LANG_MAP(___SYMB_NEO_L1___, ___SYMB_NEO_R1___, \
  193. ___SYMB_NEO_L2___, ___SYMB_NEO_R2___, \
  194. ___SYMB_NEO_L3___, ___SYMB_NEO_R3___)