aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/planck/keymaps/ttys0/config.h24
-rw-r--r--keyboards/planck/keymaps/ttys0/keymap.c280
-rw-r--r--keyboards/planck/keymaps/ttys0/readme.md5
-rw-r--r--keyboards/planck/keymaps/ttys0/rules.mk4
-rw-r--r--keyboards/preonic/keymaps/ttys0/config.h29
-rw-r--r--keyboards/preonic/keymaps/ttys0/keymap.c283
-rw-r--r--keyboards/preonic/keymaps/ttys0/readme.md3
-rw-r--r--keyboards/preonic/keymaps/ttys0/rules.mk2
8 files changed, 630 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/ttys0/config.h b/keyboards/planck/keymaps/ttys0/config.h
new file mode 100644
index 000000000..2c7d3aeec
--- /dev/null
+++ b/keyboards/planck/keymaps/ttys0/config.h
@@ -0,0 +1,24 @@
1/* Copyright 2021 Sean Johnson
2 *
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 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#pragma once
18
19#ifdef AUDIO_ENABLE
20 #define STARTUP_SONG SONG(COLEMAK_SOUND)
21#endif
22
23// Most tactile encoders have detents every 4 stages
24#define ENCODER_RESOLUTION 4
diff --git a/keyboards/planck/keymaps/ttys0/keymap.c b/keyboards/planck/keymaps/ttys0/keymap.c
new file mode 100644
index 000000000..ed392bfb9
--- /dev/null
+++ b/keyboards/planck/keymaps/ttys0/keymap.c
@@ -0,0 +1,280 @@
1/* Copyright 2021 Sean Johnson
2 *
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 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#include QMK_KEYBOARD_H
18#include "muse.h"
19
20#define a KC_A
21#define b KC_B
22#define c KC_C
23#define d KC_D
24#define e KC_E
25#define f KC_F
26#define g KC_G
27#define h KC_H
28#define i KC_I
29#define j KC_J
30#define k KC_K
31#define l KC_L
32#define m KC_M
33#define n KC_N
34#define o KC_O
35#define p KC_P
36#define q KC_Q
37#define r KC_R
38#define s KC_S
39#define t KC_T
40#define u KC_U
41#define v KC_V
42#define w KC_W
43#define x KC_X
44#define y KC_Y
45#define z KC_Z
46
47#define lopt KC_LALT
48#define lctl KC_LCTL
49#define lsft KC_LSFT
50#define ropt KC_RALT
51#define rctl KC_RCTL
52#define rsft KC_RSFT
53
54#define n0 KC_0
55#define n1 KC_1
56#define n2 KC_2
57#define n3 KC_3
58#define n4 KC_4
59#define n5 KC_5
60#define n6 KC_6
61#define n7 KC_7
62#define n8 KC_8
63#define n9 KC_9
64
65#define bspc KC_BSPC
66#define caps KC_CAPS
67#define comm KC_COMM
68#define dash A(KC_MINS)
69#define scln KC_SCLN
70#define slsh KC_SLSH
71#define spc KC_SPC
72#define tab KC_TAB
73#define del KC_DEL
74#define dot KC_DOT
75#define ent KC_ENT
76#define mins KC_MINS
77#define quot KC_QUOT
78#define esc KC_ESC
79#define escg KC_GESC
80
81#define down KC_DOWN
82#define home G(KC_LEFT)
83#define end G(KC_RGHT)
84#define up KC_UP
85#define pgdn KC_PGDN
86#define pgup KC_PGUP
87#define left KC_LEFT
88#define rght KC_RGHT
89
90#define tabl G(S(KC_LBRC))
91#define tabr G(S(KC_RBRC))
92#define fwd G(KC_RBRC)
93#define back G(KC_LBRC)
94#define dtl C(KC_LEFT)
95#define dtr C(KC_RGHT)
96#define slup S(A(KC_UP))
97#define sldn S(A(KC_DOWN))
98
99#define f1 KC_F1
100#define f2 KC_F2
101#define f3 KC_F3
102#define f4 KC_F4
103#define f5 KC_F5
104#define f6 KC_F6
105#define f7 KC_F7
106#define f8 KC_F8
107#define f9 KC_F9
108#define f10 KC_F10
109#define f11 KC_F11
110#define f12 KC_F12
111#define f13 KC_F13
112#define f14 KC_F14
113#define f15 KC_F15
114#define f16 KC_F16
115#define f17 KC_F17
116#define f18 KC_F18
117#define f19 KC_F19
118#define f20 KC_F20
119
120#define mute KC_MUTE
121#define next KC_MNXT
122#define play KC_MPLY
123#define prev KC_MPRV
124#define vold KC_VOLD
125#define volu KC_VOLU
126
127#define symb MO(SYMB)
128#define move MO(MOVE)
129#define func MO(FUNC)
130
131#define rset RESET
132#define powr KC_POWER
133
134#define ____ KC_TRNS
135#define xxxx KC_NO
136
137#define emji LCMD(LCTL(KC_SPC))
138#define hypr OSM(MOD_HYPR)
139#define brup KC_BRMU
140#define brdn KC_BRMD
141#define escf LT(FUNC,KC_ESC)
142
143enum planck_layers {
144 BASE,
145 SYMB,
146 MOVE,
147 FUNC,
148};
149
150enum planck_keycodes {
151 ampr = SAFE_RANGE,
152 astr,
153 at,
154 bsls,
155 circ,
156 dlr,
157 eql,
158 exlm,
159 grv,
160 hash,
161 lbrc,
162 lcbr,
163 lprn,
164 perc,
165 pipe,
166 plus,
167 rbrc,
168 rcbr,
169 rprn,
170 tild,
171 cmd,
172};
173
174const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
175 [BASE] = LAYOUT_planck_grid(
176 tab, q, w, f, p, g, j, l, u, y, scln, mins,
177 bspc, a, r, s, t, d, h, n, e, i, o, quot,
178 lsft, z, x, c, v, b, k, m, comm, dot, slsh, rsft,
179 hypr, lctl, lopt, cmd, move, ent, spc, symb, cmd, ropt, rctl, func
180 ),
181
182 [SYMB] = LAYOUT_planck_grid(
183 esc, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash,
184 bspc, lbrc, lcbr, lprn, hash, pipe, astr, dlr, rprn, rcbr, rbrc, at,
185 ____, grv, exlm, circ, tild, perc, ampr, plus, mins, eql, bsls, ____,
186 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
187 ),
188
189 [MOVE] = LAYOUT_planck_grid(
190 esc, xxxx, slup, dtl, dtr, xxxx, xxxx, home, up, end, xxxx, ____,
191 del, xxxx, sldn, tabl, tabr, xxxx, xxxx, left, down, rght, xxxx, ____,
192 ____, xxxx, xxxx, back, fwd, xxxx, xxxx, pgdn, pgup, xxxx, xxxx, ____,
193 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
194 ),
195
196 [FUNC] = LAYOUT_planck_grid(
197 rset, f7, f5, f3, f1, f9, f8, f10, f2, f4, f6, volu,
198 powr, f17, f15, f13, f11, f19, f18, f20, f12, f14, f16, vold,
199 brup, ____, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, mute,
200 brdn, caps, ____, ____, ____, ____, ____, ____, prev, next, play, ____
201 ),
202};
203
204
205bool send_string_if_keydown(keyrecord_t *record, const char *s) {
206 if (record->event.pressed) {
207 send_string(s);
208 }
209 return true;
210}
211
212int cmd_keys_down = 0;
213
214bool process_record_user(uint16_t keycode, keyrecord_t *record) {
215 switch (keycode) {
216 // Override the default auto shifted symbols to use SEND_STRING See
217 // https://github.com/qmk/qmk_firmware/issues/4072
218 case ampr:
219 return send_string_if_keydown(record, "&");
220 case astr:
221 return send_string_if_keydown(record, "*");
222 case at:
223 return send_string_if_keydown(record, "@");
224 case bsls:
225 return send_string_if_keydown(record, "\\");
226 case circ:
227 return send_string_if_keydown(record, "^");
228 case dlr:
229 return send_string_if_keydown(record, "$");
230 case eql:
231 return send_string_if_keydown(record, "=");
232 case exlm:
233 return send_string_if_keydown(record, "!");
234 case grv:
235 return send_string_if_keydown(record, "`");
236 case hash:
237 return send_string_if_keydown(record, "#");
238 case lbrc:
239 return send_string_if_keydown(record, "[");
240 case lcbr:
241 return send_string_if_keydown(record, "{");
242 case lprn:
243 return send_string_if_keydown(record, "(");
244 case perc:
245 return send_string_if_keydown(record, "%");
246 case pipe:
247 return send_string_if_keydown(record, "|");
248 case plus:
249 return send_string_if_keydown(record, "+");
250 case rbrc:
251 return send_string_if_keydown(record, "]");
252 case rcbr:
253 return send_string_if_keydown(record, "}");
254 case rprn:
255 return send_string_if_keydown(record, ")");
256 case tild:
257 return send_string_if_keydown(record, "~");
258
259 // cmd + cmd -> cmd + ctl
260 case cmd:
261 if (record->event.pressed) {
262 if (cmd_keys_down == 0) {
263 register_code(KC_LCMD);
264 } else {
265 register_code(KC_LCTL);
266 }
267 cmd_keys_down++;
268 } else {
269 if (cmd_keys_down == 1) {
270 unregister_code(KC_LCMD);
271 } else {
272 unregister_code(KC_LCTL);
273 }
274 cmd_keys_down--;
275 }
276 return true;
277 }
278 return true;
279}
280
diff --git a/keyboards/planck/keymaps/ttys0/readme.md b/keyboards/planck/keymaps/ttys0/readme.md
new file mode 100644
index 000000000..9684d1042
--- /dev/null
+++ b/keyboards/planck/keymaps/ttys0/readme.md
@@ -0,0 +1,5 @@
1# Sean's Planck Config
2
3This is basically a copy of the `callum` layout with a few minor adjustments to better fit my style.
4
5[Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/7fef3554143712e2317b466c09a73a27)
diff --git a/keyboards/planck/keymaps/ttys0/rules.mk b/keyboards/planck/keymaps/ttys0/rules.mk
new file mode 100644
index 000000000..faa09801b
--- /dev/null
+++ b/keyboards/planck/keymaps/ttys0/rules.mk
@@ -0,0 +1,4 @@
1# Make some noise
2SRC += muse.c
3
4
diff --git a/keyboards/preonic/keymaps/ttys0/config.h b/keyboards/preonic/keymaps/ttys0/config.h
new file mode 100644
index 000000000..f846d1477
--- /dev/null
+++ b/keyboards/preonic/keymaps/ttys0/config.h
@@ -0,0 +1,29 @@
1/* Copyright 2021 Sean Johnson
2 *
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 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#pragma once
18
19#ifdef AUDIO_ENABLE
20 #define STARTUP_SONG SONG(PREONIC_SOUND)
21
22 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
23 SONG(COLEMAK_SOUND), \
24 SONG(DVORAK_SOUND) \
25 }
26#endif
27
28// Most tactile encoders have detents every 4 stages
29#define ENCODER_RESOLUTION 4
diff --git a/keyboards/preonic/keymaps/ttys0/keymap.c b/keyboards/preonic/keymaps/ttys0/keymap.c
new file mode 100644
index 000000000..577e69e74
--- /dev/null
+++ b/keyboards/preonic/keymaps/ttys0/keymap.c
@@ -0,0 +1,283 @@
1/* Copyright 2021 Sean Johnson
2 *
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 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#include QMK_KEYBOARD_H
18#include "muse.h"
19
20#define a KC_A
21#define b KC_B
22#define c KC_C
23#define d KC_D
24#define e KC_E
25#define f KC_F
26#define g KC_G
27#define h KC_H
28#define i KC_I
29#define j KC_J
30#define k KC_K
31#define l KC_L
32#define m KC_M
33#define n KC_N
34#define o KC_O
35#define p KC_P
36#define q KC_Q
37#define r KC_R
38#define s KC_S
39#define t KC_T
40#define u KC_U
41#define v KC_V
42#define w KC_W
43#define x KC_X
44#define y KC_Y
45#define z KC_Z
46
47#define lopt KC_LALT
48#define lctl KC_LCTL
49#define lsft KC_LSFT
50#define ropt KC_RALT
51#define rctl KC_RCTL
52#define rsft KC_RSFT
53
54#define n0 KC_0
55#define n1 KC_1
56#define n2 KC_2
57#define n3 KC_3
58#define n4 KC_4
59#define n5 KC_5
60#define n6 KC_6
61#define n7 KC_7
62#define n8 KC_8
63#define n9 KC_9
64
65#define bspc KC_BSPC
66#define caps KC_CAPS
67#define comm KC_COMM
68#define dash A(KC_MINS)
69#define scln KC_SCLN
70#define slsh KC_SLSH
71#define spc KC_SPC
72#define tab KC_TAB
73#define del KC_DEL
74#define dot KC_DOT
75#define ent KC_ENT
76#define mins KC_MINS
77#define quot KC_QUOT
78#define esc KC_ESC
79
80#define down KC_DOWN
81#define home G(KC_LEFT)
82#define end G(KC_RGHT)
83#define up KC_UP
84#define pgdn KC_PGDN
85#define pgup KC_PGUP
86#define left KC_LEFT
87#define rght KC_RGHT
88
89#define tabl G(S(KC_LBRC))
90#define tabr G(S(KC_RBRC))
91#define fwd G(KC_RBRC)
92#define back G(KC_LBRC)
93#define dtl C(KC_LEFT)
94#define dtr C(KC_RGHT)
95#define slup S(A(KC_UP))
96#define sldn S(A(KC_DOWN))
97
98#define f1 KC_F1
99#define f2 KC_F2
100#define f3 KC_F3
101#define f4 KC_F4
102#define f5 KC_F5
103#define f6 KC_F6
104#define f7 KC_F7
105#define f8 KC_F8
106#define f9 KC_F9
107#define f10 KC_F10
108#define f11 KC_F11
109#define f12 KC_F12
110#define f13 KC_F13
111#define f14 KC_F14
112#define f15 KC_F15
113#define f16 KC_F16
114#define f17 KC_F17
115#define f18 KC_F18
116#define f19 KC_F19
117#define f20 KC_F20
118
119#define mute KC_MUTE
120#define next KC_MNXT
121#define play KC_MPLY
122#define prev KC_MPRV
123#define vold KC_VOLD
124#define volu KC_VOLU
125
126#define symb MO(SYMB)
127#define move MO(MOVE)
128#define func MO(FUNC)
129
130#define rset RESET
131#define powr KC_POWER
132
133#define ____ KC_TRNS
134#define xxxx KC_NO
135
136#define emji LCMD(LCTL(KC_SPC))
137#define hypr OSM(MOD_HYPR)
138#define brup KC_BRMU
139#define brdn KC_BRMD
140#define escf LT(FUNC,KC_ESC)
141
142enum preonic_layers {
143 BASE,
144 SYMB,
145 MOVE,
146 FUNC,
147};
148
149enum preonic_keycodes {
150 ampr = SAFE_RANGE,
151 astr,
152 at,
153 bsls,
154 circ,
155 dlr,
156 eql,
157 exlm,
158 grv,
159 hash,
160 lbrc,
161 lcbr,
162 lprn,
163 perc,
164 pipe,
165 plus,
166 rbrc,
167 rcbr,
168 rprn,
169 tild,
170 cmd,
171};
172
173const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
174 [BASE] = LAYOUT_preonic_grid(
175 tild, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, mins,
176 tab, q, w, f, p, g, j, l, u, y, scln, pipe,
177 bspc, a, r, s, t, d, h, n, e, i, o, quot,
178 lsft, z, x, c, v, b, k, m, comm, dot, slsh, rsft,
179 hypr, lctl, lopt, cmd, move, ent, spc, symb, cmd, ropt, rctl, escf
180 ),
181
182 [SYMB] = LAYOUT_preonic_grid(
183 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
184 tild, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash,
185 bspc, lbrc, lcbr, lprn, hash, pipe, astr, dlr, rprn, rcbr, rbrc, at,
186 ____, grv, exlm, circ, ampr, ____, ____, plus, mins, eql, bsls, perc,
187 caps, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
188 ),
189
190 [MOVE] = LAYOUT_preonic_grid(
191 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
192 ____, xxxx, slup, dtl, dtr, xxxx, xxxx, home, up, end, xxxx, xxxx,
193 del, xxxx, sldn, tabl, tabr, xxxx, xxxx, left, down, rght, xxxx, xxxx,
194 ____, xxxx, xxxx, back, fwd, xxxx, xxxx, pgdn, pgup, xxxx, xxxx, ____,
195 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
196 ),
197
198 [FUNC] = LAYOUT_preonic_grid(
199 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
200 rset, f7, f5, f3, f1, f9, f8, f10, f2, f4, f6, volu,
201 powr, f17, f15, f13, f11, f19, f18, f20, f12, f14, f16, vold,
202 brup, brdn, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, ____,
203 ____, ____, ____, ____, ____, ____, ____, mute, play, prev, next, ____
204 ),
205};
206
207
208bool send_string_if_keydown(keyrecord_t *record, const char *s) {
209 if (record->event.pressed) {
210 send_string(s);
211 }
212 return true;
213}
214
215int cmd_keys_down = 0;
216
217bool process_record_user(uint16_t keycode, keyrecord_t *record) {
218 switch (keycode) {
219 // Override the default auto shifted symbols to use SEND_STRING See
220 // https://github.com/qmk/qmk_firmware/issues/4072
221 case ampr:
222 return send_string_if_keydown(record, "&");
223 case astr:
224 return send_string_if_keydown(record, "*");
225 case at:
226 return send_string_if_keydown(record, "@");
227 case bsls:
228 return send_string_if_keydown(record, "\\");
229 case circ:
230 return send_string_if_keydown(record, "^");
231 case dlr:
232 return send_string_if_keydown(record, "$");
233 case eql:
234 return send_string_if_keydown(record, "=");
235 case exlm:
236 return send_string_if_keydown(record, "!");
237 case grv:
238 return send_string_if_keydown(record, "`");
239 case hash:
240 return send_string_if_keydown(record, "#");
241 case lbrc:
242 return send_string_if_keydown(record, "[");
243 case lcbr:
244 return send_string_if_keydown(record, "{");
245 case lprn:
246 return send_string_if_keydown(record, "(");
247 case perc:
248 return send_string_if_keydown(record, "%");
249 case pipe:
250 return send_string_if_keydown(record, "|");
251 case plus:
252 return send_string_if_keydown(record, "+");
253 case rbrc:
254 return send_string_if_keydown(record, "]");
255 case rcbr:
256 return send_string_if_keydown(record, "}");
257 case rprn:
258 return send_string_if_keydown(record, ")");
259 case tild:
260 return send_string_if_keydown(record, "~");
261
262 // cmd + cmd -> cmd + ctl
263 case cmd:
264 if (record->event.pressed) {
265 if (cmd_keys_down == 0) {
266 register_code(KC_LCMD);
267 } else {
268 register_code(KC_LCTL);
269 }
270 cmd_keys_down++;
271 } else {
272 if (cmd_keys_down == 1) {
273 unregister_code(KC_LCMD);
274 } else {
275 unregister_code(KC_LCTL);
276 }
277 cmd_keys_down--;
278 }
279 return true;
280 }
281 return true;
282}
283
diff --git a/keyboards/preonic/keymaps/ttys0/readme.md b/keyboards/preonic/keymaps/ttys0/readme.md
new file mode 100644
index 000000000..e39a8ba5a
--- /dev/null
+++ b/keyboards/preonic/keymaps/ttys0/readme.md
@@ -0,0 +1,3 @@
1# Sean's Preonic Config
2
3This is basically a copy of the `callum` Planck layout adjusted to the Preonic layout with a few minor adjustments.
diff --git a/keyboards/preonic/keymaps/ttys0/rules.mk b/keyboards/preonic/keymaps/ttys0/rules.mk
new file mode 100644
index 000000000..22df9b39f
--- /dev/null
+++ b/keyboards/preonic/keymaps/ttys0/rules.mk
@@ -0,0 +1,2 @@
1# Make some noise
2SRC += muse.c