base_qwerty.c 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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, normal BASE layer and 'default' layer
  38. *
  39. * - Dual use keys create a delay in the key (tap/hold keys), therefore
  40. * space is not dual use (most ued key), neither is hyphen.
  41. */
  42. // Process user configuration wrt ‛Default’ or ‛Alternative’ spot for this layout.
  43. # if defined(BASE_QWERTY__DEF_BASE)
  44. [ _DEF_BASE ] = LAYOUT_redefined (
  45. # elif defined(BASE_QWERTY__ALT_BASE)
  46. [ _ALT_BASE ] = LAYOUT_redefined (
  47. # endif
  48. /*
  49. Layer _..._BASE (Letters). This is Qwerty
  50. | Right hand
  51. <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring> pinky>pinky2> // Keys by finger
  52. -o- <|> ... //-o- BASE access
  53. Esc qQ wW eE rR tT | yY uU iI oO pP Bksp
  54. Tab+LCtl aA sS dD fF gG | hH jJ kK lL ;: '"
  55. LSht+_PAD zZ xX cC vV bB | nN mM ,< .> /? RSht+_FUN
  56. +_MOV⁵ | +_RAR⁶
  57. ---------------------------------------------------------------------------------------
  58. Left+LAlt Del;_ACC _..._NSY(_DRA) Enter+_MOV| Space _..._NSY(_DRA) LGUI Right;_RAR
  59. hold hold₍₁,₂٭₎ hold | hold₍₁,₂٭₎ hold // switch type
  60. hold₍₂₎ ^-┃-----------------------+--------^ ┃ // ₁₎ both = _DRA
  61. ┗━━━_BON━━━╋┅───────────┄┄┄«or»┄┄┄─+─────────┅┛ // ₂₎ both = _BON
  62. <1 ± <2 <3 <4 | 4> 3> 2> ± 1> // Keys by number
  63. ^³ ^⁴ // Optional more keys
  64. (RGUI) (_MOV)
  65. ₁) Dual hold for _DRA, single hold for _..._NSY. Marked by: ^--…--^
  66. ₂) Hold key “<2” with either٭ key “<3” or “3>” for _BON, single hold “<2” for _ACC. Marked: ┗━━…━━┛
  67. ₃) 'South paw' hardware configuration. Configurable, default shown.
  68. ₄) 'Arrow' hardware configuration Configurable, default shown.
  69. ₃ ₄) There are two more optional hardware keys, to make it easier to compile for
  70. a 12x12x12x11 or 12x12x12x12 layouts.
  71. ₅) Left Shift when pressed with another key. Medium long: to toggle _PAD. Long: toggle _MOV.
  72. ₆) Right shift when pressed with another key. medium long: to toggle _FUN. Long: toggle _RAR.
  73. */
  74. //
  75. // <pink2 , <pink, <ring, <midd, <indx, <ind|, indx>, inde>, midd> , ring> , pink> , pink2> ,
  76. // -*!- , , , , , <|,> , , , , , ,
  77. KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC ,
  78. 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 ,
  79. CHOLTAP_LSHFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , CHOLTAP_RSHFT ,
  80. // -----------------------------------------------------------------------------------------------------------------
  81. LALT_T ( KC_LEFT )
  82. # ifdef TRANSMINIVAN_LEFTSIDE
  83. , MO ( _PAD )
  84. # endif
  85. # ifdef MORE_KEY__COMMAND
  86. , MORE_key1_BASE
  87. # endif
  88. # ifdef SWITCH_HOLD_ACC_NSY
  89. , DUO_HOLD , CHOLTAP_ACCE
  90. # else
  91. , CHOLTAP_ACCE , DUO_HOLD
  92. # endif
  93. , LEFTCENTER_THUMB
  94. # ifdef TRANSMINIVAN_MIDLEFT
  95. , TRANS_MIDLEFT
  96. # endif
  97. , RIGHTCENTER_THUMB , DUO_HOLD , KC__YGUI
  98. # ifdef TRANSMINIVAN_RIGHTSIDE
  99. , MO ( _FUN )
  100. # endif
  101. # ifdef MORE_KEY__ARROW
  102. , MORE_key2
  103. # endif
  104. , CHOLTAP_LAYR
  105. // , , , <|,> , , ,
  106. // <1 ± ± , <2 , <3 , <4 |, 4> , 3> , 2> , ± ± 1>
  107. ),
  108. /* ⬆⬇ */
  109. /* Layer _..._NSY: Numbers and symbols, to work with the Qwerty base layer above.
  110. * Off hand Number input (-.Bksp ent (shft)tab).
  111. */
  112. // KC_TILD does not work there, because of a limitation with shifted keys (nov 2019).
  113. // Process user configuration wrt ‛Default’ or ‛Alternative’ spot for this layout.
  114. # if defined(BASE_QWERTY__DEF_BASE)
  115. [ _DEF_NSY ] = LAYOUT_redefined (
  116. # elif defined(BASE_QWERTY__ALT_BASE)
  117. [ _ALT_NSY ] = LAYOUT_redefined (
  118. # endif
  119. /*
  120. Layer _..._NSY (Numbers and SYmbols). This fits the above Qwerty layer _..._BASE
  121. <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2>
  122. -*- <|> //(toggle) Access on _FUN
  123. BASE ! @ # $ % | ^ & * ( ) Del
  124. Tab+LCtl 1! 2@ 3# 4$ 5% | 6^ 7& 8* 9( 0) `~+RCtl
  125. -+LSht [{ ]} -_ \| =+ | + | _ { } ~+RSht
  126. ^^ ^ // Only differences with normal version _..._NSY
  127. ---------------------------------------------------------------------------
  128. Left+LAlt ___ ___ Ent | . ___ LGUI Right+RAlt
  129. -*- <|> -*- //(hold) Access on _..._BASE
  130. <1 ± <2 <3 <4 | 4> 3> 2> ± 1>
  131. ^ ^
  132. (RGUI) (_MOV)
  133. */
  134. //
  135. //
  136. // <pink2 , <pinky , <ring , <middl , <index , <indx2 |, indx2> , index> , middl> , ring> , pinky> , pink2> ,
  137. // , -*- , , , , <|,> , , , , , ,
  138. CTO_BASE , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , KC_LPRN , KC_RPRN , KC_DEL ,
  139. LCTL_T ( KC_TAB ) , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0
  140. // Harmonizes with ‛Qwerty Base Arrow’, so that if both are compiled, the user isn't
  141. // messing up this key on this Qwerty layout, which has to be different in the other Qwerty.
  142. # ifdef QWERTY_BASEARROW_HARMONIZE
  143. , KC_SLSH , // Same as in ‛Qwerty Base Arrow’. A ‛`’ exists on _BON also.
  144. # else
  145. , RCTL_T ( KC_GRV ) , // Default
  146. # endif
  147. LSFT_DASH , KC_LBRC , KC_RBRC , KC_MINS , KC_BSLS , KC_EQL , KC_PLUS , KC_PIPE , KC_UNDS , KC_LCBR , KC_RCBR , RSFT_TILDE ,
  148. // ---------------------------------------------------------------------------------------------------------------------------------------------
  149. LALT_T ( KC_LEFT )
  150. # ifdef TRANSMINIVAN_LEFTSIDE
  151. , XXXXXXX
  152. # endif
  153. # ifdef MORE_KEY__COMMAND
  154. , MORE_key1
  155. # endif
  156. , _______ , _______ , KC_ENT
  157. # ifdef TRANSMINIVAN_MIDLEFT
  158. , TRANS_MIDLEFT
  159. # endif
  160. , KC_DOT , DUO_HOLD , KC__YGUI
  161. # ifdef TRANSMINIVAN_RIGHTSIDE
  162. , XXXXXXX
  163. # endif
  164. # ifdef MORE_KEY__ARROW
  165. , MORE_key2
  166. # endif
  167. , RALT_T ( KC_RGHT )
  168. // , , -*- , <|,> , -*- , ,
  169. // <1 ± ± , <2 , <3 , <4 |, 4> , 3> , 2> , ± ± 1>
  170. ),
  171. /* ⬆⬇ */