aboutsummaryrefslogtreecommitdiff
path: root/keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c')
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c409
1 files changed, 409 insertions, 0 deletions
diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c b/keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c
new file mode 100644
index 000000000..b4dd5f3ee
--- /dev/null
+++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/base_numpad.c
@@ -0,0 +1,409 @@
1/*
2 * License (GPL):
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17 * Author: © 2020 by Jos Boersema
18 *
19 */
20
21// --------------------------------------v---------------------------------------
22// Configuration:
23// --------------------------------------v---------------------------------------
24
25// See the user configuration file: ./base_numpad.h
26
27// --------------------------------------^---------------------------------------
28// Below here no more comfortable configuration options.....
29// --------------------------------------^---------------------------------------
30
31// This is moved into ./user_config.h, because global #defines are affected.
32//((#include "./base_numpad.h" // Pull in the user configuration))
33
34 /* ⬇ */
35
36 /* Layer _..._BASE: default BASE layer (Dvorak)
37 *
38 * This thing is different from the usual different letters arrangement.
39 * It is a numbers pad, one for the left hand, and one for the right
40 * hand. Both are as identical as possible. The use case is the same as
41 * a number pad keyboard: single handed numbers input.
42 *
43 * The number 5 is under the middle finger home row, as expected for blind
44 * number pad typing.
45 *
46 * The left/upper key, where normally BASE is located, is now OTHER_BASE.
47 * That switches the board to the ‛Default’ layout, which is effectively the
48 * same way as a return to BASE in the sense of BASE being the letters/layer
49 * switch layer. “Other Base” reached from the normal letters/layer-switching
50 * BASE layout will then turn the keyboard into these number pads layers.
51 *
52 * A modified Numbers&Symbols layer _NSY is still supplied with this Numbers
53 * Pad layout (as with other Base layers).
54 *
55 * The standard numbers pad layer _PAD also still exists. That one has the
56 * numbers arranged differently.
57 *
58 */
59
60// When putting this layer on ‛Default’, it produced undesired side effects:
61// • _RAR and _MOV hold keys on the ‛Alternate’ letters layer, failed to switch back.
62// • Parts of the Numbers Pad keys got activated through transparent layer switch keys on letters layer.
63// Since there is no use for Numpad on ‛Default’ Base anyway, this is simply not supported, which seems to solve the problem.
64
65
66# ifndef NUMPAD_BASE_SINGLE
67
68 [ _ALT_BASE ] = LAYOUT_redefined (
69
70/*
71 Layer _..._BASE (Number pad, square layout)
72
73 <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2>
74 <|>
75 !AlterGo Bspc 7 8 9 - | Bspc 7 8 9 - Bspc //!AlterGo: to _DEF_BASE
76 = * 4 5 6 + | * 4 5 6 + =
77 _NSY¹ / 1 2 3 , | / 1 2 3 , _NSY¹
78 ------------------------------------------------------------------------
79 xxx 0 . Ent | NumL 0 . Ent
80 <|>
81 <1 ± <2 <3 <4 | 4> 3> ± 2> 1>
82 … | …²
83
84 Layer _..._BASE (Number pad, with NumLock off)
85
86 <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring >pin>pink2>
87 <|>
88 !AlterGo Bspc Home Up PgUp - | Bspc Home Up PgUp - Bspc //!AlterGo: to _DEF_BASE
89 = * Left 5 Right + | * Left 5 Right + = // modified 5
90 _NSY¹ / End Down PgDn , | / End Down PgDn , _NSY¹
91 -------------------------------------------------------------------------
92 xxx Ins Del Ent | NumL Ins Del Ent
93 <|>
94 <1 ± <2 <3 <4 | 4> 3> ± 2> 1>
95 … | …²
96
97 ₁) Toggle to the accompanying Super-Sub-Script (_NSY) layer.
98 ₂) Note anomaly: additional hardware key ‛arrow’ shifted one to the left.
99
100*/
101//
102// <pink2 , <pinky , <ring , <middl , <indx , <ind|, indx> , inde> , midd> , ring> , pink> , pink2> ,
103// -*!- , , , , , <|,> , , , , , ,
104 OTHER_BASE_GO , KC_BSPC , KC_KP_7 , KC_KP_8 , KC_KP_9 , KC_KP_MINUS , KC_BSPC , KC_KP_7 , KC_KP_8 , KC_KP_9 , KC_KP_MINUS , KC_BSPC ,
105 KC_KP_EQUAL , KC_KP_ASTERISK , KC_KP_4 , KC_KP_5 , KC_KP_6 , KC_KP_PLUS , KC_KP_ASTERISK , KC_KP_4 , KC_KP_5 , KC_KP_6 , KC_KP_PLUS , KC_KP_EQUAL ,
106 CTO_NUMS , KC_KP_SLASH , KC_KP_1 , KC_KP_2 , KC_KP_3 , KC_KP_COMMA , KC_KP_SLASH , KC_KP_1 , KC_KP_2 , KC_KP_3 , KC_KP_COMMA , CTO_NUMS ,
107// -------------------------------------------------------------------------------------------------------------------------------------------------------
108 XXXXXXX
109
110# ifdef TRANSMINIVAN_LEFTSIDE
111 , TRANS_LEFT
112# endif
113
114# ifdef MORE_KEY__COMMAND
115 , MORE_key1 // Note anomaly, not MORE_key1_BASE: numpad is treated as a common layer here, because that is ± how it functions.
116# endif
117
118 , KC_KP_0 , KC_KP_DOT , KC_KP_ENTER
119
120# ifdef TRANSMINIVAN_MIDLEFT
121 , TRANS_MIDLEFT
122# endif
123
124 , KC_NUMLOCK , KC_KP_0
125// ---⬇
126// Note anomaly: the additional 'arrow' hardware key is shifted one to the
127// left, compared to other Base layouts, and so is TRANS_RIGHT This is to
128// maintain 'window/command' key on the same key between layers.
129
130# ifdef TRANSMINIVAN_RIGHTSIDE
131 , TRANS_RIGHT
132# endif
133
134# ifdef MORE_KEY__ARROW
135
136 //, MORE_key2
137 , KC__YGUI
138
139// Note anomaly: not the usual configurable key (MORE_key2), but GUI. This
140// is because position has shifted already, and this GUI allows all the usual
141// keys on a 100% keyboard to be reached with all modifiers, including GUIs,
142// if 'command' hardware key is included. Unfortunately this causes a gap
143// in the numpad layout, but pressing GUI by itself in error will unlikely
144// produce serious mistakes. Maintaining similar keys between layers seems
145// more important. Since Numpad already is a navigation cluster, it seems
146// more important to allow all keys to be reachable with all modifiers,
147// including GUIs, than to have a quick switch over to the _MOV layer here.
148// Obviously it is fair enough to do this differently, but if someone needs a
149// Numpad + either GUI key combination, that could be a real problem without
150// GUIs here, whereas adding a _MOV switch is a matter of convenience. It
151// seems important to be able to type anything a regular 100% keyboard can,
152// or as near to it as possible.
153//
154// These anomalies are the same for all the Numpad layers here.
155
156# endif
157// ---⬆
158 , KC_KP_DOT
159
160 , KC_KP_ENTER
161// , , , <|,> , , ,
162// <1 ± ± , <2 , <3 , <4 |, 4> , 3> ± ± , 2> , 1>
163
164 ),
165
166 /* ⬆⬇ */
167
168 /* Layer _ALT_NSY: super-/sub-script numbers numpad, square layout
169 */
170
171 [ _ALT_NSY ] = LAYOUT_redefined (
172
173/*
174 Layer _..._BASE (super-/sub-script numbers, Numlock on/off)
175
176 <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2>
177 <|>
178 BASE Bspc ⁷₇ ⁸₈ ⁹₉ - | Bspc ⁷₇ ⁸₈ ⁹₉ - Bspc
179 = * ⁴₄ ⁵₅ ⁶₆ + | * ⁴₄ ⁵₅ ⁶₆ + =
180 LSht / ¹₁ ²₂ ³₃ , | / ¹₁ ²₂ ³₃ , RSht
181 -*- <|> -*- //(toggle) Access on Base
182 ------------------------------------------------------------------------
183 xxx ⁰₀ .DEL Ent | xxx ⁰₀ .DEL Ent
184 <|>
185 <1 ± <2 <3 <4 | 4> 3> ± 2> 1>
186 … | …¹
187
188 ₁) Note anomaly: additional hardware key ‛arrow’ shifted one to the left.
189
190*/
191//High/low numbers guide:
192//¹₁ ²₂ ³₃ ⁴₄ ⁵₅ | ⁶₆ ⁷₇ ⁸₈ ⁹₉ ⁰₀
193//XP_DRA_BA XP_DRA_BB XP_DRA_BC XP_DRA_BD XP_DRA_BE XP_DRA_BF XP_DRA_BG XP_DRA_BH XP_DRA_BI XP_DRA_BJ
194//
195// <pink2 , <pinky , <ring , <middl , <indx , <ind|, indx> , inde> , midd> , ring> , pink> , pink2> ,
196// -*!- , , , , , <|,> , , , , , ,
197 CTO_BASE , KC_BSPC , XP_DRA_BG , XP_DRA_BH , XP_DRA_BI , KC_KP_MINUS , KC_BSPC , XP_DRA_BG , XP_DRA_BH , XP_DRA_BI , KC_KP_MINUS , KC_BSPC ,
198 KC_KP_EQUAL , KC_KP_ASTERISK , XP_DRA_BD , XP_DRA_BE , XP_DRA_BF , KC_KP_PLUS , KC_KP_ASTERISK , XP_DRA_BD , XP_DRA_BE , XP_DRA_BF , KC_KP_PLUS , KC_KP_EQUAL ,
199 KC_LSFT , KC_KP_SLASH , XP_DRA_BA , XP_DRA_BB , XP_DRA_BC , KC_KP_COMMA , KC_KP_SLASH , XP_DRA_BA , XP_DRA_BB , XP_DRA_BC , KC_KP_COMMA , KC_RSFT ,
200// -----------------------------------------------------------------------------------------------------------------------------------------------------------------
201 XXXXXXX
202
203# ifdef TRANSMINIVAN_LEFTSIDE
204 , TRANS_LEFT
205# endif
206
207# ifdef MORE_KEY__COMMAND
208 , MORE_key1
209# endif
210
211 , XP_DRA_BJ , KC_KP_DOT , KC_KP_ENTER
212
213# ifdef TRANSMINIVAN_MIDLEFT
214 , TRANS_MIDLEFT
215# endif
216
217 , XXXXXXX , XP_DRA_BJ
218
219// See comment on the first layout in this file (double handed Base layer), about the next few keys:
220// ---⬇
221
222# ifdef TRANSMINIVAN_RIGHTSIDE
223 , TRANS_RIGHT
224# endif
225
226# ifdef MORE_KEY__ARROW
227 //, MORE_key2
228 , KC__YGUI
229# endif
230// ---⬆
231 , KC_KP_DOT
232
233 , KC_KP_ENTER
234// , , , <|,> , , ,
235// <1 ± ± , <2 , <3 , <4 |, 4> , 3> ± ± , 2> , 1>
236
237 ),
238
239 /* ⬆⬇ */
240
241# else // NUMPAD_BASE_SINGLE is defined ====================================================================
242
243 [ _ALT_BASE ] = LAYOUT_redefined (
244
245/*
246
247 * Layer Numbers Pad on Base:
248 * « See also documentation in keymap.c at _PAD layer, of which this is almost entirely a copy »
249 * One difference is the key to go to the _ALT_NSY layer (denoted “NUMS:” just below).
250 * The other difference is the key to switch to default Base and also immediately goes there
251 * (denoted “!AlterGo” here).
252
253 Layer _ALT_BASE (Number pad, with NumLock on)
254
255 <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2>
256 <|>
257 !AlterGo NUMS: xxx xxx xxx xxx | = 7 8 9 - Bspc // NUMS: to ¹/₁
258 LCtl xxx xxx xxx xxx xxx | * 4 5 6 + RCtl
259 LSht xxx xxx xxx xxx xxx | / 1 2 3 , RSht
260 ------------------------------------------------------------------------
261 LAlt Del Tab Ent | NumL 0 . RAlt
262 <|>
263 <1 ± <2 <3 <4 | 4> 3> ± 2> 1>
264 … | …¹
265
266 Layer _ALT_BASE (Number pad, with NumLock off)
267
268 <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring >pin>pink2>
269 <|>
270 !AlterGo NUMS: xxx xxx xxx xxx | = Home Up PgUp - Bspc // NUMS: to ¹/₁
271 LCtl xxx xxx xxx xxx xxx | * Left 5 Right + RCtl // modified 5
272 LSht xxx xxx xxx xxx xxx | / End Down PgDn , RSht
273 -------------------------------------------------------------------------
274 LAlt Del Tab Ent | NumL Ins Del RAlt
275 <|>
276 <1 ± <2 <3 <4 | 4> 3> ± 2> 1>
277 … | …¹
278
279 ₁) Note anomaly: additional hardware key ‛arrow’ shifted one to the left.
280
281*/
282
283//High/low numbers guide:
284//¹₁ ²₂ ³₃ ⁴₄ ⁵₅ | ⁶₆ ⁷₇ ⁸₈ ⁹₉ ⁰₀
285//XP_DRA_BA XP_DRA_BB XP_DRA_BC XP_DRA_BD XP_DRA_BE XP_DRA_BF XP_DRA_BG XP_DRA_BH XP_DRA_BI XP_DRA_BJ
286//
287// <pink2 , <pinky , <ring , <middl , <index , <indx2 |, indx2> , index> , middl> , ring> , pinky> , pink2> ,
288// , , , , , -*- <|,> , , , , , ,
289 OTHER_BASE_GO , CTO_NUMS , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_EQUAL , KC_KP_7 , KC_KP_8 , KC_KP_9 , KC_KP_MINUS , KC_BSPC ,
290 KC_LCTL , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_ASTERISK , KC_KP_4 , KC_KP_5 , KC_KP_6 , KC_KP_PLUS , KC_RCTL ,
291 KC_LSFT , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_SLASH , KC_KP_1 , KC_KP_2 , KC_KP_3 , KC_KP_COMMA , KC_RSFT ,
292// ------------------------------------------------------------------------------------------------------------------------------------
293 KC_LALT
294
295# ifdef TRANSMINIVAN_LEFTSIDE
296 , TRANS_LEFT
297# endif
298
299# ifdef MORE_KEY__COMMAND
300 , MORE_key1
301# endif
302
303 , KC_DEL , KC_TAB , KC_KP_ENTER
304
305# ifdef TRANSMINIVAN_MIDLEFT
306 , TRANS_MIDLEFT
307# endif
308
309 , KC_NUMLOCK , KC_KP_0
310
311// See comment on the first layout in this file (double handed Base layer), about the next few keys:
312// ---⬇
313
314# ifdef TRANSMINIVAN_RIGHTSIDE
315 , TRANS_RIGHT
316# endif
317
318# ifdef MORE_KEY__ARROW
319 //, MORE_key2
320 , KC__YGUI
321# endif
322// ---⬆
323 , KC_KP_DOT
324
325 , KC_RALT
326// , , , <|,> , , ,
327// <1 ± ± , <2 , <3 , <4 |, 4> , 3> ± ± , 2> , 1>
328
329 ),
330
331 /* ⬆⬇ */
332
333 [ _ALT_NSY ] = LAYOUT_redefined (
334
335/*
336
337 * Layer Numbers Pad on Base:
338 * This layer is the same as the above, except the numbers are in super-/sub-script.
339 *
340
341 Layer _ALT_NSY (Number pad, with NumLock on/off)
342
343 <pink2 <pinky<ring <middl<index<indx2| indx2>index>middl>ring>pin>pink2>
344 <|>
345 BASE xxx xxx xxx xxx xxx | = ⁷₇ ⁸₈ ⁹₉ - Bspc
346 LCtl xxx xxx xxx xxx xxx | * ⁴₄ ⁵₅ ⁶₆ + RCtl
347 LSht xxx xxx xxx xxx xxx | / ¹₁ ²₂ ³₃ , RSht
348 ------------------------------------------------------------------------
349 LAlt Del Tab Ent | xxx ⁰₀ .DEL RAlt
350 <|>
351 <1 ± <2 <3 <4 | 4> 3> ± 2> 1>
352 … | …¹
353
354 ₁) Note anomaly: additional hardware key ‛arrow’ shifted one to the left.
355
356*/
357
358//High/low numbers guide:
359//¹₁ ²₂ ³₃ ⁴₄ ⁵₅ | ⁶₆ ⁷₇ ⁸₈ ⁹₉ ⁰₀
360//XP_DRA_BA XP_DRA_BB XP_DRA_BC XP_DRA_BD XP_DRA_BE XP_DRA_BF XP_DRA_BG XP_DRA_BH XP_DRA_BI XP_DRA_BJ
361//
362// <pink2 , <pinky , <ring , <middl , <index , <indx2 |, indx2> , index> , middl> , ring> , pinky> , pink2> ,
363// , , , , , -*- <|,> , , , , , ,
364 CTO_BASE , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_EQUAL , XP_DRA_BG , XP_DRA_BH , XP_DRA_BI , KC_KP_MINUS , KC_BSPC ,
365 KC_LCTL , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_ASTERISK , XP_DRA_BD , XP_DRA_BE , XP_DRA_BF , KC_KP_PLUS , KC_RCTL ,
366 KC_LSFT , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_KP_SLASH , XP_DRA_BA , XP_DRA_BB , XP_DRA_BC , KC_KP_COMMA , KC_RSFT ,
367// -----------------------------------------------------------------------------------------------------------------------------------
368 KC_LALT
369
370# ifdef TRANSMINIVAN_LEFTSIDE
371 , TRANS_LEFT
372# endif
373
374# ifdef MORE_KEY__COMMAND
375 , MORE_key1
376# endif
377
378 , KC_DEL , KC_TAB , KC_KP_ENTER
379
380# ifdef TRANSMINIVAN_MIDLEFT
381 , TRANS_MIDLEFT
382# endif
383
384 , XXXXXXX , XP_DRA_BJ
385
386// See comment on the first layout in this file (double handed Base layer), about the next few keys:
387// ---⬇
388
389# ifdef TRANSMINIVAN_RIGHTSIDE
390 , TRANS_RIGHT
391# endif
392
393# ifdef MORE_KEY__ARROW
394 //, MORE_key2
395 , KC__YGUI
396# endif
397// ---⬆
398 , KC_KP_DOT
399
400 , KC_RALT
401// , , , <|,> , , ,
402// <1 ± ± , <2 , <3 , <4 |, 4> , 3> ± ± , 2> , 1>
403
404 ),
405
406# endif // NUMPAD_BASE_SINGLE
407
408 /* ⬆⬇ */
409