aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-08-19 08:19:50 -0400
committerGitHub <noreply@github.com>2017-08-19 08:19:50 -0400
commit81d7e7d4c8b99e032ce9423da56dba46f8bce18f (patch)
tree9ef05b0ad2b666a2d471d271efac740041859f31
parent30ac7d403e80bcf5908f2f270658eac0754f2d65 (diff)
parent4c4a174dbe3a06e557c6fae2d3e1779ba22dac16 (diff)
downloadqmk_firmware-81d7e7d4c8b99e032ce9423da56dba46f8bce18f.tar.gz
qmk_firmware-81d7e7d4c8b99e032ce9423da56dba46f8bce18f.zip
Merge pull request #1601 from dlaroe/master
My keymaps only
-rw-r--r--keyboards/lets_split/keymaps/dale/Makefile3
-rw-r--r--keyboards/lets_split/keymaps/dale/config.h37
-rw-r--r--keyboards/lets_split/keymaps/dale/defaultkeymap.c214
-rw-r--r--keyboards/lets_split/keymaps/dale/keymap.c250
-rw-r--r--keyboards/planck/keymaps/dale/Makefile25
-rw-r--r--keyboards/planck/keymaps/dale/config.h36
-rw-r--r--keyboards/planck/keymaps/dale/keymap.c250
-rw-r--r--keyboards/planck/keymaps/dale/readme.md6
-rw-r--r--keyboards/preonic/keymaps/dale/Makefile25
-rw-r--r--keyboards/preonic/keymaps/dale/config.h29
-rw-r--r--keyboards/preonic/keymaps/dale/keymap.c296
-rw-r--r--keyboards/preonic/keymaps/dale/readme.md2
12 files changed, 1173 insertions, 0 deletions
diff --git a/keyboards/lets_split/keymaps/dale/Makefile b/keyboards/lets_split/keymaps/dale/Makefile
new file mode 100644
index 000000000..457a3d01d
--- /dev/null
+++ b/keyboards/lets_split/keymaps/dale/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif
diff --git a/keyboards/lets_split/keymaps/dale/config.h b/keyboards/lets_split/keymaps/dale/config.h
new file mode 100644
index 000000000..7f33a4363
--- /dev/null
+++ b/keyboards/lets_split/keymaps/dale/config.h
@@ -0,0 +1,37 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef CONFIG_USER_H
22#define CONFIG_USER_H
23
24#include "../../config.h"
25
26/* Use I2C or Serial, not both */
27
28#define USE_SERIAL
29// #define USE_I2C
30
31/* Select hand configuration */
32
33#define MASTER_LEFT
34// #define _MASTER_RIGHT
35// #define EE_HANDS
36
37#endif \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/dale/defaultkeymap.c b/keyboards/lets_split/keymaps/dale/defaultkeymap.c
new file mode 100644
index 000000000..936312b2e
--- /dev/null
+++ b/keyboards/lets_split/keymaps/dale/defaultkeymap.c
@@ -0,0 +1,214 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
36 * |------+------+------+------+------+-------------+------+------+------+------+------|
37 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
38 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = KEYMAP( \
45 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
46 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
48 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
49),
50
51/* Colemak
52 * ,-----------------------------------------------------------------------------------.
53 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
54 * |------+------+------+------+------+-------------+------+------+------+------+------|
55 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
56 * |------+------+------+------+------+------|------+------+------+------+------+------|
57 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
60 * `-----------------------------------------------------------------------------------'
61 */
62[_COLEMAK] = KEYMAP( \
63 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
64 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
66 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
67),
68
69/* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
72 * |------+------+------+------+------+-------------+------+------+------+------+------|
73 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
74 * |------+------+------+------+------+------|------+------+------+------+------+------|
75 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
78 * `-----------------------------------------------------------------------------------'
79 */
80[_DVORAK] = KEYMAP( \
81 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
82 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
83 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
84 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
85),
86
87/* Lower
88 * ,-----------------------------------------------------------------------------------.
89 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | | | | | | | | Next | Vol- | Vol+ | Play |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_LOWER] = KEYMAP( \
99 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
100 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
101 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
102 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
103),
104
105/* Raise
106 * ,-----------------------------------------------------------------------------------.
107 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
108 * |------+------+------+------+------+-------------+------+------+------+------+------|
109 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
110 * |------+------+------+------+------+------|------+------+------+------+------+------|
111 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
112 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | | | | | | | | Next | Vol- | Vol+ | Play |
114 * `-----------------------------------------------------------------------------------'
115 */
116[_RAISE] = KEYMAP( \
117 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
118 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
119 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
120 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
121),
122
123/* Adjust (Lower + Raise)
124 * ,-----------------------------------------------------------------------------------.
125 * | | Reset| | | | | | | | | | Del |
126 * |------+------+------+------+------+-------------+------+------+------+------+------|
127 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
128 * |------+------+------+------+------+------|------+------+------+------+------+------|
129 * | | | | | | | | | | | | |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | | | | | | | | | | | |
132 * `-----------------------------------------------------------------------------------'
133 */
134[_ADJUST] = KEYMAP( \
135 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
136 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
137 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
139)
140
141
142};
143
144#ifdef AUDIO_ENABLE
145float tone_qwerty[][2] = SONG(QWERTY_SOUND);
146float tone_dvorak[][2] = SONG(DVORAK_SOUND);
147float tone_colemak[][2] = SONG(COLEMAK_SOUND);
148#endif
149
150void persistent_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer);
153}
154
155bool process_record_user(uint16_t keycode, keyrecord_t *record) {
156 switch (keycode) {
157 case QWERTY:
158 if (record->event.pressed) {
159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif
162 persistent_default_layer_set(1UL<<_QWERTY);
163 }
164 return false;
165 break;
166 case COLEMAK:
167 if (record->event.pressed) {
168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif
171 persistent_default_layer_set(1UL<<_COLEMAK);
172 }
173 return false;
174 break;
175 case DVORAK:
176 if (record->event.pressed) {
177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif
180 persistent_default_layer_set(1UL<<_DVORAK);
181 }
182 return false;
183 break;
184 case LOWER:
185 if (record->event.pressed) {
186 layer_on(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 } else {
189 layer_off(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 }
192 return false;
193 break;
194 case RAISE:
195 if (record->event.pressed) {
196 layer_on(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 } else {
199 layer_off(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 }
202 return false;
203 break;
204 case ADJUST:
205 if (record->event.pressed) {
206 layer_on(_ADJUST);
207 } else {
208 layer_off(_ADJUST);
209 }
210 return false;
211 break;
212 }
213 return true;
214} \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/dale/keymap.c b/keyboards/lets_split/keymaps/dale/keymap.c
new file mode 100644
index 000000000..63465237c
--- /dev/null
+++ b/keyboards/lets_split/keymaps/dale/keymap.c
@@ -0,0 +1,250 @@
1// Can't Remember Sh*t Keymap for Let's Split
2// Trying to fit as many characters as possible on the default layer
3// as its easier for me to remember logical functions than characters
4// Also, I like me some numpad
5
6
7#include "lets_split.h"
8#include "action_layer.h"
9#ifdef AUDIO_ENABLE
10 #include "audio.h"
11#endif
12#include "eeconfig.h"
13
14extern keymap_config_t keymap_config;
15
16// Each layer gets a name for readability, which is then used in the keymap matrix below.
17// The underscores don't mean anything - you can have a layer called STUFF or any other name.
18// Layer names don't all need to be of the same length, obviously, and you can also skip them
19// entirely and just use numbers.
20#define _QWERTY 0
21#define _GAME 1
22#define _LOWER 3
23#define _RAISE 4
24#define _ADJUST 16
25
26enum custom_keycodes {
27 QWERTY = SAFE_RANGE,
28 GAME,
29 LOWER,
30 RAISE,
31 BACKLIT,
32};
33
34// Fillers to make layering more clear
35#define _______ KC_TRNS
36#define XXXXXXX KC_NO
37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39
40/* Qwerty
41 * ,-----------------------------------------------------------------------------------.
42 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
43 * |------+------+------+------+------+-------------+------+------+------+------+------|
44 * | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
45 * |------+------+------+------+------+------|------+------+------+------+------+------|
46 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
47 * |------+------+------+------+------+------+------+------+------+------+------+------|
48 * | Ctrl | GUI | \ | Alt | Lower|SpcRse| Space|Raise | [ | - | = | ] |
49 * `-----------------------------------------------------------------------------------'
50 */
51[_QWERTY] = KEYMAP( \
52 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
53 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
54 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
55 KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, LT(4, KC_SPC), KC_SPC, RAISE, LT(3, KC_LBRC), KC_MINS, KC_EQL, CTL_T(KC_RBRC) \
56),
57
58/* Game
59 * ,-----------------------------------------------------------------------------------.
60 * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp |
61 * |------+------+------+------+------+-------------+------+------+------+------+------|
62 * |Shift | A | S | D | F | G | H | J | K | L | ; | ' |
63 * |------+------+------+------+------+------|------+------+------+------+------+------|
64 * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter |
65 * |------+------+------+------+------+------+------+------+------+------+------+------|
66 * | Alt | 4 | 3 | 2 | Lower| Space |Raise | Left | Down | Up | Right|
67 * `-----------------------------------------------------------------------------------'
68 */
69[_GAME] = KEYMAP( \
70 KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
71 KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
72 KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ , \
73 KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \
74),
75
76
77/* Lower (switched to # because KP# were weird in terminal emulators)
78 * ,-----------------------------------------------------------------------------------.
79 * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
80 * |------+------+------+------+------+-------------+------+------+------+------+------|
81 * | Tab | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * |
82 * |------+------+------+------+------+------+------+------+------+------+------+------|
83 * | NumLk| F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter |
84 * |------+------+------+------+------+------+------+------+------+------+------+------|
85 * | Esc | | | | | | 0 | | | | KP_+ | |
86 * `-----------------------------------------------------------------------------------'
87 */
88[_LOWER] = KEYMAP( \
89 KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
90 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_DOT, KC_ASTR, \
91 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______, \
92 KC_ESC, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, KC_PLUS, _______ \
93),
94
95/* Raise
96 * ,-----------------------------------------------------------------------------------.
97 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
98 * |------+------+------+------+------+-------------+------+------+------+------+------|
99 * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` |
100 * |------+------+------+------+------+------|------+------+------+------+------+------|
101 * | | Wh Dn| M-L | M-Dn | M-R | ACL0 | ACL1 | ACL2 | | | \ | |
102 * |------+------+------+------+------+------+------+------+------+------+------+------|
103 * | | App | | | | | Ins | | Home | PGDN | PGUP | End |
104 * `-----------------------------------------------------------------------------------'
105 */
106[_RAISE] = KEYMAP( \
107 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
108 KC_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV, \
109 _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, KC_BSLASH, _______, \
110 _______, KC_APP, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
111),
112
113/* Adjust (Lower + Raise)
114 * ,-----------------------------------------------------------------------------------.
115 * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D |
116 * |------+------+------+------+------+-------------+------+------+------+------+------|
117 * | | | |Aud on|Audoff| Game |AGswap|AGnorm| | | | |
118 * |------+------+------+------+------+------|------+------+------+------+------+------|
119 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
120 * |------+------+------+------+------+------+------+------+------+------+------+------|
121 * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST |
122 * `-----------------------------------------------------------------------------------'
123 */
124[_ADJUST] = KEYMAP( \
125 LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL)), \
126 _______, _______, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, _______, _______, _______, _______, \
127 _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
128 BACKLIT, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP \
129)
130
131
132};
133
134const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
135{
136 switch(id) {
137 case 0: // this would trigger when you hit a key mapped as M(0)
138 if (record->event.pressed) {
139 return MACRO( D(LSFT), T(LEFT), U(LSFT), D(LCTL), T(X), U(LCTL), T(RIGHT), D(LCTL), T(V), U(LCTL), T(LEFT), END ); // this swaps the characters on either side of the cursor when the macro executes
140 }
141 break;
142 }
143 return MACRO_NONE;
144};
145
146
147#ifdef AUDIO_ENABLE
148
149float tone_startup[][2] = SONG(STARTUP_SOUND);
150float tone_qwerty[][2] = SONG(QWERTY_SOUND);
151float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
152
153float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
154#endif
155
156
157void persistant_default_layer_set(uint16_t default_layer) {
158 eeconfig_update_default_layer(default_layer);
159 default_layer_set(default_layer);
160}
161
162bool process_record_user(uint16_t keycode, keyrecord_t *record) {
163 switch (keycode) {
164 case QWERTY:
165 if (record->event.pressed) {
166 #ifdef AUDIO_ENABLE
167 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
168 #endif
169 persistant_default_layer_set(1UL<<_QWERTY);
170 }
171 return false;
172 break;
173 case GAME:
174 if (record->event.pressed) {
175 #ifdef AUDIO_ENABLE
176 PLAY_NOTE_ARRAY(music_scale, false, 0);
177 #endif
178 persistant_default_layer_set(1UL<<_GAME);
179 }
180 return false;
181 break;
182
183
184 case LOWER:
185 if (record->event.pressed) {
186 layer_on(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 } else {
189 layer_off(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 }
192 return false;
193 break;
194 case RAISE:
195 if (record->event.pressed) {
196 layer_on(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 } else {
199 layer_off(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 }
202 return false;
203 break;
204 case BACKLIT:
205 if (record->event.pressed) {
206 register_code(KC_RSFT);
207 #ifdef BACKLIGHT_ENABLE
208 backlight_step();
209 #endif
210 } else {
211 unregister_code(KC_RSFT);
212 }
213 return false;
214 break;
215 }
216 return true;
217}
218
219void matrix_init_user(void) {
220 #ifdef AUDIO_ENABLE
221 startup_user();
222 #endif
223}
224
225#ifdef AUDIO_ENABLE
226
227void startup_user()
228{
229 _delay_ms(20); // gets rid of tick
230 PLAY_NOTE_ARRAY(tone_startup, false, 0);
231}
232
233void shutdown_user()
234{
235 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
236 _delay_ms(150);
237 stop_all_notes();
238}
239
240void music_on_user(void)
241{
242 music_scale_user();
243}
244
245void music_scale_user(void)
246{
247 PLAY_NOTE_ARRAY(music_scale, false, 0);
248}
249
250#endif
diff --git a/keyboards/planck/keymaps/dale/Makefile b/keyboards/planck/keymaps/dale/Makefile
new file mode 100644
index 000000000..156a3a0a9
--- /dev/null
+++ b/keyboards/planck/keymaps/dale/Makefile
@@ -0,0 +1,25 @@
1
2
3# Build Options
4# change to "no" to disable the options, or define them in the Makefile in
5# the appropriate keymap folder that will get included automatically
6#
7BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
9EXTRAKEY_ENABLE = no # Audio control and System control(+450)
10CONSOLE_ENABLE = no # Console for debug(+400)
11COMMAND_ENABLE = yes # Commands for debug and configuration
12NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
13BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
14MIDI_ENABLE = no # MIDI controls
15AUDIO_ENABLE = yes # Audio output on port C6
16UNICODE_ENABLE = no # Unicode
17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
18RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
19
20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
22
23ifndef QUANTUM_DIR
24 include ../../../../Makefile
25endif
diff --git a/keyboards/planck/keymaps/dale/config.h b/keyboards/planck/keymaps/dale/config.h
new file mode 100644
index 000000000..11d51c818
--- /dev/null
+++ b/keyboards/planck/keymaps/dale/config.h
@@ -0,0 +1,36 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29
30#define MOUSEKEY_INTERVAL 20
31#define MOUSEKEY_DELAY 0
32#define MOUSEKEY_TIME_TO_MAX 100
33#define MOUSEKEY_MAX_SPEED 10
34#define MOUSEKEY_WHEEL_DELAY 0
35
36#endif
diff --git a/keyboards/planck/keymaps/dale/keymap.c b/keyboards/planck/keymaps/dale/keymap.c
new file mode 100644
index 000000000..caf0003d2
--- /dev/null
+++ b/keyboards/planck/keymaps/dale/keymap.c
@@ -0,0 +1,250 @@
1// Can't Remember Sh*t Keymap for Planck
2// Trying to fit as many characters as possible on the default layer
3// as its easier for me to remember logical functions than characters
4// Also, I like me some numpad
5
6
7#include "planck.h"
8#include "action_layer.h"
9#ifdef AUDIO_ENABLE
10 #include "audio.h"
11#endif
12#include "eeconfig.h"
13
14extern keymap_config_t keymap_config;
15
16// Each layer gets a name for readability, which is then used in the keymap matrix below.
17// The underscores don't mean anything - you can have a layer called STUFF or any other name.
18// Layer names don't all need to be of the same length, obviously, and you can also skip them
19// entirely and just use numbers.
20#define _QWERTY 0
21#define _GAME 1
22#define _LOWER 3
23#define _RAISE 4
24#define _ADJUST 16
25
26enum planck_keycodes {
27 QWERTY = SAFE_RANGE,
28 GAME,
29 LOWER,
30 RAISE,
31 BACKLIT,
32};
33
34// Fillers to make layering more clear
35#define _______ KC_TRNS
36#define XXXXXXX KC_NO
37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39
40/* Qwerty
41 * ,-----------------------------------------------------------------------------------.
42 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
43 * |------+------+------+------+------+-------------+------+------+------+------+------|
44 * | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
45 * |------+------+------+------+------+------|------+------+------+------+------+------|
46 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
47 * |------+------+------+------+------+------+------+------+------+------+------+------|
48 * | Ctrl | GUI | \ | Alt | Lower| Space |Raise | [ | - | = | ] |
49 * `-----------------------------------------------------------------------------------'
50 */
51[_QWERTY] = {
52 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
53 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
54 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
55 {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, LT(3, KC_LBRC), KC_MINS, KC_EQL, CTL_T(KC_RBRC)}
56},
57
58/* Game
59 * ,-----------------------------------------------------------------------------------.
60 * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp |
61 * |------+------+------+------+------+-------------+------+------+------+------+------|
62 * |Shift | A | S | D | F | G | H | J | K | L | ; | ' |
63 * |------+------+------+------+------+------|------+------+------+------+------+------|
64 * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter |
65 * |------+------+------+------+------+------+------+------+------+------+------+------|
66 * | Alt | 4 | 3 | 2 | Lower| Space |Raise | Left | Down | Up | Right|
67 * `-----------------------------------------------------------------------------------'
68 */
69[_GAME] = {
70 { KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
71 {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
72 {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ },
73 {KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
74},
75
76
77/* Lower (switched to # because KP# were weird in terminal emulators)
78 * ,-----------------------------------------------------------------------------------.
79 * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
80 * |------+------+------+------+------+-------------+------+------+------+------+------|
81 * | Tab | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * |
82 * |------+------+------+------+------+------+------+------+------+------+------+------|
83 * | NumLk| F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter |
84 * |------+------+------+------+------+------+------+------+------+------+------+------|
85 * | Esc | | | | | 0 | | | | KP_+ | |
86 * `-----------------------------------------------------------------------------------'
87 */
88[_LOWER] = {
89 { KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
90 { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_DOT, KC_ASTR},
91 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______},
92 {KC_ESC, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______, KC_PLUS, _______}
93},
94
95/* Raise
96 * ,-----------------------------------------------------------------------------------.
97 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
98 * |------+------+------+------+------+-------------+------+------+------+------+------|
99 * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` |
100 * |------+------+------+------+------+------|------+------+------+------+------+------|
101 * | | Wh Dn| M-L | M-Dn | M-R | ACL0 | ACL1 | ACL2 | | | \ | |
102 * |------+------+------+------+------+------+------+------+------+------+------+------|
103 * | | App | | | | Ins | | Home | PGDN | PGUP | End |
104 * `-----------------------------------------------------------------------------------'
105 */
106[_RAISE] = {
107 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
108 { KC_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV},
109 {_______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, KC_BSLASH, _______},
110 {_______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
111},
112
113/* Adjust (Lower + Raise)
114 * ,-----------------------------------------------------------------------------------.
115 * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D |
116 * |------+------+------+------+------+-------------+------+------+------+------+------|
117 * | | | |Aud on|Audoff| Game |AGswap|AGnorm| | | | |
118 * |------+------+------+------+------+------|------+------+------+------+------+------|
119 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
120 * |------+------+------+------+------+------+------+------+------+------+------+------|
121 * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST |
122 * `-----------------------------------------------------------------------------------'
123 */
124[_ADJUST] = {
125 {LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL))},
126 {_______, _______, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, _______, _______, _______, _______},
127 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
128 {BACKLIT, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP}
129}
130
131
132};
133
134const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
135{
136 switch(id) {
137 case 0: // this would trigger when you hit a key mapped as M(0)
138 if (record->event.pressed) {
139 return MACRO( D(LSFT), T(LEFT), U(LSFT), D(LCTL), T(X), U(LCTL), T(RIGHT), D(LCTL), T(V), U(LCTL), T(LEFT), END ); // this swaps the characters on either side of the cursor when the macro executes
140 }
141 break;
142 }
143 return MACRO_NONE;
144};
145
146
147#ifdef AUDIO_ENABLE
148
149float tone_startup[][2] = SONG(STARTUP_SOUND);
150float tone_qwerty[][2] = SONG(QWERTY_SOUND);
151float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
152
153float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
154#endif
155
156
157void persistant_default_layer_set(uint16_t default_layer) {
158 eeconfig_update_default_layer(default_layer);
159 default_layer_set(default_layer);
160}
161
162bool process_record_user(uint16_t keycode, keyrecord_t *record) {
163 switch (keycode) {
164 case QWERTY:
165 if (record->event.pressed) {
166 #ifdef AUDIO_ENABLE
167 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
168 #endif
169 persistant_default_layer_set(1UL<<_QWERTY);
170 }
171 return false;
172 break;
173 case GAME:
174 if (record->event.pressed) {
175 #ifdef AUDIO_ENABLE
176 PLAY_NOTE_ARRAY(music_scale, false, 0);
177 #endif
178 persistant_default_layer_set(1UL<<_GAME);
179 }
180 return false;
181 break;
182
183
184 case LOWER:
185 if (record->event.pressed) {
186 layer_on(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 } else {
189 layer_off(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 }
192 return false;
193 break;
194 case RAISE:
195 if (record->event.pressed) {
196 layer_on(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 } else {
199 layer_off(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 }
202 return false;
203 break;
204 case BACKLIT:
205 if (record->event.pressed) {
206 register_code(KC_RSFT);
207 #ifdef BACKLIGHT_ENABLE
208 backlight_step();
209 #endif
210 } else {
211 unregister_code(KC_RSFT);
212 }
213 return false;
214 break;
215 }
216 return true;
217}
218
219void matrix_init_user(void) {
220 #ifdef AUDIO_ENABLE
221 startup_user();
222 #endif
223}
224
225#ifdef AUDIO_ENABLE
226
227void startup_user()
228{
229 _delay_ms(20); // gets rid of tick
230 PLAY_NOTE_ARRAY(tone_startup, false, 0);
231}
232
233void shutdown_user()
234{
235 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
236 _delay_ms(150);
237 stop_all_notes();
238}
239
240void music_on_user(void)
241{
242 music_scale_user();
243}
244
245void music_scale_user(void)
246{
247 PLAY_NOTE_ARRAY(music_scale, false, 0);
248}
249
250#endif
diff --git a/keyboards/planck/keymaps/dale/readme.md b/keyboards/planck/keymaps/dale/readme.md
new file mode 100644
index 000000000..e5ab38756
--- /dev/null
+++ b/keyboards/planck/keymaps/dale/readme.md
@@ -0,0 +1,6 @@
1# Dales Planck Layout
2Goals:
3* Trying to fit as many characters as possible on the default layer
4 * its easier for me to remember logical functions than characters
5 * this also makes it easier to use the two US ISO keysets I had on hand
6* A number pad AND a number row
diff --git a/keyboards/preonic/keymaps/dale/Makefile b/keyboards/preonic/keymaps/dale/Makefile
new file mode 100644
index 000000000..156a3a0a9
--- /dev/null
+++ b/keyboards/preonic/keymaps/dale/Makefile
@@ -0,0 +1,25 @@
1
2
3# Build Options
4# change to "no" to disable the options, or define them in the Makefile in
5# the appropriate keymap folder that will get included automatically
6#
7BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
9EXTRAKEY_ENABLE = no # Audio control and System control(+450)
10CONSOLE_ENABLE = no # Console for debug(+400)
11COMMAND_ENABLE = yes # Commands for debug and configuration
12NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
13BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
14MIDI_ENABLE = no # MIDI controls
15AUDIO_ENABLE = yes # Audio output on port C6
16UNICODE_ENABLE = no # Unicode
17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
18RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
19
20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
22
23ifndef QUANTUM_DIR
24 include ../../../../Makefile
25endif
diff --git a/keyboards/preonic/keymaps/dale/config.h b/keyboards/preonic/keymaps/dale/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/preonic/keymaps/dale/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/dale/keymap.c b/keyboards/preonic/keymaps/dale/keymap.c
new file mode 100644
index 000000000..16a4ba25c
--- /dev/null
+++ b/keyboards/preonic/keymaps/dale/keymap.c
@@ -0,0 +1,296 @@
1#include "preonic.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef AUDIO_ENABLE
5 #include "audio.h"
6#endif
7
8// Each layer gets a name for readability, which is then used in the keymap matrix below.
9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers.
12
13enum preonic_layers {
14 _QWERTY,
15 _COLEMAK,
16 _DVORAK,
17 _LOWER,
18 _RAISE,
19 _ADJUST
20};
21
22enum preonic_keycodes {
23 QWERTY = SAFE_RANGE,
24 COLEMAK,
25 DVORAK,
26 LOWER,
27 RAISE,
28 BACKLIT
29};
30
31// Fillers to make layering more clear
32#define _______ KC_TRNS
33#define XXXXXXX KC_NO
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37/* Qwerty
38 * ,-----------------------------------------------------------------------------------.
39 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
42 * |------+------+------+------+------+-------------+------+------+------+------+------|
43 * | Tab | A | S | D | F | G | H | J | K | L | ; | " |
44 * |------+------+------+------+------+------|------+------+------+------+------+------|
45 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
46 * |------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Ctrl | GUI | \ | Alt |Lower | Space |Raise | [ | - | = | ] |
48 * `-----------------------------------------------------------------------------------'
49 */
50[_QWERTY] = {
51 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
52 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
53 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
54 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) },
55 {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, LT(_LOWER, KC_LBRC), KC_MINS, KC_EQL, MT(MOD_RCTL, KC_RBRC)}
56},
57
58/* Colemak
59 * ,-----------------------------------------------------------------------------------.
60 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
61 * |------+------+------+------+------+------+------+------+------+------+------+------|
62 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
63 * |------+------+------+------+------+-------------+------+------+------+------+------|
64 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
65 * |------+------+------+------+------+------|------+------+------+------+------+------|
66 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
67 * |------+------+------+------+------+------+------+------+------+------+------+------|
68 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
69 * `-----------------------------------------------------------------------------------'
70 */
71[_COLEMAK] = {
72 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
73 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL},
74 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
75 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
76 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
77},
78
79/* Dvorak
80 * ,-----------------------------------------------------------------------------------.
81 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
82 * |------+------+------+------+------+------+------+------+------+------+------+------|
83 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
84 * |------+------+------+------+------+-------------+------+------+------+------+------|
85 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
86 * |------+------+------+------+------+------|------+------+------+------+------+------|
87 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
88 * |------+------+------+------+------+------+------+------+------+------+------+------|
89 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
90 * `-----------------------------------------------------------------------------------'
91 */
92[_DVORAK] = {
93 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
94 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL},
95 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
96 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
97 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
98},
99
100/* Lower
101 * ,-----------------------------------------------------------------------------------.
102 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
103 * |------+------+------+------+------+------+------+------+------+------+------+------|
104 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
105 * |------+------+------+------+------+-------------+------+------+------+------+------|
106 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * |
107 * |------+------+------+------+------+------|------+------+------+------+------+------|
108 * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / | Ent |
109 * |------+------+------+------+------+------+------+------+------+------+------+------|
110 * | | | | | | 0 | | [ | - | + | ] |
111 * `-----------------------------------------------------------------------------------'
112 */
113[_LOWER] = {
114 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
115 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
116 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_DOT, KC_ASTR},
117 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______},
118 {_______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______, KC_PLUS, _______}
119},
120
121/* Raise
122 * ,-----------------------------------------------------------------------------------.
123 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
124 * |------+------+------+------+------+-------------+------+------+------+------+------|
125 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
126 * |------+------+------+------+------+-------------+------+------+------+------+------|
127 * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` |
128 * |------+------+------+------+------+------|------+------+------+------+------+------|
129 * | | Wh Dn| M-L | M-Dn | M-R | PrScr| Sc Lk| Break| | | \ | |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | | App | | | | Ins | | Home | PGDN | PGUP | End |
132 * `-----------------------------------------------------------------------------------'
133 */
134[_RAISE] = {
135 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
136 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
137 { KC_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV},
138 {_______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_BSLASH, _______},
139 {_______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
140},
141
142
143/* Adjust (Lower + Raise)
144 * ,-----------------------------------------------------------------------------------.
145 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
146 * |------+------+------+------+------+------+------+------+------+------+------+------|
147 * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D |
148 * |------+------+------+------+------+-------------+------+------+------+------+------|
149 * | | | |Aud on|Audoff| |AGswap|AGnorm| | | | |
150 * |------+------+------+------+------+------|------+------+------+------+------+------|
151 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
152 * |------+------+------+------+------+------+------+------+------+------+------+------|
153 * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST |
154 * `-----------------------------------------------------------------------------------'
155 */
156[_ADJUST] = {
157 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
158 {LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL))},
159 {_______, _______, _______, AU_ON, AU_OFF, _______, AG_SWAP, AG_NORM, _______, _______, _______, _______},
160 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
161 {BACKLIT, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP}
162}
163
164
165};
166
167const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
168{
169 switch(id) {
170 case 0: // this would trigger when you hit a key mapped as M(0)
171 if (record->event.pressed) {
172 return MACRO( D(LSFT), T(LEFT), U(LSFT), D(LCTL), T(X), U(LCTL), T(RIGHT), D(LCTL), T(V), U(LCTL), T(LEFT), END ); // this swaps the characters on either side of the cursor when the macro executes
173 }
174 break;
175 }
176 return MACRO_NONE;
177};
178
179#ifdef AUDIO_ENABLE
180float tone_startup[][2] = {
181 {NOTE_B5, 20},
182 {NOTE_B6, 8},
183 {NOTE_DS6, 20},
184 {NOTE_B6, 8}
185};
186
187float tone_qwerty[][2] = SONG(QWERTY_SOUND);
188float tone_dvorak[][2] = SONG(DVORAK_SOUND);
189float tone_colemak[][2] = SONG(COLEMAK_SOUND);
190
191float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
192
193float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
194#endif
195
196void persistent_default_layer_set(uint16_t default_layer) {
197 eeconfig_update_default_layer(default_layer);
198 default_layer_set(default_layer);
199}
200
201bool process_record_user(uint16_t keycode, keyrecord_t *record) {
202 switch (keycode) {
203 case QWERTY:
204 if (record->event.pressed) {
205 #ifdef AUDIO_ENABLE
206 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
207 #endif
208 persistent_default_layer_set(1UL<<_QWERTY);
209 }
210 return false;
211 break;
212 case COLEMAK:
213 if (record->event.pressed) {
214 #ifdef AUDIO_ENABLE
215 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
216 #endif
217 persistent_default_layer_set(1UL<<_COLEMAK);
218 }
219 return false;
220 break;
221 case DVORAK:
222 if (record->event.pressed) {
223 #ifdef AUDIO_ENABLE
224 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
225 #endif
226 persistent_default_layer_set(1UL<<_DVORAK);
227 }
228 return false;
229 break;
230 case LOWER:
231 if (record->event.pressed) {
232 layer_on(_LOWER);
233 update_tri_layer(_LOWER, _RAISE, _ADJUST);
234 } else {
235 layer_off(_LOWER);
236 update_tri_layer(_LOWER, _RAISE, _ADJUST);
237 }
238 return false;
239 break;
240 case RAISE:
241 if (record->event.pressed) {
242 layer_on(_RAISE);
243 update_tri_layer(_LOWER, _RAISE, _ADJUST);
244 } else {
245 layer_off(_RAISE);
246 update_tri_layer(_LOWER, _RAISE, _ADJUST);
247 }
248 return false;
249 break;
250 case BACKLIT:
251 if (record->event.pressed) {
252 register_code(KC_RSFT);
253 #ifdef BACKLIGHT_ENABLE
254 backlight_step();
255 #endif
256 } else {
257 unregister_code(KC_RSFT);
258 }
259 return false;
260 break;
261 }
262 return true;
263};
264
265void matrix_init_user(void) {
266 #ifdef AUDIO_ENABLE
267 startup_user();
268 #endif
269}
270
271#ifdef AUDIO_ENABLE
272
273void startup_user()
274{
275 _delay_ms(20); // gets rid of tick
276 PLAY_NOTE_ARRAY(tone_startup, false, 0);
277}
278
279void shutdown_user()
280{
281 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
282 _delay_ms(150);
283 stop_all_notes();
284}
285
286void music_on_user(void)
287{
288 music_scale_user();
289}
290
291void music_scale_user(void)
292{
293 PLAY_NOTE_ARRAY(music_scale, false, 0);
294}
295
296#endif
diff --git a/keyboards/preonic/keymaps/dale/readme.md b/keyboards/preonic/keymaps/dale/readme.md
new file mode 100644
index 000000000..ea044cbfa
--- /dev/null
+++ b/keyboards/preonic/keymaps/dale/readme.md
@@ -0,0 +1,2 @@
1# Dale's Preonic layout - largely based on his Planck.
2# The hardware number row is mostly to avoid inherent context switching delay while he is receiving auditory input.