summaryrefslogtreecommitdiff
path: root/users/ericgebhart/layers/symbols.h
blob: 272bd9b850bd90cd628e321722b1714950acca2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/*
  Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
/******************************************************************/
/*                                                                */
/* Symbol layers:                                                 */
/*                                                                */
/* The BEAKL15 Symbol layer with or without additions.            */
/*                                                                */
/* There is the offical beakl symbol layer, an extended symbol    */
/* layer which is expanded with: !?@`'/-;.                        */
/*                                                                */
/* Placing these 8 keys in the pinky and index corners            */
/* at the edges of the, 3x3, BEAKL home Region.                   */
/*                                                                */
/* Beakl has these keys in it's base layer which isn't the case   */
/* for other layouts like dvorak, colemak, etc.                   */
/*                                                                */
/* The third layer moves /:? to more accessible places.           */
/* to make vi keybindings more accessible.                        */
/*                                                                */
/* Note that there are 2 widths. 12 and 10. The wider layer adds  */
/* - and ; to the middle row edges.                               */
/*                                                                */
/* Official:                                                      */
/*         <$>   [_]                                              */
/*      - \(")# %{=}| ;                                           */
/*         :*+   &^~                                              */
/*                                                                */
/*   not yet implemented                                          */
/* BEAKL27 (punctuation layer):                                   */
/*   ↹@$#↹  ~^`                                                  */
/*   ↹<=>   [_]                                                   */
/*   \(-)+ %{;}!                                                  */
/*    *:/⏎  |~&                                                   */
/*                                                                */
/*                                                                */
/* BEAKL Extended symbol layer                                    */
/* Expanded with: !?@`'/-;                                        */
/*                                                                */
/* A:                                                             */
/*        `<$>' ?[_]-                                             */
/*      - \(")# %{=}| ;                                           */
/*        @:*+; !&^~/                                             */
/*                                                                */
/* Optimized for Vi.                                              */
/* B:                                                             */
/*                                                                */
/*        `<$>' ?[_]-                                             */
/*      - \(")# !{:}/ ;                                           */
/*        @=*+; %&^~|                                             */
/*                                                                */
/* C:                                                             */
/*                                                                */
/*        `<$>' ?[_-]                                             */
/*      - \("#) !{:/} ;                                           */
/*        @=*+; %&^~|                                             */
/*                                                                */
/*                                                                */
/* Both ; and ' could have found their dvorak positions. Analysis showed */
/* that only caused pinky overuse. Rotating the symbols around Put better */
/* keys on the index finger which showed a huge improvement in efficiency. */
/* The same is true of the exclamation point.                     */
/*                                                                */

/* Beakl Wi */

/* This Symbol layer does not improve on the above extended symbol */
/* layers in my opinon, for my usage. */

/* The original symbol was the Left side with defined/but/transparent */
/* right. The regex layer was the opposite. I combined them into one, I am */
/* not sure of the functionality that might be lost due to that, but they */
/* are defined as original sans extra tap dance functions. It would be easy to */
/* make two layers with transparent right and left. There is duplication */
/* of | and *. */

/* Symbols on the left */
/* .*&+ */
/* ?!/| */
/* <>%@ */

// regex on the right
/* *[^] */
/* ?($) */
/* |{#} */

// Altogether
/* .*&+  *[^] */
/* ?!/|  ?($) */
/* <>%@  |{#} */
/******************************************************************/

// Left
#define ___SB_L1___          _OCLTGT, _DLR,    _GT
#define ___SB_L2___  _BSLS,  _OCPRN,  _OCDQUO, _RPRN, _HASH
#define ___SB_L2c___ _BSLS,  _OCPRN,  _OCDQUO, _HASH, _RPRN
#define ___SB_L3___          _COLN,   _ASTR,   _PLUS

// Right
#define ___SB_R1___          _OCBRC,   _UNDS,     _RBRC
#define ___SB_R1c___         _OCBRC,   _UNDS,     _MINS
#define ___SB_R2___  _PERC,  _OCCBR,   _EQL,      _RCBR,  _PIPE
#define ___SB_R3___          _AMPR,    _CIRC_ND,  _TILD_ND

// a and b... left and right.
#define ___SB_L3b___          _EQL,    _ASTR,   _PLUS

#define ___SB_R2a___ _PERC,  _OCCBR,   _EXLM,  _RCBR,  _PIPE
#define ___SB_R2b___ _EXLM,  _OCCBR,   _COLN,  _RCBR,  _SLSH
#define ___SB_R2c___ _EXLM,  _OCCBR,   _COLN,  _SLSH,  _RCBR

// ---------------------------
// ---------------------------
#define CARTE_SYMB_BEAKL                        \
  carte_de_map("  <$>   [_]   ",                \
               "-\\(\")# %{=}|;",               \
               "  :*+   &^~   ")

#define ___SYMB_BEAKL_3x10___                                           \
  CHUNK_LANG_MAP(_TRNS,   ___SB_L1___, _TRNS,    _TRNS,  ___SB_R1___, _TRNS, \
                 ___SB_L2___,                    ___SB_R2___,           \
                 _TRNS,   ___SB_L3___, _TRNS,    _TRNS, ___SB_R3___, _TRNS)

