base_qwerty_basearrow.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. /*
  2. * License (GPL):
  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. * Author: © 2020 by Jos Boersema
  14. *
  15. */
  16. // --------------------------------------v---------------------------------------
  17. // Configuration:
  18. // --------------------------------------v---------------------------------------
  19. // --------------------------------------^---------------------------------------
  20. // Below here no more comfortable configuration options.....
  21. // --------------------------------------^---------------------------------------
  22. /* Redefine a layer in this file
  23. *
  24. * _Activate_ one or more of the below BASESFILE_LAYER_..., to redefine the layer
  25. * in this file. The version in ./keymap.c will be ignored. Keep in mind to use
  26. * transparent keys (_______) for “hold” layer switch keys on the BASE map, for
  27. * your new layer.
  28. */
  29. // #define BASESFILE_LAYER_ACC
  30. // #define BASESFILE_LAYER_DRA
  31. // #define BASESFILE_LAYER_BON
  32. // #define BASESFILE_LAYER_PAD
  33. // #define BASESFILE_LAYER_MOV
  34. // #define BASESFILE_LAYER_RAR
  35. // #define BASESFILE_LAYER_FUN
  36. /* ⬇ */
  37. /* Layer _..._BASE: Qwerty with arrows on Base, normal BASE layer and 'default' layer
  38. *
  39. * - This version of Qwerty puts arrows on Base, and assumes the 'arrow' hardware key.
  40. * When not compiled with 'arrow' hardware key, Base will not contain ‛down arrow’.
  41. *
  42. * This does not mean that this is the recommended version of Qwerty in general for
  43. * the 'arrow' hardware key with Qwerty. Regular Qwerty works with the additional
  44. * hardware key 'arrow'. The regular Qwerty compile option just works differently
  45. * than this version with arrows on Base. Regular qwerty has the additional hardware
  46. * key on the right be a toggle to _MOV layer, where you then have arrows in the same
  47. * area. Notice further that in all cases, you have a hold key to the _MOV layer under
  48. * what is colloqually known as the ‛left space bar’, which leads to convenient arrow
  49. * keys in the home row.
  50. *
  51. * Putting directional arrow keys on the Base layer will cost you several keys on
  52. * the Base layer: hold _RAR, GUI, and ‛/?’.
  53. * • The ‛/?’ key is displaced to the _NSY layer.
  54. * • The GUI key is lost. You could decide to also use the ‛south paw’/‛command’
  55. * hardware key, which is a GUI by default.
  56. * • Hold key to _RAR layer is lost. You can only reach _RAR layer, using the right
  57. * shift toggle, which is on a short timer.
  58. *
  59. * My recommendation would be: see if you can make things work with regular Qwerty
  60. * if you are a 10 fingers typist, first. Moving your hand to this arrow cluster
  61. * seems to be a high cost to pay. You will also loose the default location for ‛/?’.
  62. *
  63. * For special need situations regarding this right hand row1/2 arrow cluster, a
  64. * tap to _MOV layer on the ‛arrow’ hardware key, should be a reasonable cost to
  65. * pay, if a situation is already important enough to decide to move your hand there.
  66. * For short uses of arrow keys, holding to the _MOV layer is the most efficient.
  67. *
  68. * If you are not a 10 finger typist though, holding a key to _MOV layer seems to be
  69. * inconvenient, and thus arrows on Base could be better for you.
  70. *
  71. * Hence my conclusion: only compile ‛Qwerty with arrows on Base’ if the regular
  72. * Qwerty isn't working for you.
  73. *
  74. */
  75. // Process user configuration wrt ‛Default’ or ‛Alternative’ spot for this layout.
  76. # if defined(BASE_QWERTY_BASEARROW__DEF_BASE)
  77. [ _DEF_BASE ] = LAYOUT_redefined (
  78. # elif defined(BASE_QWERTY_BASEARROW__ALT_BASE)
  79. [ _ALT_BASE ] = LAYOUT_redefined (
  80. # endif
  81. /*
  82. Layer _..._BASE (Letters). This is Qwerty with arrows on Base
  83. | Right hand
  84. <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring> pinky>pinky2> // Keys by finger
  85. -o- <|> ... //-o- BASE access
  86. Esc qQ wW eE rR tT | yY uU iI oO pP Bksp
  87. Tab+LCtl aA sS dD fF gG | hH jJ kK lL ;: '"
  88. LSht+_PAD zZ xX cC vV bB | nN mM ,< .> Up RSht+_FUN
  89. +_MOV⁵ | +_RAR⁶
  90. ---------------------------------------------------------------------------------------
  91. Left+LAlt Del;_ACC _..._NSY(_DRA) Enter+_MOV| Space _..._NSY(_DRA) Left Right
  92. hold hold₍₁,₂٭₎ hold | hold₍₁,₂٭₎ // switch type
  93. hold₍₂₎ ^-┃-----------------------+--------^ ┃ // ₁₎ both = _DRA
  94. ┗━━━_BON━━━╋┅───────────┄┄┄«or»┄┄┄─+─────────┅┛ // ₂₎ both = _BON
  95. <1 ± <2 <3 <4 | 4> 3> 2> ± 1> // Keys by number
  96. ^³ ^⁴ // Optional more keys
  97. (RGUI) (Down)
  98. ₁) Dual hold for _DRA, single hold for _..._NSY. Marked by: ^--…--^
  99. ₂) Hold key “<2” with either٭ key “<3” or “3>” for _BON, single hold “<2” for _ACC. Marked: ┗━━…━━┛
  100. ₃) 'South paw' hardware configuration. Configurable, default shown.
  101. ₄) 'Arrow' hardware configuration. Set to Down Arrow.
  102. ₃ ₄) There are two more optional hardware keys, to make it easier to compile for
  103. a 12x12x12x11 or 12x12x12x12 layouts.
  104. ₅) Left Shift when pressed with another key. Medium long: to toggle _PAD. Long: toggle _MOV.
  105. ₆) Right shift when pressed with another key. medium long: to toggle _FUN. Long: toggle _RAR.
  106. */
  107. //
  108. // <pink2 , <pink, <ring, <midd, <indx, <ind|, indx>, inde>, midd> , ring> , pink> , pink2> ,
  109. // -*!- , , , , , <|,> , , , , , ,
  110. KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC ,
  111. LCTL_T ( KC_TAB ) , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT ,
  112. CHOLTAP_LSHFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_UP , CHOLTAP_RSHFT ,
  113. // KC_SLSH
  114. // -----------------------------------------------------------------------------------------------------------------
  115. LALT_T ( KC_LEFT )
  116. # ifdef TRANSMINIVAN_LEFTSIDE
  117. , MO ( _PAD )
  118. # endif
  119. # ifdef MORE_KEY__COMMAND
  120. , MORE_key1_BASE
  121. # endif
  122. # ifdef SWITCH_HOLD_ACC_NSY
  123. , DUO_HOLD , CHOLTAP_ACCE
  124. # else
  125. , CHOLTAP_ACCE , DUO_HOLD
  126. # endif
  127. , LEFTCENTER_THUMB
  128. # ifdef TRANSMINIVAN_MIDLEFT
  129. , TRANS_MIDLEFT
  130. # endif
  131. , RIGHTCENTER_THUMB , DUO_HOLD
  132. # ifdef TRANSMINIVAN_RIGHTSIDE
  133. , MO ( _FUN )
  134. # endif
  135. , KC_LEFT
  136. // , KC__YGUI
  137. # ifdef MORE_KEY__ARROW
  138. , KC_DOWN
  139. // , MORE_key2
  140. # endif
  141. , KC_RIGHT
  142. // , CHOLTAP_LAYR
  143. // , , , <|,> , , ,
  144. // <1 ± ± , <2 , <3 , <4 |, 4> , 3> , 2> , ± ± 1>
  145. ),
  146. /* ⬆⬇ */
  147. /* Layer _..._NSY: Numbers and symbols, to work with the Qwerty base layer above.
  148. * Off hand Number input (-.Bksp ent (shft)tab).
  149. */
  150. // KC_TILD does not work there, because of a limitation with shifted keys (nov 2019).
  151. // Process user configuration wrt ‛Default’ or ‛Alternative’ spot for this layout.
  152. # if defined(BASE_QWERTY_BASEARROW__DEF_BASE)
  153. [ _DEF_NSY ] = LAYOUT_redefined (
  154. # elif defined(BASE_QWERTY_BASEARROW__ALT_BASE)
  155. [ _ALT_NSY ] = LAYOUT_redefined (
  156. # endif
  157. /*
  158. Layer _..._NSY (Numbers and SYmbols). This fits the above Qwerty layer _..._BASE
  159. <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2>
  160. -*- <|> //(toggle) Access on _FUN
  161. BASE ! @ # $ % | ^ & * ( ) Del
  162. Tab+LCtl 1! 2@ 3# 4$ 5% | 6^ 7& 8* 9( 0) /?
  163. -+LSht [{ ]} -_ \| =+ | + | _ { } ~+RSht // `~ on _BON
  164. ^^ ^ // Only differences with normal version _..._NSY
  165. ---------------------------------------------------------------------------
  166. Left+LAlt ___ ___ Ent | . ___ LGUI Right+RAlt
  167. -*- <|> -*- //(hold) Access on _..._BASE
  168. <1 ± <2 <3 <4 | 4> 3> 2> ± 1>
  169. ^ ^
  170. (RGUI) (_MOV)
  171. */
  172. //
  173. //
  174. // <pink2 , <pinky , <ring , <middl , <index , <indx2 |, indx2> , index> , middl> , ring> , pinky> , pink2> ,
  175. // , -*- , , , , <|,> , , , , , ,
  176. CTO_BASE , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , KC_LPRN , KC_RPRN , KC_DEL ,
  177. LCTL_T ( KC_TAB ) , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_SLSH ,
  178. LSFT_DASH , KC_LBRC , KC_RBRC , KC_MINS , KC_BSLS , KC_EQL , KC_PLUS , KC_PIPE , KC_UNDS , KC_LCBR , KC_RCBR , RSFT_TILDE , // note¹
  179. // ---------------------------------------------------------------------------------------------------------------------------------------------
  180. LALT_T ( KC_LEFT )
  181. # ifdef TRANSMINIVAN_LEFTSIDE
  182. , XXXXXXX
  183. # endif
  184. # ifdef MORE_KEY__COMMAND
  185. , MORE_key1
  186. # endif
  187. , _______ , _______ , KC_ENT
  188. # ifdef TRANSMINIVAN_MIDLEFT
  189. , TRANS_MIDLEFT
  190. # endif
  191. , KC_DOT , DUO_HOLD , KC__YGUI
  192. # ifdef TRANSMINIVAN_RIGHTSIDE
  193. , XXXXXXX
  194. # endif
  195. # ifdef MORE_KEY__ARROW
  196. , MORE_key2
  197. # endif
  198. , RALT_T ( KC_RGHT )
  199. // , , -*- , <|,> , -*- , ,
  200. // <1 ± ± , <2 , <3 , <4 |, 4> , 3> , 2> , ± ± 1>
  201. // note¹
  202. // Sacrificing RCTL, because ‛/’ is a major much used symbol,
  203. // which seem to warrant being uncluttered. ‛`’ exists also on _BON
  204. // (uncluttered). This breaks the logic that all these standard symbols
  205. // exist on this layer _NSY. However, ` and ~ are often in a diminutive
  206. // placement on mini keyboards, and ‛arrows on top’ was always going to
  207. // be a stretch for a keyboard like this. The other option is to have a
  208. // special macro to put tilde ‛~’ and accent grave ‛`’ both on Shift,
  209. // but it doesn't seem to make much difference, and makes the firmware
  210. // even larger.
  211. ),
  212. /* ⬆⬇ */