diff options
-rw-r--r-- | keyboards/planck/keymaps/dr_notsokind/Readme.md | 66 | ||||
-rw-r--r-- | keyboards/planck/keymaps/dr_notsokind/config.h | 29 | ||||
-rw-r--r-- | keyboards/planck/keymaps/dr_notsokind/keymap.c | 307 | ||||
-rw-r--r-- | keyboards/planck/keymaps/dr_notsokind/rules.mk | 25 |
4 files changed, 427 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/dr_notsokind/Readme.md b/keyboards/planck/keymaps/dr_notsokind/Readme.md new file mode 100644 index 000000000..2caf4965d --- /dev/null +++ b/keyboards/planck/keymaps/dr_notsokind/Readme.md | |||
@@ -0,0 +1,66 @@ | |||
1 | # Dr NotSoKind's layout | ||
2 | |||
3 | Feel free to ask questions or send suggestions to [me on Twitter](https://twitter.com/pnikosis) | ||
4 | |||
5 | I love some features from the default layout, although there are things that definitively I can't get used to. The *circuit* layout gave me some good ideas, so I combined both, plus some own ideas to fit better my needs. BTW, I don't use Dvorak or other layouts than QWERTY and I'm too old and grumpy for learning something new (I'm lying a bit here, I learn new stuff every day), so I removed the ther typing layouts | ||
6 | |||
7 | ## Things I love about the default layout | ||
8 | 1. I love the consistency between the raise and lower layers, like one is the shifted version of the other. | ||
9 | 2. I like the F keys distributed in two rows, from F1 to F6 and F7 to F12, which makes them easier to find and access. | ||
10 | |||
11 | ## Things I don't like from the default layout | ||
12 | 1. Arrow keys distributed VIM like. I use VIM frequently, but there I navigate using HJKL. Moving to the arrows intituively I tend to expect three arrows on the bottom (left, down, right) and one up in the middle (up). | ||
13 | 2. Tab and Esc. I switched them. | ||
14 | 3. Alt and Super. Switched them too. | ||
15 | |||
16 | ## Needs, changes and goals | ||
17 | 1. Arrow keys and distributed "traditionally". | ||
18 | 2. Media keys easily accessible. | ||
19 | 3. A button for Sleep/Power. | ||
20 | 4. As close as possible to a US QWERTY layout. | ||
21 | 5. A Numpad, for when I want to feel like an accountant. | ||
22 | 6. Be able to record Dynamic Macros. | ||
23 | |||
24 | Layers: | ||
25 | |||
26 | ### Main Layout / QWERTY | ||
27 | |||
28 | Has four modes: The default, Lower, Raise and Media. | ||
29 | |||
30 |  | ||
31 | |||
32 | http://www.keyboard-layout-editor.com/#/gists/4cfb26f84bbb4fabe5e6c7cc22c85e24 | ||
33 | |||
34 | Media gives access to most media keys, and some keyboard actions such as Print Screen, Insert, Calculator or Power/Sleep/Wake. Also in the Media layer, you can record two different macros and reproduce them. | ||
35 | |||
36 | Record the Macro with `Media` + `;` (or `Media` + `'` for the Macro 2), you will hear a beep (if the audio is enabled). Do your stuff, finish recording with `Media` + `Enter`. For reproducing the Macro, press `Media` + `,` (or `Media` + `.` for the second Macro). | ||
37 | |||
38 | Additionally, Lower + Raise gives access to the layer switching, plus keyboard modes (such as music mode), reset, SysReq and Lock Mode, which disables the double shift tap for CapsLock (taken from the *circuit* layout). Also provides another distribution for the F keys. | ||
39 | |||
40 | ### Lower + Raise (adjust) | ||
41 | |||
42 |  | ||
43 | |||
44 | http://www.keyboard-layout-editor.com/#/gists/12462bfba17d16bb40b54ed914209d92 | ||
45 | |||
46 | ### Numpad | ||
47 | |||
48 | Pressing Esc exits the numpad layer (also you can go to the QWERTY layer through the adjust layer) | ||
49 | |||
50 |  | ||
51 | |||
52 | http://www.keyboard-layout-editor.com/#/gists/5ab730ab278d2050c5250498806e8edc | ||
53 | |||
54 | -------------------------------------- | ||
55 | Notes taken from the circuit layout: | ||
56 | |||
57 | ### Special keys: | ||
58 | * `RSHFT` and `ENTER` are combined. Tap once for `ENTER` and hold for `RSHFT`. `ENTER` will be registered on release if released within 200 ms, else `RSHFT` is registered starting at 201 ms until release. | ||
59 | * If for some reason, this interferes with the normal usage of the `ENTER` key in any way, (some problem that may never happen), I have added a regular non-modified `ENTER` key on the same key in the [LOWER] and [RAISE] layers. | ||
60 | * `LSHFT` and `CAPS` are also combined. The key works like a normal `LSHFT` unless double-tapped, in which case it counts as `CAPS`. This functionality unfortunately delays all key presses by at most 200 ms, but I have added ways to disable this both temporarily or permanently, described below. | ||
61 | * A failsafe `CAPS` key is on the same key in the [LOWER] and [RAISE] layers. | ||
62 | * There are `UNDO`, `CUT`, `COPY`, and `PASTE` keys. This was intended to be a universal way to use these commands since in macOS cut is `⌘ + C` but in Windows it is `⌃ + C`. Unfortunately these special keys only work in Windows. ¯\\\_(ツ)\_/¯ | ||
63 | |||
64 | ##Game lock: | ||
65 | **TL;DR** the game lock toggle disables the double-tap `CAPS`, and disables `GUI` keys (WINDOWS key). | ||
66 | |||
diff --git a/keyboards/planck/keymaps/dr_notsokind/config.h b/keyboards/planck/keymaps/dr_notsokind/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/dr_notsokind/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/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c new file mode 100644 index 000000000..e95c02eda --- /dev/null +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c | |||
@@ -0,0 +1,307 @@ | |||
1 | // Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6 | ||
2 | |||
3 | #include "planck.h" | ||
4 | #include "action_layer.h" | ||
5 | #ifdef AUDIO_ENABLE | ||
6 | #include "audio.h" | ||
7 | #endif | ||
8 | #include "eeconfig.h" | ||
9 | |||
10 | extern keymap_config_t keymap_config; | ||
11 | |||
12 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
13 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
14 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
15 | // entirely and just use numbers. | ||
16 | #define _QWERTY 0 | ||
17 | #define _NUMPAD 1 | ||
18 | #define _LOCKED 2 | ||
19 | #define _RAISE 3 | ||
20 | #define _LOWER 4 | ||
21 | #define _FUNCTN 5 | ||
22 | #define _MEDIA 6 | ||
23 | |||
24 | enum planck_keycodes { | ||
25 | QWERTY = SAFE_RANGE, | ||
26 | NUMPAD, | ||
27 | RAISE, | ||
28 | LOWER, | ||
29 | MEDIA, | ||
30 | DYNAMIC_MACRO_RANGE | ||
31 | }; | ||
32 | |||
33 | #include "dynamic_macro.h" | ||
34 | |||
35 | // Key code names | ||
36 | #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift | ||
37 | #define LOCK FUNC(1) | ||
38 | #define KC_PSTE KC_PASTE | ||
39 | #define _______ KC_TRNS | ||
40 | #define XXXXXXX KC_NO | ||
41 | |||
42 | #ifdef TAP_DANCE_ENABLE | ||
43 | #define SFT_CAP TD(0) // Left shift, double tap for caps | ||
44 | #endif | ||
45 | #ifndef TAP_DANCE_ENABLE | ||
46 | #define SFT_CAP KC_LSFT // Regular left shift | ||
47 | #endif | ||
48 | |||
49 | // Tap Dance Definitions | ||
50 | #ifdef TAP_DANCE_ENABLE | ||
51 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
52 | [0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) | ||
53 | }; | ||
54 | #endif | ||
55 | |||
56 | // Function definitions | ||
57 | const uint16_t PROGMEM fn_actions[] = { | ||
58 | [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | ||
59 | [1] = ACTION_LAYER_TOGGLE(_LOCKED) | ||
60 | }; | ||
61 | |||
62 | // Layout definitions | ||
63 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
64 | |||
65 | /* QWERTY | ||
66 | * ,-----------------------------------------------------------------------------------. | ||
67 | * | Esc | Q | W | E | R | T | Y | U | I | O | P | BKSP | | ||
68 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
69 | * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | | ||
70 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
71 | * |*Shift| Z | X | C | V | B | N | M | , | . | Up |SftEnt| | ||
72 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
73 | * | Ctrl | GUI | Alt | Mute | Lower| Space | Raise| / | Left | Down | Right| | ||
74 | * `-----------------------------------------------------------------------------------' | ||
75 | */ | ||
76 | [_QWERTY] = { | ||
77 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | ||
78 | {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | ||
79 | {SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT}, | ||
80 | {KC_LCTL, KC_LGUI, KC_LALT, MEDIA, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} | ||
81 | }, | ||
82 | |||
83 | /* NUMPAD | ||
84 | * ,-----------------------------------------------------------------------------------. | ||
85 | * |QWERTY| NULL | NULL | NULL | NULL | NULL | NULL | / | 7 | 8 | 9 | - | | ||
86 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
87 | * | | NULL | NULL | NULL | NULL | NULL | NULL | * | 4 | 5 | 6 | + | | ||
88 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
89 | * | |NumLck| NULL | NULL | NULL | NULL | NULL |BckSp | 1 | 2 | 3 | Ent | | ||
90 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
91 | * | | | | | | | | 0 | . | , | = | | ||
92 | * `-----------------------------------------------------------------------------------' | ||
93 | */ | ||
94 | [_NUMPAD] = { | ||
95 | {QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS}, | ||
96 | {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS}, | ||
97 | {_______, KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_P1, KC_P2, KC_P3, KC_PENT}, | ||
98 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL} | ||
99 | }, | ||
100 | |||
101 | /* LOCK | ||
102 | * ,-----------------------------------------------------------------------------------. | ||
103 | * | | | | | | | | | | | | | | ||
104 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
105 | * | | | | | | | | | | | | | | ||
106 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
107 | * | Shift| | | | | | | | | | | Enter| | ||
108 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
109 | * | | NULL | | | | | | | | | | | ||
110 | * `-----------------------------------------------------------------------------------' | ||
111 | */ | ||
112 | [_LOCKED] = { | ||
113 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | ||
114 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, | ||
115 | {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT}, | ||
116 | {_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | ||
117 | }, | ||
118 | |||
119 | /* RAISE | ||
120 | |||
121 | * ,-----------------------------------------------------------------------------------. | ||
122 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | | ||
123 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
124 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
125 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
126 | * | CAPS | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | NULL | PgUp | Enter| | ||
127 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
128 | * | | | | Vol+ | | NULL | | | Home | PgDn | End | | ||
129 | * `-----------------------------------------------------------------------------------' | ||
130 | */ | ||
131 | [_RAISE] = { | ||
132 | {KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, | ||
133 | {KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, | ||
134 | {KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, XXXXXXX, KC_PGUP, KC_ENT }, | ||
135 | {_______, _______, _______, KC_VOLU, _______, XXXXXXX, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, KC_END } | ||
136 | }, | ||
137 | |||
138 | /* LOWER | ||
139 | * ,-----------------------------------------------------------------------------------. | ||
140 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | | ||
141 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
142 | * | Del | F13 | F14 | F15 | F16 | F17 | F18 | _ | + | { | } | | | | ||
143 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
144 | * | CAPS | F19 | F20 | F21 | F22 | F23 | F24 |ISO ~ |ISO | | NULL | PgUp | Enter| | ||
145 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
146 | * | | | | Vol- | | NULL | | | Home | PgDn | End | | ||
147 | * `-----------------------------------------------------------------------------------' | ||
148 | */ | ||
149 | [_LOWER] = { | ||
150 | {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, | ||
151 | {KC_DEL, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, | ||
152 | {KC_CAPS, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, S(KC_NUHS), S(KC_NUBS), XXXXXXX, KC_PGUP, KC_ENT }, | ||
153 | {_______, _______, _______, KC_VOLD, _______, XXXXXXX, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, KC_END } | ||
154 | }, | ||
155 | |||
156 | /* MEDIA AND COMMANDS | ||
157 | * ,-----------------------------------------------------------------------------------. | ||
158 | * |Sleep | NULL |WbHome| NULL | NULL | NULL |Again | NULL |Insert| NULL |PrntSc|Power | | ||
159 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
160 | * | Wake | NULL |WbSrch| NULL | Find | NULL | NULL | NULL | Calc | NULL |RecMc1|RecMc2| | ||
161 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
162 | * | NULL | Undo | Cut | Copy | Paste| NULL | NULL | NULL |Macro1|Macro2| Prev | NULL | | ||
163 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
164 | * | NULL | NULL | NULL | | Vol- | Mute | Vol+ | NULL | Stop | Next | Play | | ||
165 | * `-----------------------------------------------------------------------------------' | ||
166 | */ | ||
167 | [_MEDIA] = { | ||
168 | {KC_SLEP, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, KC_PWR}, | ||
169 | {KC_WAKE, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, DYN_REC_START1, DYN_REC_START2 }, | ||
170 | {XXXXXXX, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_MPRV, DYN_REC_STOP }, | ||
171 | {XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, XXXXXXX, KC_MSTP, KC_MNXT, KC_MPLY } | ||
172 | }, | ||
173 | |||
174 | /* FUNCTIONS | ||
175 | * ,-----------------------------------------------------------------------------------. | ||
176 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | ||
177 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
178 | * | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | | ||
179 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
180 | * | NULL | NULL | NULL |AudOff|MusOff|QWERTY|NUMPAD|Mus On|Aud On| NULL |Voice+|SysReq| | ||
181 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
182 | * | Reset| NULL | Lock | NULL | | NULL | | NULL |AGNorm|Voice-|AGSwap| | ||
183 | * `-----------------------------------------------------------------------------------' | ||
184 | */ | ||
185 | [_FUNCTN] = { | ||
186 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, | ||
187 | {KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 }, | ||
188 | {XXXXXXX, XXXXXXX, XXXXXXX, AU_OFF, MU_OFF, QWERTY, NUMPAD, MU_ON, AU_ON, XXXXXXX, MUV_IN, KC_SYSREQ}, | ||
189 | {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, AG_NORM, MUV_DE, AG_SWAP} | ||
190 | } | ||
191 | |||
192 | }; | ||
193 | |||
194 | #ifdef AUDIO_ENABLE | ||
195 | float tone_startup[][2] = SONG(STARTUP_SOUND); | ||
196 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
197 | float tone_numpad[][2] = SONG(NUM_LOCK_ON_SOUND); | ||
198 | float tone_dyn_macro_rec[][2] = SONG(TERMINAL_SOUND); | ||
199 | float tone_dyn_macro_stop[][2] = SONG(COIN_SOUND); | ||
200 | float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); | ||
201 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
202 | #endif | ||
203 | |||
204 | |||
205 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
206 | uint16_t macro_kc = (keycode == NUMPAD ? DYN_REC_STOP : keycode); | ||
207 | if (!process_record_dynamic_macro(macro_kc, record)) { | ||
208 | return false; | ||
209 | } | ||
210 | switch (keycode) { | ||
211 | case DYN_REC_START1: | ||
212 | case DYN_REC_START2: | ||
213 | #ifdef AUDIO_ENABLE | ||
214 | PLAY_SONG(tone_dyn_macro_rec); | ||
215 | #endif | ||
216 | break; | ||
217 | case DYN_REC_STOP: | ||
218 | #ifdef AUDIO_ENABLE | ||
219 | PLAY_SONG(tone_dyn_macro_stop); | ||
220 | #endif | ||
221 | break; | ||
222 | case QWERTY: | ||
223 | if (record->event.pressed) { | ||
224 | if (IS_LAYER_ON(_NUMPAD)) { | ||
225 | #ifdef AUDIO_ENABLE | ||
226 | PLAY_SONG(tone_qwerty); | ||
227 | #endif | ||
228 | layer_off(_NUMPAD); | ||
229 | } | ||
230 | } | ||
231 | return false; | ||
232 | break; | ||
233 | case NUMPAD: | ||
234 | if (record->event.pressed) { | ||
235 | if (!IS_LAYER_ON(_NUMPAD)) { | ||
236 | #ifdef AUDIO_ENABLE | ||
237 | PLAY_SONG(tone_numpad); | ||
238 | #endif | ||
239 | layer_on(_NUMPAD); | ||
240 | } | ||
241 | } | ||
242 | return false; | ||
243 | break; | ||
244 | case RAISE: | ||
245 | if (record->event.pressed) { | ||
246 | layer_on(_RAISE); | ||
247 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); | ||
248 | } else { | ||
249 | layer_off(_RAISE); | ||
250 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); | ||
251 | } | ||
252 | return false; | ||
253 | break; | ||
254 | case LOWER: | ||
255 | if (record->event.pressed) { | ||
256 | layer_on(_LOWER); | ||
257 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); | ||
258 | } else { | ||
259 | layer_off(_LOWER); | ||
260 | update_tri_layer(_RAISE, _LOWER, _FUNCTN); | ||
261 | } | ||
262 | return false; | ||
263 | break; | ||
264 | case MEDIA: | ||
265 | if (record->event.pressed) { | ||
266 | layer_on(_MEDIA); | ||
267 | } else { | ||
268 | layer_off(_MEDIA); | ||
269 | } | ||
270 | return false; | ||
271 | break; | ||
272 | } | ||
273 | return true; | ||
274 | } | ||
275 | |||
276 | void matrix_init_user(void) { | ||
277 | #ifdef AUDIO_ENABLE | ||
278 | startup_user(); | ||
279 | #endif | ||
280 | } | ||
281 | |||
282 | #ifdef AUDIO_ENABLE | ||
283 | |||
284 | void startup_user() | ||
285 | { | ||
286 | _delay_ms(20); // gets rid of tick | ||
287 | PLAY_SONG(tone_startup); | ||
288 | } | ||
289 | |||
290 | void shutdown_user() | ||
291 | { | ||
292 | PLAY_SONG(tone_goodbye); | ||
293 | _delay_ms(150); | ||
294 | stop_all_notes(); | ||
295 | } | ||
296 | |||
297 | void music_on_user(void) | ||
298 | { | ||
299 | music_scale_user(); | ||
300 | } | ||
301 | |||
302 | void music_scale_user(void) | ||
303 | { | ||
304 | PLAY_SONG(music_scale); | ||
305 | } | ||
306 | |||
307 | #endif | ||
diff --git a/keyboards/planck/keymaps/dr_notsokind/rules.mk b/keyboards/planck/keymaps/dr_notsokind/rules.mk new file mode 100644 index 000000000..7f691ebe4 --- /dev/null +++ b/keyboards/planck/keymaps/dr_notsokind/rules.mk | |||
@@ -0,0 +1,25 @@ | |||
1 | |||
2 | # Build Options | ||
3 | # change to "no" to disable the options, or define them in the makefile.mk in | ||
4 | # the appropriate keymap folder that will get included automatically | ||
5 | # | ||
6 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
7 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
8 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
9 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
10 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
11 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
13 | MIDI_ENABLE = no # MIDI controls | ||
14 | AUDIO_ENABLE = yes # Audio output on port C6 | ||
15 | UNICODE_ENABLE = no # Unicode | ||
16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
17 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
18 | TAP_DANCE_ENABLE = yes # Enables the double-tap functionality of keys | ||
19 | |||
20 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
21 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
22 | |||
23 | ifndef QUANTUM_DIR | ||
24 | include ../../../../Makefile | ||
25 | endif | ||