// ---------------------------
// A: Extended.
#define CARTE_SYMB_BEAKLA                       \
  carte_de_map("   `<$>'  ?[_]-",               \
               "  -\\(\")#  %{:}|;",            \
               "   @=*+;  !&^~/")

#define ___SYMB_BEAKLA_3x10___                                          \
  CHUNK_LANG_MAP(_OCGRV, ___SB_L1___, _OCQUOT,   _QUES,  ___SB_R1___, _MINS, \
                 ___SB_L2___,                    ___SB_R2a___,          \
                 _AT,    ___SB_L3___, _SCLN,     _EXLM, ___SB_R3___, _SLSH)

// ---------------------------
// B: Extended & Vi
#define CARTE_SYMB_BEAKLB                       \
  carte_de_map("   `<$>'  ?[_]-",               \
               "  -\\(\")#  !{:}/;",            \
               "   @=*+;  %&^~|")

#define ___SYMB_BEAKLB_3x10___                                          \
  CHUNK_LANG_MAP(_OCGRV, ___SB_L1___,  _OCQUOT,   _QUES,  ___SB_R1___, _MINS, \
                 ___SB_L2___,                     ___SB_R2b___,         \
                 _AT,    ___SB_L3b___, _SCLN,     _PERC, ___SB_R3___, _PIPE)

// ---------------------------
// C: Extended & Vi, move closing braces to pinky, seldom used.
// because of tap hold - open_openclose feature.
// Also emacs which mostly closes them.
#define CARTE_SYMB_BEAKLC                       \
  carte_de_map("   `<$>'  ?[_-]",               \
               "  -\\(\"#)  !{:/};",            \
               "   @=*+;  %&^~|")

#define ___SYMB_BEAKLC_3x10___                                          \
  CHUNK_LANG_MAP(_OCGRV, ___SB_L1___,  _OCQUOT,   _QUES,  ___SB_R1c___, _RBRC, \
                 ___SB_L2c___,                     ___SB_R2c___,        \
                 _AT,    ___SB_L3b___, _SCLN,     _PERC, ___SB_R3___, _PIPE)

// wants ( and ) on the left thumb.
#define CARTE_SYMB_MIRYOKU                                  \
  carte_de_map("  {&.(} ",                                  \
               "  :$%^+ ",                                  \
               "  ~!@#| ")

#define ___SYMB_MIRYOKU_3x10___                         \
  CHUNK_LANG_MAP(_OCCBR,   _AMPR, _DOT,  _OCPRN,   _RCBR, ____5_,     \
                 _COLN,    _DLR,  _PERC, _CIRC_ND, _PLUS, ____5_,     \
                 _TILD_ND, _EXLM, _AT,   _HASH,    _PIPE, ____5_)

// ---------------------------
// WI: the Beakl Wi definition.
#define ___SYMB_BKL_WI_L1___ ___,   _DOT,  _ASTR, _AMPR, _PLUS
#define ___SYMB_BKL_WI_L2___ ___,   _QUES, _EXLM, _SLSH, _PIPE
#define ___SYMB_BKL_WI_L3___ ___,   _LT,   _GT,   _PERC, _AT

#define ___SYMB_BKL_WI_R1___ _ASTR, _OCBRC, _CIRC_ND, _RBRC, ___
#define ___SYMB_BKL_WI_R2___ _QUES, _OCPRN, _DLR ,    _RPRN, ___
#define ___SYMB_BKL_WI_R3___ _PIPE, _OCCBR, _HASH,    _RCBR, ___

#define CARTE_SYMB_BEAKLWI                      \
  carte_de_map(" .*&+  *[^] ",                  \
               " ?!/|  ?($) ",                  \
               " <>%@  |{#} ")

#define ___SYMB_BEAKL_WI_3x10___                                \
  CHUNK_LANG_MAP(___SYMB_BKL_WI_L1___, ___SYMB_BKL_WI_R1___,    \
                 ___SYMB_BKL_WI_L2___, ___SYMB_BKL_WI_R2___,    \
                 ___SYMB_BKL_WI_L3___, ___SYMB_BKL_WI_R3___)

// ---------------------------
// Neo symbol layer
#define ___SYMB_NEO_L1___ ___,  _OCDQUOT, _UNDS,  _OCLBRC, _RBRC, _CIRC_ND
#define ___SYMB_NEO_L2___ ___,  _SLSH,  _MINS,  _OCLCBR, _RCBR, _ASTR
#define ___SYMB_NEO_L3___ ___,  _HASH,  _DLR,   _PIPE, _TILD_ND, _OCGRV

#define ___SYMB_NEO_R1___ _EXLM, _LT,    _GT,    _EQL,  _AMPR
#define ___SYMB_NEO_R2___ _QUES, _OCPRN, _RPRN , _QUOT, _COLN
#define ___SYMB_NEO_R3___ _PLUS, _PERC,  _BSLS,  _AT,   ___

#define CARTE_SYMB_NEO                          \
  carte_de_map("\"_[]^  !<>=&",                 \
               "/-{}*  ?()':",                  \
               "#$|~`  +%\@")

#define ___SYMB_NEO_3x10___                                     \
  CHUNK_LANG_MAP(___SYMB_NEO_L1___, ___SYMB_NEO_R1___,          \
                 ___SYMB_NEO_L2___, ___SYMB_NEO_R2___,          \
                 ___SYMB_NEO_L3___, ___SYMB_NEO_R3___)