aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Terhar <michael.terhar@pararray.com>2017-08-26 23:33:33 -0400
committerJack Humbert <jack.humb@gmail.com>2017-08-26 23:33:33 -0400
commit79603022422cec39ea44686c84a1050acd0c145e (patch)
tree48063d9470a007425500fb8d8c299701e20d63b4
parentde315c54eb244821aef39e75c3f5d1c8e96d1273 (diff)
downloadqmk_firmware-79603022422cec39ea44686c84a1050acd0c145e.tar.gz
qmk_firmware-79603022422cec39ea44686c84a1050acd0c145e.zip
Keymaps for several of my boards (#1641)
* copied mjt keymaps from archive * All mjt boards now compile * fixed jd45-mjt breathing * Updates to fix SpaceFN but not tested yet. * Still missing either spacebar or an adjacent keypress. * Debugging rigged up for use with hid_listen. * Reverted the default keymap to use tap_layer_key rather than custom. Moved custom approach to keymap_debug.c * Fixed the lower-left side of the keymap, which needed more spacers due to the matrix being directly put into the array rather than using the keymap function. * Cleaned up JD45 keymap that uses tapkey. * Redid minivan keymap with numsym rather than raise/lower. Untested. * Created my MJT keymap for HHKB Enabled dynamic macros and moved somoe of the shortcuts around. * Minor keymap fixes to make them compile without errors. * Added home/end to right arrow cluster on DYN layer. * Added more keys to fn and dyn layers. * It wasn't using my custom layer last time somehow...? Now it will. * Compiled and installed at end of day on 8/23 * Moved macros to FKEY layer because Adjust was too hard to get into and out of without some sort of feedback. * Fixed volume controls... were reversed and disabled. * Added F13-F15 back to fkeys layer in Minivan * Created new Planck Keymap that uses the NumSym and FKeys layer approach like the Minivan. * Removed DYN layer. * Fixed diagram in planck numsym. * Cleanup for pull request. * Roadkit flip phone warning. * Replaced PLAY_NOTES_ARRAY to PLAY_SONG * reset the submodules * checked out specific commits for submodules * Removed debugging from JD45 shared config.h * Moved custom rules.mk to apropriate keymap Reset the shared rules.mk file. * Trailing return issue in rules.mk Gotta make for a smooth pull request :-)
-rw-r--r--keyboards/gherkin/keymaps/mjt/Makefile29
-rw-r--r--keyboards/gherkin/keymaps/mjt/config.h171
-rw-r--r--keyboards/gherkin/keymaps/mjt/keymap.c280
-rw-r--r--keyboards/hhkb/keymaps/mjt/config.h77
-rw-r--r--keyboards/hhkb/keymaps/mjt/keymap.c114
-rw-r--r--keyboards/hhkb/keymaps/mjt/readme.md16
-rw-r--r--keyboards/jd45/keymaps/mjt/Makefile21
-rw-r--r--keyboards/jd45/keymaps/mjt/config.h85
-rw-r--r--keyboards/jd45/keymaps/mjt/keymap.c80
-rw-r--r--keyboards/jd45/keymaps/mjt/readme.md12
-rw-r--r--keyboards/jd45/keymaps/mjt/rules.mk67
-rw-r--r--keyboards/jd45/keymaps/mjt6u/Makefile23
-rw-r--r--keyboards/jd45/keymaps/mjt6u/config.h84
-rw-r--r--keyboards/jd45/keymaps/mjt6u/keymap.c149
-rw-r--r--keyboards/jd45/keymaps/mjt6u/readme.md23
-rw-r--r--keyboards/lets_split/keymaps/mjt/Makefile25
-rw-r--r--keyboards/lets_split/keymaps/mjt/config.h38
-rw-r--r--keyboards/lets_split/keymaps/mjt/keymap.c217
-rw-r--r--keyboards/mitosis/keymaps/mjt/config.h74
-rw-r--r--keyboards/mitosis/keymaps/mjt/keymap.c329
-rw-r--r--keyboards/planck/keymaps/mjt/Makefile3
-rw-r--r--keyboards/planck/keymaps/mjt/config.h33
-rw-r--r--keyboards/planck/keymaps/mjt/keymap.c283
-rw-r--r--keyboards/planck/keymaps/mjt/readme.md22
-rw-r--r--keyboards/planck/keymaps/mjtnumsym/Makefile3
-rw-r--r--keyboards/planck/keymaps/mjtnumsym/config.h33
-rw-r--r--keyboards/planck/keymaps/mjtnumsym/keymap.c282
-rw-r--r--keyboards/planck/keymaps/mjtnumsym/readme.md26
-rw-r--r--keyboards/roadkit/keymaps/flipphone/Makefile21
-rw-r--r--keyboards/roadkit/keymaps/flipphone/config.h8
-rw-r--r--keyboards/roadkit/keymaps/flipphone/keymap.c216
-rw-r--r--keyboards/roadkit/keymaps/flipphone/readme.md26
-rw-r--r--keyboards/roadkit/keymaps/mjt/Makefile21
-rw-r--r--keyboards/roadkit/keymaps/mjt/config.h8
-rw-r--r--keyboards/roadkit/keymaps/mjt/keymap.c236
-rw-r--r--keyboards/roadkit/keymaps/mjt/readme.md22
-rw-r--r--keyboards/tv44/keymaps/mjt/Makefile21
-rw-r--r--keyboards/tv44/keymaps/mjt/config.h14
-rw-r--r--keyboards/tv44/keymaps/mjt/keymap.c199
-rw-r--r--keyboards/tv44/keymaps/mjt/readme.md26
40 files changed, 3417 insertions, 0 deletions
diff --git a/keyboards/gherkin/keymaps/mjt/Makefile b/keyboards/gherkin/keymaps/mjt/Makefile
new file mode 100644
index 000000000..b397f86d0
--- /dev/null
+++ b/keyboards/gherkin/keymaps/mjt/Makefile
@@ -0,0 +1,29 @@
1## not sure where this stuff goes ##
2MCU = atmega32u4
3F_CPU = 16000000
4ARCH = AVR8
5F_USB = $(F_CPU)
6OPT_DEFS += -DBOOTLOADER_SIZE=4096
7
8# Build Options
9# change to "no" to disable the options, or define them in the Makefile in
10# the appropriate keymap folder that will get included automatically
11#
12BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
13MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
14EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
15CONSOLE_ENABLE = no # Console for debug(+400)
16COMMAND_ENABLE = yes # Commands for debug and configuration
17NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
19MIDI_ENABLE = no # MIDI controls
20AUDIO_ENABLE = yes # Audio output on port C6
21UNICODE_ENABLE = no # Unicode
22BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
23RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
24SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
25TAP_DANCE_ENABLE=yes
26
27ifndef QUANTUM_DIR
28 include ../../../../Makefile
29endif
diff --git a/keyboards/gherkin/keymaps/mjt/config.h b/keyboards/gherkin/keymaps/mjt/config.h
new file mode 100644
index 000000000..9c9f03838
--- /dev/null
+++ b/keyboards/gherkin/keymaps/mjt/config.h
@@ -0,0 +1,171 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
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
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Some Guy
28#define PRODUCT Gherkin
29#define DESCRIPTION 30 percent disaster
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 6
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45
46// These are with USB on the left.
47// #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 }
48// original from TMK: #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4 }
49// #define MATRIX_COL_PINS { D0, D4, F6, D7, E6, B4 }
50
51// these are with USB on the right.
52#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
53#define MATRIX_COL_PINS { B4, E6, D7, F6, D4, D0 }
54
55#define CATERINA_BOOTLOADER
56
57#define UNUSED_PINS
58
59/* COL2ROW or ROW2COL */
60#define DIODE_DIRECTION COL2ROW
61
62/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
63#define DEBOUNCING_DELAY 5
64
65/* define if matrix has ghost (lacks anti-ghosting diodes) */
66//#define MATRIX_HAS_GHOST
67
68/* number of backlight levels */
69#define BACKLIGHT_LEVELS 3
70#define BACKLIGHT_PIN B5
71
72/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
73#define LOCKING_SUPPORT_ENABLE
74/* Locking resynchronize hack */
75#define LOCKING_RESYNC_ENABLE
76
77#define AUDIO_VOICES
78
79/*
80 * Force NKRO
81 *
82 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
83 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
84 * makefile for this to work.)
85 *
86 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
87 * until the next keyboard reset.
88 *
89 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
90 * fully operational during normal computer usage.
91 *
92 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
93 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
94 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
95 * power-up.
96 *
97 */
98//#define FORCE_NKRO
99
100/*
101 * Magic Key Options
102 *
103 * Magic keys are hotkey commands that allow control over firmware functions of
104 * the keyboard. They are best used in combination with the HID Listen program,
105 * found here: https://www.pjrc.com/teensy/hid_listen.html
106 *
107 * The options below allow the magic key functionality to be changed. This is
108 * useful if your keyboard/keypad is missing keys and you want magic key support.
109 *
110 */
111
112/* key combination for magic key command */
113#define IS_COMMAND() ( \
114 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
115)
116
117/* control how magic key switches layers */
118//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
119//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
120//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
121
122/* override magic key keymap */
123//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
124//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
125//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
126//#define MAGIC_KEY_HELP1 H
127//#define MAGIC_KEY_HELP2 SLASH
128//#define MAGIC_KEY_DEBUG D
129//#define MAGIC_KEY_DEBUG_MATRIX X
130//#define MAGIC_KEY_DEBUG_KBD K
131//#define MAGIC_KEY_DEBUG_MOUSE M
132//#define MAGIC_KEY_VERSION V
133//#define MAGIC_KEY_STATUS S
134//#define MAGIC_KEY_CONSOLE C
135//#define MAGIC_KEY_LAYER0_ALT1 ESC
136//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
137//#define MAGIC_KEY_LAYER0 0
138//#define MAGIC_KEY_LAYER1 1
139//#define MAGIC_KEY_LAYER2 2
140//#define MAGIC_KEY_LAYER3 3
141//#define MAGIC_KEY_LAYER4 4
142//#define MAGIC_KEY_LAYER5 5
143//#define MAGIC_KEY_LAYER6 6
144//#define MAGIC_KEY_LAYER7 7
145//#define MAGIC_KEY_LAYER8 8
146//#define MAGIC_KEY_LAYER9 9
147//#define MAGIC_KEY_BOOTLOADER PAUSE
148//#define MAGIC_KEY_LOCK CAPS
149//#define MAGIC_KEY_EEPROM E
150//#define MAGIC_KEY_NKRO N
151//#define MAGIC_KEY_SLEEP_LED Z
152
153/*
154 * Feature disable options
155 * These options are also useful to firmware size reduction.
156 */
157
158/* disable debug print */
159//#define NO_DEBUG
160
161/* disable print */
162//#define NO_PRINT
163
164/* disable action features */
165//#define NO_ACTION_LAYER
166//#define NO_ACTION_TAPPING
167//#define NO_ACTION_ONESHOT
168//#define NO_ACTION_MACRO
169//#define NO_ACTION_FUNCTION
170
171#endif
diff --git a/keyboards/gherkin/keymaps/mjt/keymap.c b/keyboards/gherkin/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..3dcc3ca09
--- /dev/null
+++ b/keyboards/gherkin/keymaps/mjt/keymap.c
@@ -0,0 +1,280 @@
1#include "gherkin.h"
2#include "action_layer.h"
3#ifdef AUDIO_ENABLE
4 #include "audio.h"
5#endif
6#include "eeconfig.h"
7
8extern keymap_config_t keymap_config;
9
10//Tap Dance Declarations
11enum {
12 TD_Z_LCTL = 0,
13 TD_X_LGUI = 1,
14 TD_C_LALT = 2,
15 TD_A_TAB = 3,
16 TD_Q_ESC = 4,
17// M(0)
18};
19
20//Friendly Layer Names
21enum gherkin_layers {
22 _QWERTY,
23 _SONGS,
24 _NUMBERS,
25 _SYMBOLS,
26 _PLOVER,
27 _ADJUST
28};
29
30// custom keycodes
31enum gherkin_keycodes {
32 QWERTY = SAFE_RANGE,
33 NUMBERS,
34 SYMBOLS,
35 SONGS,
36 PLOVER,
37 BACKLIT,
38 MACSLEEP,
39 EXT_PLV
40};
41
42// Fillers to make layering more clear
43#define _______ KC_TRNS
44#define XXXXXXX KC_NO
45
46const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
47 [_QWERTY] = KEYMAP(
48 TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
49 TD(TD_A_TAB), LT(_SYMBOLS,KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_ADJUST,KC_SPC),
50 TD(TD_Z_LCTL), TD(TD_X_LGUI), TD(TD_C_LALT), KC_V, KC_B, LT(_NUMBERS, KC_N), KC_M, KC_COMM, KC_DOT, SFT_T(KC_ENT))
51 ,
52 [_NUMBERS] = KEYMAP(
53 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
54 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_HOME, KC_PGDN, KC_PGUP, KC_END ,
55 KC_F7, KC_F8, KC_F9, KC_F10, LT(_ADJUST,KC_F11), _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT)
56 ,
57 [_SYMBOLS] = KEYMAP(
58 KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
59 KC_GRV, _______, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, KC_MINS, KC_EQL , KC_SCLN, KC_QUOT,
60 KC_TILD, MO(_ADJUST), XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, KC_UNDS, KC_PLUS, S(KC_SCLN), S(KC_QUOT))
61 ,
62 [_PLOVER] = KEYMAP(
63 KC_Q, KC_W, KC_E, KC_R, KC_1, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
64 KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
65 EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX)
66 ,
67 [_ADJUST] = KEYMAP(
68 RESET, _______, _______, _______, _______, QWERTY, NUMBERS, SYMBOLS, PLOVER, SONGS,
69 MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, MACSLEEP, _______,
70 BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______)
71};
72
73#ifdef AUDIO_ENABLE
74
75float tone_startup[][2] = SONG(STARTUP_SOUND);
76float tone_qwerty[][2] = SONG(QWERTY_SOUND);
77float tone_dvorak[][2] = SONG(DVORAK_SOUND);
78float tone_colemak[][2] = SONG(COLEMAK_SOUND);
79float tone_plover[][2] = SONG(PLOVER_SOUND);
80float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
81float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
82
83float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
84#endif
85
86void persistant_default_layer_set(uint16_t default_layer) {
87 eeconfig_update_default_layer(default_layer);
88 default_layer_set(default_layer);
89}
90
91bool process_record_user(uint16_t keycode, keyrecord_t *record) {
92 switch (keycode) {
93 case QWERTY:
94 if (record->event.pressed) {
95 #ifdef AUDIO_ENABLE
96 PLAY_SONG(tone_qwerty);
97 #endif
98 persistant_default_layer_set(1UL<<_QWERTY);
99 }
100 return false;
101 break;
102 case NUMBERS:
103 if (record->event.pressed) {
104 #ifdef AUDIO_ENABLE
105 PLAY_SONG(tone_dvorak);
106 #endif
107 persistant_default_layer_set(1UL<<_NUMBERS);
108 }
109 return false;
110 break;
111 case SYMBOLS:
112 if (record->event.pressed) {
113 #ifdef AUDIO_ENABLE
114 PLAY_SONG(tone_colemak);
115 #endif
116 persistant_default_layer_set(1UL<<_SYMBOLS);
117 }
118 return false;
119 break;
120 case PLOVER:
121 if (record->event.pressed) {
122 #ifdef AUDIO_ENABLE
123 stop_all_notes();
124 PLAY_SONG(tone_plover);
125 #endif
126 layer_off(_NUMBERS);
127 layer_off(_SYMBOLS);
128 layer_off(_ADJUST);
129 layer_on(_PLOVER);
130 if (!eeconfig_is_enabled()) {
131 eeconfig_init();
132 }
133 keymap_config.raw = eeconfig_read_keymap();
134 keymap_config.nkro = 1;
135 eeconfig_update_keymap(keymap_config.raw);
136 }
137 return false;
138 break;
139 case EXT_PLV:
140 if (record->event.pressed) {
141 #ifdef AUDIO_ENABLE
142 PLAY_SONG(tone_plover_gb);
143 #endif
144 layer_off(_PLOVER);
145 }
146 return false;
147 break;
148 case MACSLEEP:
149 if (record->event.pressed) {
150 // ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
151 register_code(KC_RSFT);
152 register_code(KC_RCTL);
153 register_code(KC_POWER);
154 unregister_code(KC_POWER);
155 unregister_code(KC_RCTL);
156 unregister_code(KC_RSFT);
157 }
158 return false;
159 break;
160 case BACKLIT:
161 if (record->event.pressed) {
162 register_code(KC_RSFT);
163 #ifdef BACKLIGHT_ENABLE
164 backlight_step();
165 #endif
166 } else {
167 unregister_code(KC_RSFT);
168 }
169 return false;
170 break;
171 }
172 return true;
173}
174
175
176/*
177const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
178 keyevent_t event = record->event;
179
180 switch (id) {
181 case 0: {
182 if (record->event.pressed) {
183 key_timer = timer_read(); // if the key is being pressed, we start the timer.
184 }
185 else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
186 if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
187 return MACRO( D(LSFT), END );
188 }
189 else {
190 return MACRO( T(N), END );
191 }
192 }
193 break;
194 }
195 }
196 return MACRO_NONE;
197}*/
198
199void matrix_init_user(void) {
200 #ifdef AUDIO_ENABLE
201 startup_user();
202 #endif
203}
204
205#ifdef AUDIO_ENABLE
206
207void startup_user()
208{
209 _delay_ms(20); // gets rid of tick
210 PLAY_SONG(tone_startup);
211}
212
213void shutdown_user()
214{
215 PLAY_SONG(tone_goodbye);
216 _delay_ms(150);
217 stop_all_notes();
218}
219
220void music_on_user(void)
221{
222 music_scale_user();
223}
224
225void music_scale_user(void)
226{
227 PLAY_SONG(music_scale);
228}
229
230#endif
231
232void matrix_scan_user(void) {
233}
234
235//Tap Dance Definitions
236qk_tap_dance_action_t tap_dance_actions[] = {
237 //Tap once for Esc, twice for Caps Lock
238 [TD_Z_LCTL] = ACTION_TAP_DANCE_DOUBLE(KC_Z, KC_LCTL),
239 [TD_X_LGUI] = ACTION_TAP_DANCE_DOUBLE(KC_X, KC_LGUI),
240 [TD_C_LALT] = ACTION_TAP_DANCE_DOUBLE(KC_C, KC_LALT),
241 [TD_A_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_TAB),
242 [TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC)
243};
244
245// don't know what this is doing...
246/*
247void led_set_user(uint8_t usb_led) {
248
249 if (usb_led & (1 << USB_LED_NUM_LOCK)) {
250 DDRD |= (1 << 5); PORTD &= ~(1 << 5);
251 } else {
252 DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
253 }
254
255 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
256 DDRB |= (1 << 0); PORTB &= ~(1 << 0);
257 } else {
258 DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
259 }
260
261 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
262
263 } else {
264
265 }
266
267 if (usb_led & (1 << USB_LED_COMPOSE)) {
268
269 } else {
270
271 }
272
273 if (usb_led & (1 << USB_LED_KANA)) {
274
275 } else {
276
277 }
278
279}
280*/
diff --git a/keyboards/hhkb/keymaps/mjt/config.h b/keyboards/hhkb/keymaps/mjt/config.h
new file mode 100644
index 000000000..d38611538
--- /dev/null
+++ b/keyboards/hhkb/keymaps/mjt/config.h
@@ -0,0 +1,77 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
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
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0xCAFE
26#define DEVICE_VER 0x0104
27#define MANUFACTURER q.m.k
28#define PRODUCT HHKB mod
29#define DESCRIPTION q.m.k keyboard firmware for HHKB
30
31/* key matrix size */
32#ifdef HHKB_JP
33# define MATRIX_ROWS 16
34#else
35# define MATRIX_ROWS 8
36#endif
37#define MATRIX_COLS 8
38
39#define TAPPING_TERM 200
40
41/* number of backlight levels */
42#define BACKLIGHT_LEVELS 3
43
44#define USB_MAX_POWER_CONSUMPTION 50
45
46/* Set 0 if debouncing isn't needed */
47#define DEBOUNCE 5
48
49/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
50//#define LOCKING_SUPPORT_ENABLE
51/* Locking resynchronize hack */
52//#define LOCKING_RESYNC_ENABLE
53
54/* key combination for command */
55#define IS_COMMAND() ( \
56 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
57)
58
59/*
60 * Feature disable options
61 * These options are also useful to firmware size reduction.
62*/
63
64/* disable debug print */
65//#define NO_DEBUG
66
67/* disable print */
68//#define NO_PRINT
69
70/* disable action features */
71//#define NO_ACTION_LAYER
72//#define NO_ACTION_TAPPING
73//#define NO_ACTION_ONESHOT
74//#define NO_ACTION_MACRO
75//#define NO_ACTION_FUNCTION
76
77#endif
diff --git a/keyboards/hhkb/keymaps/mjt/keymap.c b/keyboards/hhkb/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..b5cd99714
--- /dev/null
+++ b/keyboards/hhkb/keymaps/mjt/keymap.c
@@ -0,0 +1,114 @@
1/* -*- eval: (turn-on-orgtbl); -*-
2 * default HHKB Layout
3 */
4#include "hhkb.h"
5
6#define BASE 0
7#define HHKB 1
8#define FUNK 2
9#define DYN 3
10#define CTL_ESC CTL_T(KC_ESC)
11#define MACSLEEP LCTL(LSFT(KC_POWER))
12
13enum hhkb_keycodes {
14 QWERTY = SAFE_RANGE,
15 DYNKEY,
16 DYNAMIC_MACRO_RANGE,
17};
18
19#include "dynamic_macro.h"
20
21const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
22
23 /* BASE Level: Default Layer
24 |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
25 | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
26 |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
27 | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
28 |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
29 | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
30 |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
31 | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
32 |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
33
34 |------+------+-----------------------+------+------|
35 | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
36 |------+------+-----------------------+------+------|
37 */
38
39 [BASE] = KEYMAP( // default layer
40 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \
41 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
42 CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
43 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), TT(FUNK), \
44 KC_LALT, KC_LGUI, /* */ KC_SPC, MO(DYN), KC_RALT),
45
46
47
48 /* Layer HHKB: HHKB mode (HHKB Fn)
49 |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
50 | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
51 |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
52 | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
53 |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
54 | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
55 |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
56 | | | | | | | + | - | End | PgD | Dow | | | | |
57 |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
58
59 |------+------+----------------------+------+------+
60 | **** | **** | ******************** | **** | **** |
61 |------+------+----------------------+------+------+
62
63
64
65 [HHKB] = KEYMAP(
66 KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
67 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \
68 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
69 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
70 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
71
72 */
73 [FUNK] = KEYMAP(
74 KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
75 KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \
76 KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
77 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
78 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
79[DYN] = KEYMAP(
80KC_TRNS, DYN_REC_START1, DYN_REC_START2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \
81KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, \
82KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACSLEEP, KC_HOME, KC_END , KC_TRNS, \
83KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, \
84 KC_TRNS, KC_TRNS, DYN_REC_STOP, KC_TRNS, KC_TRNS)
85 };
86
87
88const uint16_t PROGMEM fn_actions[] = {
89
90};
91
92const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
93{
94 // MACRODOWN only works in this function
95 switch(id) {
96 case 0:
97 if (record->event.pressed) {
98 register_code(KC_RSFT);
99 } else {
100 unregister_code(KC_RSFT);
101 }
102 break;
103 }
104 return MACRO_NONE;
105};
106
107bool process_record_user(uint16_t keycode, keyrecord_t *record) {
108 uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode);
109 if (!process_record_dynamic_macro(macro_kc, record)) {
110 return false;
111 }
112
113 return true;
114}
diff --git a/keyboards/hhkb/keymaps/mjt/readme.md b/keyboards/hhkb/keymaps/mjt/readme.md
new file mode 100644
index 000000000..ff575ce24
--- /dev/null
+++ b/keyboards/hhkb/keymaps/mjt/readme.md
@@ -0,0 +1,16 @@
1# Mike's HHKB
2
3- Surprisingly stock for the most part
4- Dynamic macros
5- ctrl key has tapkey for escape
6- right shift has tapkey for enter
7- Works with iPhone Camera Adapter
8
9## Layers
10
11Base for letters and mods.
12
13Funk layer is my tweaked function layer
14
15Dyn layer has dynamic macros. Record with 1 and 2, playback with \ and
16upper-right-most key. Also turns the arrow clusters into nav keys.
diff --git a/keyboards/jd45/keymaps/mjt/Makefile b/keyboards/jd45/keymaps/mjt/Makefile
new file mode 100644
index 000000000..c92000665
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/jd45/keymaps/mjt/config.h b/keyboards/jd45/keymaps/mjt/config.h
new file mode 100644
index 000000000..276639514
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt/config.h
@@ -0,0 +1,85 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
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
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER geekhack
28#define PRODUCT JD45
29#define DESCRIPTION q.m.k. keyboard firmware for JD45
30
31/* key matrix size */
32#define MATRIX_ROWS 4
33#define MATRIX_COLS 13
34
35/* Planck PCB default pin-out */
36#define MATRIX_ROW_PINS { F0, F1, F5, B4 }
37#define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2, B0 }
38#define UNUSED_PINS
39
40#define BACKLIGHT_PIN B7
41
42#define USB_MAX_POWER_CONSUMPTION 50
43#define BACKLIGHT_BREATHING
44
45/* COL2ROW or ROW2COL */
46#define DIODE_DIRECTION COL2ROW
47
48/* define if matrix has ghost */
49//#define MATRIX_HAS_GHOST
50
51/* number of backlight levels */
52#define BACKLIGHT_LEVELS 3
53
54/* Set 0 if debouncing isn't needed */
55#define DEBOUNCING_DELAY 5
56
57/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
58#define LOCKING_SUPPORT_ENABLE
59/* Locking resynchronize hack */
60#define LOCKING_RESYNC_ENABLE
61
62/* key combination for command */
63#define IS_COMMAND() ( \
64 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
65)
66
67/*
68 * Feature disable options
69 * These options are also useful to firmware size reduction.
70 */
71
72/* disable debug print */
73//#define NO_DEBUG
74
75/* disable print */
76//#define NO_PRINT
77
78/* disable action features */
79//#define NO_ACTION_LAYER
80//#define NO_ACTION_TAPPING
81//#define NO_ACTION_ONESHOT
82//#define NO_ACTION_MACRO
83//#define NO_ACTION_FUNCTION
84
85#endif
diff --git a/keyboards/jd45/keymaps/mjt/keymap.c b/keyboards/jd45/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..1a7302216
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt/keymap.c
@@ -0,0 +1,80 @@
1#include "jd45.h"
2
3/* Mike's Layout for JD45 with backlight LEDs acting as layer indicator
4 */
5
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7[0] = KEYMAP(
8 TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS,
9 FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT,
10 FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
11 NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO ),
12[1] = KEYMAP(
13GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC,
14TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS,
15TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS,
16TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS ),
17[2] = KEYMAP(
18TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4,
19TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS,
20TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS,
21TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS )
22/* ,
23[3] = KEYMAP(
24TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
25TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
26TRNS, TRNS, TRNS, TRNS, TRNS, BTLD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
27TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS )*/
28};
29
30enum macro_id {
31 M_LAYER1,
32 M_LAYER2
33};
34
35const uint16_t PROGMEM fn_actions[] = {
36 [0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT),
37 // [1] = ACTION_LAYER_TAP_TOGGLE(1),
38 [1] = ACTION_MACRO(M_LAYER1),
39 [2] = ACTION_LAYER_TAP_TOGGLE(2),
40 [3] = ACTION_BACKLIGHT_STEP(),
41 [4] = ACTION_BACKLIGHT_TOGGLE()
42};
43
44const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
45{
46 // MACRODOWN only works in this function
47 switch(id) {
48 case M_LAYER1:
49 // need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality
50 // action_function_tap may also handle this...
51 if (record->event.pressed)
52 {
53 breathing_speed_set(3);
54 breathing_enable();
55 layer_on(1);
56 }
57 else
58 {
59 breathing_speed_set(1);
60 breathing_self_disable();
61 layer_off(1);
62 }
63 break;
64 case M_LAYER2:
65 if (record->event.pressed)
66 {
67 breathing_speed_set(2);
68 breathing_pulse();
69 layer_on(2);
70 }
71 else
72 {
73 breathing_speed_set(1);
74 breathing_self_disable();
75 layer_off(2);
76 }
77 break;
78 }
79 return MACRO_NONE;
80};
diff --git a/keyboards/jd45/keymaps/mjt/readme.md b/keyboards/jd45/keymaps/mjt/readme.md
new file mode 100644
index 000000000..54bdb8346
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt/readme.md
@@ -0,0 +1,12 @@
1# Mike's JD45 standard layout
2
3- Backlight that matches active layer
4- Works with iPhone Camera Adapter
5
6## Layers
7
8Base for letters and mods.
9
10Function 1 layer adds a centered numpad to the board
11
12Function 2 layer replaces the numpad numbers with Fkeys.
diff --git a/keyboards/jd45/keymaps/mjt/rules.mk b/keyboards/jd45/keymaps/mjt/rules.mk
new file mode 100644
index 000000000..6eec21160
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt/rules.mk
@@ -0,0 +1,67 @@
1
2
3# MCU name
4#MCU = at90usb1287
5MCU = atmega32u4
6
7# Processor frequency.
8# This will define a symbol, F_CPU, in all source code files equal to the
9# processor frequency in Hz. You can then use this symbol in your source code to
10# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
11# automatically to create a 32-bit value in your source code.
12#
13# This will be an integer division of F_USB below, as it is sourced by
14# F_USB after it has run through any CPU prescalers. Note that this value
15# does not *change* the processor frequency - it should merely be updated to
16# reflect the processor speed set externally so that the code can use accurate
17# software delays.
18F_CPU = 16000000
19
20
21#
22# LUFA specific
23#
24# Target architecture (see library "Board Types" documentation).
25ARCH = AVR8
26
27# Input clock frequency.
28# This will define a symbol, F_USB, in all source code files equal to the
29# input clock frequency (before any prescaling is performed) in Hz. This value may
30# differ from F_CPU if prescaling is used on the latter, and is required as the
31# raw input clock is fed directly to the PLL sections of the AVR for high speed
32# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
33# at the end, this will be done automatically to create a 32-bit value in your
34# source code.
35#
36# If no clock division is performed on the input clock inside the AVR (via the
37# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
38F_USB = $(F_CPU)
39
40# Interrupt driven control endpoint task(+60)
41OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
42
43
44# Boot Section Size in *bytes*
45# Teensy halfKay 512
46# Teensy++ halfKay 1024
47# Atmel DFU loader 4096
48# LUFA bootloader 4096
49# USBaspLoader 2048
50OPT_DEFS += -DBOOTLOADER_SIZE=4096
51
52
53# Build Options
54# comment out to disable the options.
55#
56BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
57MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
58EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
59CONSOLE_ENABLE = yes # Console for debug(+400)
60COMMAND_ENABLE = yes # Commands for debug and configuration
61# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
62SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
63NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
64BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
65MIDI_ENABLE = no # MIDI controls
66# UNICODE_ENABLE = YES # Unicode
67BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/jd45/keymaps/mjt6u/Makefile b/keyboards/jd45/keymaps/mjt6u/Makefile
new file mode 100644
index 000000000..f9cec3b84
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt6u/Makefile
@@ -0,0 +1,23 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = no # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = yes # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19DEBUG_ENABLE = yes
20
21ifndef QUANTUM_DIR
22 include ../../../../Makefile
23endif
diff --git a/keyboards/jd45/keymaps/mjt6u/config.h b/keyboards/jd45/keymaps/mjt6u/config.h
new file mode 100644
index 000000000..bf9dc6df3
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt6u/config.h
@@ -0,0 +1,84 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
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
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER geekhack
28#define PRODUCT JD45
29#define DESCRIPTION q.m.k. keyboard firmware for JD45
30
31/* key matrix size */
32#define MATRIX_ROWS 4
33#define MATRIX_COLS 13
34
35/* Planck PCB default pin-out */
36#define MATRIX_ROW_PINS { F0, F1, F5, B4 }
37#define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2, B0 }
38#define UNUSED_PINS
39
40#define BACKLIGHT_PIN B7
41
42#define USB_MAX_POWER_CONSUMPTION 50
43
44/* COL2ROW or ROW2COL */
45#define DIODE_DIRECTION COL2ROW
46
47/* define if matrix has ghost */
48//#define MATRIX_HAS_GHOST
49
50/* number of backlight levels */
51#define BACKLIGHT_LEVELS 3
52
53/* Set 0 if debouncing isn't needed */
54#define DEBOUNCING_DELAY 5
55
56/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
57#define LOCKING_SUPPORT_ENABLE
58/* Locking resynchronize hack */
59#define LOCKING_RESYNC_ENABLE
60
61/* key combination for command */
62#define IS_COMMAND() ( \
63 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
64)
65
66/*
67 * Feature disable options
68 * These options are also useful to firmware size reduction.
69 */
70
71/* disable debug print */
72//#define NO_DEBUG
73
74/* disable print */
75//#define NO_PRINT
76
77/* disable action features */
78//#define NO_ACTION_LAYER
79//#define NO_ACTION_TAPPING
80//#define NO_ACTION_ONESHOT
81//#define NO_ACTION_MACRO
82//#define NO_ACTION_FUNCTION
83
84#endif
diff --git a/keyboards/jd45/keymaps/mjt6u/keymap.c b/keyboards/jd45/keymaps/mjt6u/keymap.c
new file mode 100644
index 000000000..44f0c31db
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt6u/keymap.c
@@ -0,0 +1,149 @@
1#include "jd45.h"
2
3enum jd45_layers
4{
5 _QWERTY,
6 _QWERTYNUMMODS,
7 _NUMSYM,
8 _FUNCTION,
9 _NUMPAD,
10 _FKEYNUMPAD,
11 _ADJUST
12};
13
14enum jd45_keycodes
15{
16 NUMSYM = SAFE_RANGE,
17 MACSLEEP,
18 USEFNMODS,
19 USENUMMODS,
20 DYNAMIC_MACRO_RANGE,
21};
22
23#include "dynamic_macro.h"
24
25#define LONGPRESS_DELAY 150
26#define LAYER_TOGGLE_DELAY 900
27
28#define _______ KC_TRNS
29#define __MOD__ KC_TRNS
30#define XXXXXXX KC_NO
31#define F_FNSPC F(0)
32#define F_NUMSPC F(1)
33#define F_FNTAB F(2)
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36 [_QWERTY] = {
37 {F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC},
38 {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)},
39 {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)},
40 { XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_FNSPC, XXXXXXX, XXXXXXX, MO(_FUNCTION), MO(_ADJUST) }
41},
42[_QWERTYNUMMODS] = {
43 {F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC},
44 {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)},
45 {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)},
46 {XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST) }
47},
48[_NUMSYM] = {
49{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL},
50 {__MOD__, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______},
51 {_______, _______, _______, _______, _______, KC_SPC, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______},
52{XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
53},
54[_FUNCTION] = {
55{__MOD__, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
56{__MOD__, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______},
57{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
58{XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__ , __MOD__}
59},
60[_NUMPAD] = {
61{KC_GRV, _______, KC_UP, _______, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PSCR, KC_LBRC, KC_RBRC},
62{_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_4, KC_5, KC_6, KC_INS, KC_HOME, KC_PGUP, _______, _______},
63{_______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_PGDN, _______, _______},
64{XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
65},
66[_FKEYNUMPAD] = {
67{_______, _______, KC_VOLU, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, _______},
68{_______, KC_MPRV, KC_VOLD, KC_MNXT, KC_F4, KC_F5, KC_F6, KC_J, KC_K, KC_L, KC_SCLN, _______},
69{_______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_MUTE, KC_MPRV, KC_MNXT, KC_MSTP, _______},
70{XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__ }
71},
72[_ADJUST] = {
73 {_______, RESET, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______},
74 { _______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______},
75 { _______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______},
76 {XXXXXXX, _______, _______,XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
77 }
78};
79
80
81const uint16_t PROGMEM fn_actions[] = {
82 [0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC),
83 [1] = ACTION_LAYER_TAP_KEY(_NUMPAD, KC_SPC),
84 [2] = ACTION_LAYER_TAP_KEY(_FUNCTION, KC_TAB),
85};
86
87void persistent_default_layer_set(uint16_t default_layer) {
88 eeconfig_update_default_layer(default_layer);
89 default_layer_set(default_layer);
90}
91
92static bool singular_key = false;
93
94bool process_record_user(uint16_t keycode, keyrecord_t *record) {
95 uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode);
96 if (!process_record_dynamic_macro(macro_kc, record)) {
97 return false;
98 }
99 println(" ");
100 print("process record");
101
102 switch (keycode) {
103 case MACSLEEP:
104 if (record->event.pressed) {
105 // ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
106 register_code(KC_RSFT);
107 register_code(KC_RCTL);
108 register_code(KC_POWER);
109 unregister_code(KC_POWER);
110 unregister_code(KC_RCTL);
111 unregister_code(KC_RSFT);
112 }
113 return false;
114 break;
115 case USEFNMODS:
116 if (record->event.pressed) {
117 persistent_default_layer_set(1UL<<_QWERTY);
118 #ifdef AUDIO_ENABLE
119 PLAY_NOTE_ARRAY(tone_fnpc, false, 0);
120 #endif
121 print("Space-FN");
122 }
123 return false;
124 break;
125 case USENUMMODS:
126 if (record->event.pressed) {
127 persistent_default_layer_set(1UL<<_QWERTYNUMMODS);
128 #ifdef AUDIO_ENABLE
129 PLAY_NOTE_ARRAY(tone_fnmac, false, 0);
130 #endif
131 print("Space-Numpad");
132 }
133 return false;
134 break;
135 default:
136 singular_key = false;
137 break;
138 }
139
140 return true;
141};
142
143
144void matrix_init_user(void) {
145 #ifdef AUDIO_ENABLE
146 startup_user();
147 #endif
148 // debug_enable = true;
149}
diff --git a/keyboards/jd45/keymaps/mjt6u/readme.md b/keyboards/jd45/keymaps/mjt6u/readme.md
new file mode 100644
index 000000000..a43ddf5fc
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt6u/readme.md
@@ -0,0 +1,23 @@
1# Mike's JD45 with 6u Spacebar
2
3- Early draft of numsym that misses a lot of symbols
4- Numpad layer available for evaluation
5- Works with iPhone Camera Adapter
6- Dynamic macros
7
8## Layers
9
10Qwerty for letters and mods.
11
12Qwertymods layer switches some Modifiers around
13
14Numsym puts the number keys across the top row like a Planck. Arrows are on hjkl
15which makes the other NumSym dynamic from my other boards fall apart
16
17Function layer replaces the top row numbers with Fkeys.
18
19Numpad layer makes a number pad in the center.
20
21Fkeynumpad replaces the numpad numbers with Fkeys.
22
23Adjust layer has macros and configuration.
diff --git a/keyboards/lets_split/keymaps/mjt/Makefile b/keyboards/lets_split/keymaps/mjt/Makefile
new file mode 100644
index 000000000..90616d1f1
--- /dev/null
+++ b/keyboards/lets_split/keymaps/mjt/Makefile
@@ -0,0 +1,25 @@
1
2# Build Options
3# change to "no" to disable the options, or define them in the Makefile in
4# the appropriate keymap folder that will get included automatically
5#
6BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
7MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
8EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
9CONSOLE_ENABLE = no # Console for debug(+400)
10COMMAND_ENABLE = no # Commands for debug and configuration
11NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
12BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
13MIDI_ENABLE = no # MIDI controls
14AUDIO_ENABLE = no # Audio output on port C6
15UNICODE_ENABLE = no # Unicode
16BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
17RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
18ONEHAND_ENABLE = no # Enable one-hand typing
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 \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/mjt/config.h b/keyboards/lets_split/keymaps/mjt/config.h
new file mode 100644
index 000000000..dc9fa5b5c
--- /dev/null
+++ b/keyboards/lets_split/keymaps/mjt/config.h
@@ -0,0 +1,38 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
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
18
19#define USE_SERIAL
20
21#define MASTER_LEFT
22// #define _MASTER_RIGHT
23// #define EE_HANDS
24
25
26#ifdef SUBPROJECT_rev1
27 #include "../../rev1/config.h"
28#endif
29#ifdef SUBPROJECT_rev2
30 #include "../../rev2/config.h"
31#endif
32#ifdef SUBPROJECT_rev2fliphalf
33 #include "../../rev2fliphalf/config.h"
34#endif
35
36#undef RGBLED_NUM
37#define RGBLIGHT_ANIMATIONS
38#define RGBLED_NUM 10 \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/mjt/keymap.c b/keyboards/lets_split/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..4dd0d9aa9
--- /dev/null
+++ b/keyboards/lets_split/keymaps/mjt/keymap.c
@@ -0,0 +1,217 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef BACKLIGHT_ENABLE
5 #include "backlight.h"
6#endif
7
8extern keymap_config_t keymap_config;
9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14#define _QWERTY 0
15#define _COLEMAK 1
16#define _DVORAK 2
17#define _LOWER 3
18#define _RAISE 4
19#define _ADJUST 16
20
21enum custom_keycodes {
22 QWERTY = SAFE_RANGE,
23 COLEMAK,
24 DVORAK,
25 LOWER,
26 RAISE,
27 ADJUST,
28};
29
30// Fillers to make layering more clear
31#define _______ KC_TRNS
32#define XXXXXXX KC_NO
33
34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35
36/* Qwerty
37 * ,-----------------------------------------------------------------------------------.
38 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
39 * |------+------+------+------+------+-------------+------+------+------+------+------|
40 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
41 * |------+------+------+------+------+------|------+------+------+------+------+------|
42 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
43 * |------+------+------+------+------+------+------+------+------+------+------+------|
44 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
45 * `-----------------------------------------------------------------------------------'
46 */
47[_QWERTY] = KEYMAP( \
48 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
49 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
50 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
51 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
52),
53
54/* Colemak
55 * ,-----------------------------------------------------------------------------------.
56 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
57 * |------+------+------+------+------+-------------+------+------+------+------+------|
58 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
59 * |------+------+------+------+------+------|------+------+------+------+------+------|
60 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
61 * |------+------+------+------+------+------+------+------+------+------+------+------|
62 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
63 * `-----------------------------------------------------------------------------------'
64 */
65[_COLEMAK] = KEYMAP( \
66 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
67 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
68 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
69 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
70),
71
72/* Dvorak
73 * ,-----------------------------------------------------------------------------------.
74 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
75 * |------+------+------+------+------+-------------+------+------+------+------+------|
76 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
77 * |------+------+------+------+------+------|------+------+------+------+------+------|
78 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
79 * |------+------+------+------+------+------+------+------+------+------+------+------|
80 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
81 * `-----------------------------------------------------------------------------------'
82 */
83[_DVORAK] = KEYMAP( \
84 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
85 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
86 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
87 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
88),
89
90/* Lower
91 * ,-----------------------------------------------------------------------------------.
92 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
93 * |------+------+------+------+------+-------------+------+------+------+------+------|
94 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
95 * |------+------+------+------+------+------|------+------+------+------+------+------|
96 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
97 * |------+------+------+------+------+------+------+------+------+------+------+------|
98 * | | | | | | | | Next | Vol- | Vol+ | Play |
99 * `-----------------------------------------------------------------------------------'
100 */
101[_LOWER] = KEYMAP( \
102 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
103 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
104 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
105 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
106),
107
108/* Raise
109 * ,-----------------------------------------------------------------------------------.
110 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
111 * |------+------+------+------+------+-------------+------+------+------+------+------|
112 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
113 * |------+------+------+------+------+------|------+------+------+------+------+------|
114 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
115 * |------+------+------+------+------+------+------+------+------+------+------+------|
116 * | | | | | | | | Next | Vol- | Vol+ | Play |
117 * `-----------------------------------------------------------------------------------'
118 */
119[_RAISE] = KEYMAP( \
120 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
121 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
122 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
123 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
124),
125
126/* Adjust (Lower + Raise)
127 * ,-----------------------------------------------------------------------------------.
128 * | | Reset| | | | | | | | | | Del |
129 * |------+------+------+------+------+-------------+------+------+------+------+------|
130 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
131 * |------+------+------+------+------+------|------+------+------+------+------+------|
132 * | | | | | | | | | | | | |
133 * |------+------+------+------+------+------+------+------+------+------+------+------|
134 * | | | | | | | | | | | |
135 * `-----------------------------------------------------------------------------------'
136 */
137[_ADJUST] = KEYMAP( \
138 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
139 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
140 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \
141 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
142)
143
144
145};
146
147#ifdef AUDIO_ENABLE
148float tone_qwerty[][2] = SONG(QWERTY_SOUND);
149float tone_dvorak[][2] = SONG(DVORAK_SOUND);
150float tone_colemak[][2] = SONG(COLEMAK_SOUND);
151#endif
152
153void persistent_default_layer_set(uint16_t default_layer) {
154 eeconfig_update_default_layer(default_layer);
155 default_layer_set(default_layer);
156}
157
158bool process_record_user(uint16_t keycode, keyrecord_t *record) {
159 switch (keycode) {
160 case QWERTY:
161 if (record->event.pressed) {
162 #ifdef AUDIO_ENABLE
163 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
164 #endif
165 persistent_default_layer_set(1UL<<_QWERTY);
166 }
167 return false;
168 break;
169 case COLEMAK:
170 if (record->event.pressed) {
171 #ifdef AUDIO_ENABLE
172 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
173 #endif
174 persistent_default_layer_set(1UL<<_COLEMAK);
175 }
176 return false;
177 break;
178 case DVORAK:
179 if (record->event.pressed) {
180 #ifdef AUDIO_ENABLE
181 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
182 #endif
183 persistent_default_layer_set(1UL<<_DVORAK);
184 }
185 return false;
186 break;
187 case LOWER:
188 if (record->event.pressed) {
189 layer_on(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 } else {
192 layer_off(_LOWER);
193 update_tri_layer(_LOWER, _RAISE, _ADJUST);
194 }
195 return false;
196 break;
197 case RAISE:
198 if (record->event.pressed) {
199 layer_on(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 } else {
202 layer_off(_RAISE);
203 update_tri_layer(_LOWER, _RAISE, _ADJUST);
204 }
205 return false;
206 break;
207 case ADJUST:
208 if (record->event.pressed) {
209 layer_on(_ADJUST);
210 } else {
211 layer_off(_ADJUST);
212 }
213 return false;
214 break;
215 }
216 return true;
217} \ No newline at end of file
diff --git a/keyboards/mitosis/keymaps/mjt/config.h b/keyboards/mitosis/keymaps/mjt/config.h
new file mode 100644
index 000000000..2209a9e0d
--- /dev/null
+++ b/keyboards/mitosis/keymaps/mjt/config.h
@@ -0,0 +1,74 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7
8#define VENDOR_ID 0xFEEB
9#define PRODUCT_ID 0x6060
10#define DEVICE_VER 0x0001
11#define MANUFACTURER MJT
12#define PRODUCT Mitosis
13#define DESCRIPTION q.m.k. keyboard firmware for Mitosis
14
15/* key matrix size */
16#define MATRIX_ROWS 5
17#define MATRIX_COLS 10
18
19// fix iPhone power adapter issue
20#define USB_MAX_POWER_CONSUMPTION 50
21// #define CATERINA_BOOTLOADER
22
23/* define if matrix has ghost */
24//#define MATRIX_HAS_GHOST
25
26/* number of backlight levels */
27//#define BACKLIGHT_LEVELS 3
28
29#define ONESHOT_TIMEOUT 500
30
31
32/* key combination for command */
33#define IS_COMMAND() ( \
34 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
35)
36
37/*
38 * Feature disable options
39 * These options are also useful to firmware size reduction.
40 */
41
42#define PREVENT_STUCK_MODIFIERS
43
44/* disable debug print */
45//#define NO_DEBUG
46
47/* disable print */
48//#define NO_PRINT
49
50/* disable action features */
51//#define NO_ACTION_LAYER
52//#define NO_ACTION_TAPPING
53//#define NO_ACTION_ONESHOT
54//#define NO_ACTION_MACRO
55//#define NO_ACTION_FUNCTION
56
57//UART settings for communication with the RF microcontroller
58#define SERIAL_UART_BAUD 1000000
59#define SERIAL_UART_DATA UDR1
60#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
61#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
62#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
63#define SERIAL_UART_INIT() do { \
64 /* baud rate */ \
65 UBRR1L = SERIAL_UART_UBRR; \
66 /* baud rate */ \
67 UBRR1H = SERIAL_UART_UBRR >> 8; \
68 /* enable TX and RX */ \
69 UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
70 /* 8-bit data */ \
71 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
72 } while(0)
73
74#endif
diff --git a/keyboards/mitosis/keymaps/mjt/keymap.c b/keyboards/mitosis/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..01443d5f4
--- /dev/null
+++ b/keyboards/mitosis/keymaps/mjt/keymap.c
@@ -0,0 +1,329 @@
1// this is the style you want to emulate.
2// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
3
4#include "mitosis.h"
5#ifdef AUDIO_ENABLE
6 #include "audio.h"
7#endif
8#include "eeconfig.h"
9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14enum mitosis_layers
15{
16 _QWERTY,
17 _SHIFTED,
18 _FUNCTIONPC,
19 _FUNCTIONMAC,
20 _FUNCSHIFT,
21 _ADJUST
22};
23
24enum mitosis_keycodes
25{
26 FNKEY = SAFE_RANGE,
27 SHIFT,
28 MACSLEEP,
29 FNMAC,
30 FNPC,
31 DYNAMIC_MACRO_RANGE,
32};
33
34
35// Macro definitions for readability
36enum mitosis_macros
37{
38 VOLU,
39 VOLD,
40 ESCM
41};
42
43
44#include "dynamic_macro.h"
45
46#define LONGPRESS_DELAY 150
47#define LAYER_TOGGLE_DELAY 900
48
49// Fillers to make layering more clear
50#define _______ KC_TRNS
51#define __MOD__ KC_TRNS
52#define XXXXXXX KC_NO
53
54const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
55 [_QWERTY] = { /* QWERTY adapted to this crazy thing */
56 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P },
57 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN },
58 {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) },
59 {XXXXXXX, KC_LCTL, M(ESCM), KC_TAB, KC_QUOT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX },
60 {XXXXXXX, KC_LALT, KC_LGUI, KC_SPC, SHIFT, FNKEY, KC_BSPC, KC_ENT, MO(_ADJUST), XXXXXXX }
61 },
62
63
64 [_SHIFTED] = { /* Shifted Layer, layered so that tri_layer can be used, or selectively
65 able to modify individual key's shifted behaviour */
66 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
67 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
68 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
69 {XXXXXXX, __MOD__, KC_DEL, _______, _______, _______, _______, _______, _______, XXXXXXX },
70 {XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, _______, KC_NO, XXXXXXX }
71 },
72
73
74 [_FUNCTIONPC] = { /* Function Layer mimicks planck's raise layer somewhat */
75 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 },
76 {LCTL(KC_A), LCTL(KC_S), _______, LCTL(KC_F),_______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC },
77 {LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V),_______, _______, KC_BSLS, _______, _______, KC_QUOT },
78 {XXXXXXX, __MOD__, KC_DEL, _______, KC_GRV, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX },
79 {XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, KC_PSCR, KC_NO, XXXXXXX }
80 },
81
82 [_FUNCTIONMAC] = { /* Function Layer mimicks planck's raise layer somewhat */
83 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 },
84 {LGUI(KC_A), LGUI(KC_S), _______, LGUI(KC_F),_______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC },
85 {LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V),_______, _______, KC_BSLS, _______, _______, KC_QUOT },
86 {XXXXXXX, __MOD__, KC_DEL, _______, KC_GRV, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX },
87 {XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, KC_PSCR, KC_NO, XXXXXXX }
88 },
89
90 [_FUNCSHIFT] = { /* Function Shifted Layer mimicks planck's lower layer somewhat */
91 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
92 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_LCBR, KC_RCBR },
93 {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______ },
94 {XXXXXXX, __MOD__, KC_DEL, _______, KC_TILD, _______, _______, _______, _______, XXXXXXX },
95 {XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, _______, _______, XXXXXXX }
96 },
97
98
99 [_ADJUST] = { /* Adjust layer for fancy stuff and macros */
100 {RESET, FNPC, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______ },
101 {FNMAC, _______, AU_ON, AU_OFF, _______, _______, _______, _______, MACSLEEP, _______ },
102 {MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY },
103 {XXXXXXX, __MOD__, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, XXXXXXX },
104 {XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, _______, __MOD__, XXXXXXX }
105 }
106
107};
108
109#ifdef AUDIO_ENABLE
110
111float tone_startup[][2] = SONG(STARTUP_SOUND);
112float tone_qwerty[][2] = SONG(QWERTY_SOUND);
113float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
114float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
115float tone_fnpc[][2] = SONG(PLOVER_SOUND);
116float tone_fnmac[][2] = SONG(PLOVER_GOODBYE_SOUND);
117float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
118
119float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
120#endif
121
122const uint16_t PROGMEM fn_actions[] = {
123
124};
125static uint16_t function_layer = _FUNCTIONMAC;
126static uint16_t key_timer;
127
128void persistent_function_layer_set(uint16_t new_function_layer) {
129 // eeconfig_update_function_layer(new_function_layer);
130 function_layer = new_function_layer;
131 // should clear layers to avoid getting stuck.
132}
133
134const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
135{
136 // MACRODOWN only works in this function
137 switch(id) {
138
139 //switch multiplexing for media, short tap for volume up, long press for play/pause
140 case VOLU:
141 if (record->event.pressed) {
142 key_timer = timer_read(); // if the key is being pressed, we start the timer.
143 } else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
144 if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { // LONGPRESS_DELAY being 150ms, the threshhold we pick for counting something as a tap.
145 return MACRO(T(MPLY), END);
146 } else {
147 return MACRO(T(VOLU), END);
148 }
149 }
150 break;
151
152 //switch multiplexing for media, short tap for volume down, long press for next track
153 case VOLD:
154 if (record->event.pressed) {
155 key_timer = timer_read();
156 } else {
157 if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
158 return MACRO(T(MNXT), END);
159 } else {
160 return MACRO(T(VOLD), END);
161 }
162 }
163 break;
164
165 //switch multiplexing for escape, short tap for escape, long press for context menu
166 case ESCM:
167 if (record->event.pressed) {
168 key_timer = timer_read();
169 } else {
170 if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
171 return MACRO(T(APP), END);
172 } else {
173 return MACRO(T(ESC), END);
174 }
175 }
176 break;
177 }
178 return MACRO_NONE;
179};
180
181static bool singular_key = false;
182
183bool process_record_user(uint16_t keycode, keyrecord_t *record) {
184 uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode);
185 if (!process_record_dynamic_macro(macro_kc, record)) {
186 return false;
187 }
188 uint8_t layer;
189 layer = biton32(layer_state); // get the current layer
190
191 //custom layer handling for tri_layer,
192 switch (keycode) {
193 case MACSLEEP:
194 if (record->event.pressed) {
195 // ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
196 register_code(KC_RSFT);
197 register_code(KC_RCTL);
198 register_code(KC_POWER);
199 unregister_code(KC_POWER);
200 unregister_code(KC_RCTL);
201 unregister_code(KC_RSFT);
202 }
203 return false;
204 break;
205 case FNKEY:
206 if (record->event.pressed) {
207 key_timer = timer_read();
208 singular_key = true;
209 // layer_on(_FUNCTION);
210 layer_on(function_layer);
211 } else {
212 if (timer_elapsed(key_timer) < LAYER_TOGGLE_DELAY || !singular_key) {
213 layer_off(function_layer);
214 }
215 }
216 update_tri_layer(function_layer, _SHIFTED, _FUNCSHIFT);
217 return false;
218 break;
219 //SHIFT is handled as LSHIFT in the general case
220 case SHIFT:
221 if (record->event.pressed) {
222 key_timer = timer_read();
223 singular_key = true;
224 layer_on(_SHIFTED);
225 register_code(KC_LSFT);
226 } else {
227 if (timer_elapsed(key_timer) < LAYER_TOGGLE_DELAY || !singular_key) {
228 layer_off(_SHIFTED);
229 unregister_code(KC_LSFT);
230 }
231 }
232 update_tri_layer(function_layer, _SHIFTED, _FUNCSHIFT);
233 return false;
234 break;
235 case FNPC:
236 if (record->event.pressed) {
237 persistent_function_layer_set(_FUNCTIONPC);
238 #ifdef AUDIO_ENABLE
239 PLAY_NOTE_ARRAY(tone_fnpc, false, 0);
240 #endif
241 }
242 return false;
243 break;
244 case FNMAC:
245 if (record->event.pressed) {
246 persistent_function_layer_set(_FUNCTIONMAC);
247 #ifdef AUDIO_ENABLE
248 PLAY_NOTE_ARRAY(tone_fnmac, false, 0);
249 #endif
250 }
251 return false;
252 break;
253 //If any other key was pressed during the layer mod hold period,
254 //then the layer mod was used momentarily, and should block latching
255 default:
256 singular_key = false;
257 break;
258 }
259
260 //FUNCSHIFT has been shifted by the SHIFT handling, some keys need to be excluded
261 if (layer == _FUNCSHIFT) {
262 //F1-F12 should be sent as unshifted keycodes,
263 //and ] needs to be unshifted or it is sent as }
264 if ( (keycode >= KC_F1 && keycode <= KC_F12)
265 || keycode == KC_RBRC ) {
266 if (record->event.pressed) {
267 unregister_mods(MOD_LSFT);
268 } else {
269 register_mods(MOD_LSFT);
270 }
271 }
272 }
273
274 return true;
275};
276
277#ifdef AUDIO_ENABLE
278
279void startup_user()
280{
281 _delay_ms(20); // gets rid of tick
282 PLAY_NOTE_ARRAY(tone_startup, false, 0);
283}
284
285void shutdown_user()
286{
287 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
288 _delay_ms(150);
289 stop_all_notes();
290}
291
292void music_on_user(void)
293{
294 music_scale_user();
295}
296
297void music_scale_user(void)
298{
299 PLAY_NOTE_ARRAY(music_scale, false, 0);
300}
301
302#endif
303
304void matrix_scan_user(void) {
305 uint8_t layer = biton32(layer_state);
306
307 switch (layer) {
308 case _QWERTY:
309 set_led_off;
310 break;
311 case _FUNCTIONMAC:
312 set_led_blue;
313 break;
314 case _FUNCTIONPC:
315 set_led_cyan;
316 break;
317 case _SHIFTED:
318 set_led_red;
319 break;
320 case _FUNCSHIFT:
321 set_led_green;
322 break;
323 case _ADJUST:
324 set_led_white;
325 break;
326 default:
327 break;
328 }
329};
diff --git a/keyboards/planck/keymaps/mjt/Makefile b/keyboards/planck/keymaps/mjt/Makefile
new file mode 100644
index 000000000..457a3d01d
--- /dev/null
+++ b/keyboards/planck/keymaps/mjt/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif
diff --git a/keyboards/planck/keymaps/mjt/config.h b/keyboards/planck/keymaps/mjt/config.h
new file mode 100644
index 000000000..4072c5d7f
--- /dev/null
+++ b/keyboards/planck/keymaps/mjt/config.h
@@ -0,0 +1,33 @@
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// fix iPhone power adapter issue
30
31#define USB_MAX_POWER_CONSUMPTION 50
32
33#endif
diff --git a/keyboards/planck/keymaps/mjt/keymap.c b/keyboards/planck/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..599dedf98
--- /dev/null
+++ b/keyboards/planck/keymaps/mjt/keymap.c
@@ -0,0 +1,283 @@
1// This is MJT's bastardization of the planck and minivan defaults
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
10extern 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
17enum planck_layers {
18 _QWERTY,
19 _LOWER,
20 _RAISE,
21 _PLOVER,
22 _ADJUST,
23 _DYN
24};
25
26enum planck_keycodes {
27 QWERTY = SAFE_RANGE,
28 PLOVER,
29 LOWER,
30 RAISE,
31 BACKLIT,
32 EXT_PLV,
33 MACSLEEP,
34 DYNAMIC_MACRO_RANGE,
35};
36
37#include "dynamic_macro.h"
38
39// Fillers to make layering more clear
40#define _______ KC_TRNS
41#define XXXXXXX KC_NO
42
43const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
44
45/* Qwerty
46 * ,-----------------------------------------------------------------------------------.
47 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
48 * |------+------+------+------+------+-------------+------+------+------+------+------|
49 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
50 * |------+------+------+------+------+------|------+------+------+------+------+------|
51 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
52 * |------+------+------+------+------+------+------+------+------+------+------+------|
53 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
54 * `-----------------------------------------------------------------------------------'
55 */
56[_QWERTY] = {
57 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
58 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
59 {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) },
60 {MO(_DYN), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
61},
62
63/* Lower
64 * ,-----------------------------------------------------------------------------------.
65 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
66 * |------+------+------+------+------+-------------+------+------+------+------+------|
67 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
68 * |------+------+------+------+------+------|------+------+------+------+------+------|
69 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
70 * |------+------+------+------+------+------+------+------+------+------+------+------|
71 * | | | | | | | | Next | Vol- | Vol+ | Play |
72 * `-----------------------------------------------------------------------------------'
73 */
74[_LOWER] = {
75 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______},
76 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
77 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
78 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
79},
80
81/* Raise
82 * ,-----------------------------------------------------------------------------------.
83 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
84 * |------+------+------+------+------+-------------+------+------+------+------+------|
85 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
86 * |------+------+------+------+------+------|------+------+------+------+------+------|
87 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Dn |Pg Up | |
88 * |------+------+------+------+------+------+------+------+------+------+------+------|
89 * | | | | | | | | Home |Pg Dn |Pg Up | End |
90 * `-----------------------------------------------------------------------------------'
91 */
92[_RAISE] = {
93 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
94 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
95 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______},
96 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
97},
98
99/* Plover layer (http://opensteno.org)
100 * ,-----------------------------------------------------------------------------------.
101 * | # | # | # | # | # | # | # | # | # | # | # | # |
102 * |------+------+------+------+------+-------------+------+------+------+------+------|
103 * | | S | T | P | H | * | * | F | P | L | T | D |
104 * |------+------+------+------+------+------|------+------+------+------+------+------|
105 * | | S | K | W | R | * | * | R | B | G | S | Z |
106 * |------+------+------+------+------+------+------+------+------+------+------+------|
107 * | Exit | | | A | O | | E | U | | | |
108 * `-----------------------------------------------------------------------------------'
109 */
110
111[_PLOVER] = {
112 {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
113 {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
114 {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
115 {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
116},
117
118/* Adjust (Lower + Raise)
119 * ,-----------------------------------------------------------------------------------.
120 * | | Reset| | | | | | | |Pause |PR SC | Del |
121 * |------+------+------+------+------+-------------+------+------+------+------+------|
122 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| |Sleep |Plover| |
123 * |------+------+------+------+------+------|------+------+------+------+------+------|
124 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
125 * |------+------+------+------+------+------+------+------+------+------+------+------|
126 * |TogLED| | | | | | | | | | |
127 * `-----------------------------------------------------------------------------------'
128 */
129[_ADJUST] = {
130 {_______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL },
131 {_______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
132 {_______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
133 {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
134},
135[_DYN] = {
136 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ },
137 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
138 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
139 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______}
140}
141
142};
143
144#ifdef AUDIO_ENABLE
145
146float tone_startup[][2] = SONG(STARTUP_SOUND);
147float tone_qwerty[][2] = SONG(QWERTY_SOUND);
148float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
149float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
150float tone_plover[][2] = SONG(PLOVER_SOUND);
151float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
152float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
153
154float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
155#endif
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 uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
164 if (!process_record_dynamic_macro(macro_kc, record)) {
165 return false;
166 }
167 switch (keycode) {
168 case QWERTY:
169 if (record->event.pressed) {
170 #ifdef AUDIO_ENABLE
171 PLAY_SONG(tone_qwerty);
172 #endif
173 persistant_default_layer_set(1UL<<_QWERTY);
174 }
175 return false;
176 break;
177 case LOWER:
178 if (record->event.pressed) {
179 layer_on(_LOWER);
180 update_tri_layer(_LOWER, _RAISE, _ADJUST);
181 } else {
182 layer_off(_LOWER);
183 update_tri_layer(_LOWER, _RAISE, _ADJUST);
184 }
185 return false;
186 break;
187 case RAISE:
188 if (record->event.pressed) {
189 layer_on(_RAISE);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 } else {
192 layer_off(_RAISE);
193 update_tri_layer(_LOWER, _RAISE, _ADJUST);
194 }
195 return false;
196 break;
197 case BACKLIT:
198 if (record->event.pressed) {
199 register_code(KC_RSFT);
200 #ifdef BACKLIGHT_ENABLE
201 backlight_step();
202 #endif
203 } else {
204 unregister_code(KC_RSFT);
205 }
206 return false;
207 break;
208 case PLOVER:
209 if (record->event.pressed) {
210 #ifdef AUDIO_ENABLE
211 stop_all_notes();
212 PLAY_SONG(tone_plover);
213 #endif
214 layer_off(_RAISE);
215 layer_off(_LOWER);
216 layer_off(_ADJUST);
217 layer_on(_PLOVER);
218 if (!eeconfig_is_enabled()) {
219 eeconfig_init();
220 }
221 keymap_config.raw = eeconfig_read_keymap();
222 keymap_config.nkro = 1;
223 eeconfig_update_keymap(keymap_config.raw);
224 }
225 return false;
226 break;
227 case EXT_PLV:
228 if (record->event.pressed) {
229 #ifdef AUDIO_ENABLE
230 PLAY_SONG(tone_plover_gb);
231 #endif
232 layer_off(_PLOVER);
233 }
234 return false;
235 break;
236 case MACSLEEP:
237 if (record->event.pressed) {
238 // ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
239 register_code(KC_RSFT);
240 register_code(KC_RCTL);
241 register_code(KC_POWER);
242 unregister_code(KC_POWER);
243 unregister_code(KC_RCTL);
244 unregister_code(KC_RSFT);
245 }
246 return false;
247 break;
248 }
249 return true;
250}
251
252void matrix_init_user(void) {
253 #ifdef AUDIO_ENABLE
254 startup_user();
255 #endif
256}
257
258#ifdef AUDIO_ENABLE
259
260void startup_user()
261{
262 _delay_ms(20); // gets rid of tick
263 PLAY_SONG(tone_startup);
264}
265
266void shutdown_user()
267{
268 PLAY_SONG(tone_goodbye);
269 _delay_ms(150);
270 stop_all_notes();
271}
272
273void music_on_user(void)
274{
275 music_scale_user();
276}
277
278void music_scale_user(void)
279{
280 PLAY_SONG(music_scale);
281}
282
283#endif
diff --git a/keyboards/planck/keymaps/mjt/readme.md b/keyboards/planck/keymaps/mjt/readme.md
new file mode 100644
index 000000000..ce4d90f21
--- /dev/null
+++ b/keyboards/planck/keymaps/mjt/readme.md
@@ -0,0 +1,22 @@
1# Mike's Plancklike Planck
2
3- Music/Audio
4- Dynamic Macros
5- Media Keys
6- Works with iPhone Camera Adapter
7
8## Layers
9
10Qwerty for letters and mods.
11
12Raise and Lower are mostly default with a few tweaks.
13
14Adjust layer is tough to get to so it is only for keyboard configuration stuff.
15
16## Dynamic Macros
17
18Hold TAB key, then press ";" to record macro 1 and "'" to record macro 2.
19
20When you are done recording, press TAB again.
21
22For playback of macros, TAB+"," plays macro 1 and TAB+","plays macro 2.
diff --git a/keyboards/planck/keymaps/mjtnumsym/Makefile b/keyboards/planck/keymaps/mjtnumsym/Makefile
new file mode 100644
index 000000000..457a3d01d
--- /dev/null
+++ b/keyboards/planck/keymaps/mjtnumsym/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif
diff --git a/keyboards/planck/keymaps/mjtnumsym/config.h b/keyboards/planck/keymaps/mjtnumsym/config.h
new file mode 100644
index 000000000..4072c5d7f
--- /dev/null
+++ b/keyboards/planck/keymaps/mjtnumsym/config.h
@@ -0,0 +1,33 @@
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// fix iPhone power adapter issue
30
31#define USB_MAX_POWER_CONSUMPTION 50
32
33#endif
diff --git a/keyboards/planck/keymaps/mjtnumsym/keymap.c b/keyboards/planck/keymaps/mjtnumsym/keymap.c
new file mode 100644
index 000000000..0be016fb7
--- /dev/null
+++ b/keyboards/planck/keymaps/mjtnumsym/keymap.c
@@ -0,0 +1,282 @@
1// This is MJT's bastardization of the planck and minivan defaults
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
10extern 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
17enum planck_layers {
18 _QWERTY,
19 _FKEYS,
20 _NUMSYM,
21 _PLOVER,
22 _ADJUST
23};
24
25enum planck_keycodes {
26 QWERTY = SAFE_RANGE,
27 PLOVER,
28 FKEYS,
29 NUMSYM,
30 BACKLIT,
31 EXT_PLV,
32 MACSLEEP,
33 DYNAMIC_MACRO_RANGE,
34};
35
36#include "dynamic_macro.h"
37
38// Fillers to make layering more clear
39#define _______ KC_TRNS
40#define XXXXXXX KC_NO
41
42const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
43
44/* Qwerty
45 * ,-----------------------------------------------------------------------------------.
46 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
47 * |------+------+------+------+------+-------------+------+------+------+------+------|
48 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
49 * |------+------+------+------+------+------|------+------+------+------+------+------|
50 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
51 * |------+------+------+------+------+------+------+------+------+------+------+------|
52 * | Brite| Ctrl | Alt | GUI |FKEYS | Space |NUMSYM | Left | Down | Up |Right |
53 * `-----------------------------------------------------------------------------------'
54 */
55[_QWERTY] = {
56 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
57 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
58 {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) },
59 {KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, FKEYS, KC_SPC, KC_SPC, NUMSYM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
60},
61
62/* FKEYS
63 * ,-----------------------------------------------------------------------------------.
64 * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Bksp |
65 * |------+------+------+------+------+-------------+------+------+------+------+------|
66 * | Del | F11 | F12 | F13 | F14 | F15 | | |Sleep | | Rec1 | Rec2 |
67 * |------+------+------+------+------+------|------+------+------+------+------+------|
68 * | | | | | | | | | Mac1 | Mac2 | | Stop |
69 * |------+------+------+------+------+------+------+------+------+------+------+------|
70 * | | | | | | | | Next | Vol- | Vol+ | Play |
71 * `-----------------------------------------------------------------------------------'
72 */
73[_FKEYS] = {
74 {KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______},
75 {KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F6, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2},
76 {_______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, DYN_REC_STOP},
77 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
78},
79
80/* NUMSYM
81 * ,-----------------------------------------------------------------------------------.
82 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
83 * |------+------+------+------+------+-------------+------+------+------+------+------|
84 * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | ' |
85 * |------+------+------+------+------+------|------+------+------+------+------+------|
86 * | | _ | + | { | } | | | - | = | [ | ] | \ | |
87 * |------+------+------+------+------+------+------+------+------+------+------+------|
88 * | | | | | | | | Home |Pg Dn |Pg Up | End |
89 * `-----------------------------------------------------------------------------------'
90 */
91[_NUMSYM] = {
92 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
93 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______},
94 {_______,KC_UNDS, KC_PLUS,KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______},
95 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
96},
97
98/* Plover layer (http://opensteno.org)
99 * ,-----------------------------------------------------------------------------------.
100 * | # | # | # | # | # | # | # | # | # | # | # | # |
101 * |------+------+------+------+------+-------------+------+------+------+------+------|
102 * | | S | T | P | H | * | * | F | P | L | T | D |
103 * |------+------+------+------+------+------|------+------+------+------+------+------|
104 * | | S | K | W | R | * | * | R | B | G | S | Z |
105 * |------+------+------+------+------+------+------+------+------+------+------+------|
106 * | Exit | | | A | O | | E | U | | | |
107 * `-----------------------------------------------------------------------------------'
108 */
109
110[_PLOVER] = {
111 {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
112 {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
113 {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
114 {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
115},
116
117/* Adjust (FKEYS + NUMSYM)
118 * ,-----------------------------------------------------------------------------------.
119 * | | Reset| | | | | | | |Pause |PR SC | Del |
120 * |------+------+------+------+------+-------------+------+------+------+------+------|
121 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| |Sleep |Plover| |
122 * |------+------+------+------+------+------|------+------+------+------+------+------|
123 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
124 * |------+------+------+------+------+------+------+------+------+------+------+------|
125 * |TogLED| | | | | | | | | | |
126 * `-----------------------------------------------------------------------------------'
127 */
128[_ADJUST] = {
129 {_______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL },
130 {_______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
131 {_______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
132 {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
133} /*,
134[_DYN] = {
135 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ },
136 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
137 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
138 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______}
139}*/
140
141};
142
143#ifdef AUDIO_ENABLE
144
145float tone_startup[][2] = SONG(STARTUP_SOUND);
146float tone_qwerty[][2] = SONG(QWERTY_SOUND);
147float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
148float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
149float tone_plover[][2] = SONG(PLOVER_SOUND);
150float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
151float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
152
153float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
154#endif
155
156void persistant_default_layer_set(uint16_t default_layer) {
157 eeconfig_update_default_layer(default_layer);
158 default_layer_set(default_layer);
159}
160
161bool process_record_user(uint16_t keycode, keyrecord_t *record) {
162 uint16_t macro_kc = (keycode == FKEYS ? DYN_REC_STOP : keycode);
163 if (!process_record_dynamic_macro(macro_kc, record)) {
164 return false;
165 }
166 switch (keycode) {
167 case QWERTY:
168 if (record->event.pressed) {
169 #ifdef AUDIO_ENABLE
170 PLAY_SONG(tone_qwerty);
171 #endif
172 persistant_default_layer_set(1UL<<_QWERTY);
173 }
174 return false;
175 break;
176 case FKEYS:
177 if (record->event.pressed) {
178 layer_on(_FKEYS);
179 update_tri_layer(_FKEYS, _NUMSYM, _ADJUST);
180 } else {
181 layer_off(_FKEYS);
182 update_tri_layer(_FKEYS, _NUMSYM, _ADJUST);
183 }
184 return false;
185 break;
186 case NUMSYM:
187 if (record->event.pressed) {
188 layer_on(_NUMSYM);
189 update_tri_layer(_FKEYS, _NUMSYM, _ADJUST);
190 } else {
191 layer_off(_NUMSYM);
192 update_tri_layer(_FKEYS, _NUMSYM, _ADJUST);
193 }
194 return false;
195 break;
196 case BACKLIT:
197 if (record->event.pressed) {
198 register_code(KC_RSFT);
199 #ifdef BACKLIGHT_ENABLE
200 backlight_step();
201 #endif
202 } else {
203 unregister_code(KC_RSFT);
204 }
205 return false;
206 break;
207 case PLOVER:
208 if (record->event.pressed) {
209 #ifdef AUDIO_ENABLE
210 stop_all_notes();
211 PLAY_SONG(tone_plover);
212 #endif
213 layer_off(_NUMSYM);
214 layer_off(_FKEYS);
215 layer_off(_ADJUST);
216 layer_on(_PLOVER);
217 if (!eeconfig_is_enabled()) {
218 eeconfig_init();
219 }
220 keymap_config.raw = eeconfig_read_keymap();
221 keymap_config.nkro = 1;
222 eeconfig_update_keymap(keymap_config.raw);
223 }
224 return false;
225 break;
226 case EXT_PLV:
227 if (record->event.pressed) {
228 #ifdef AUDIO_ENABLE
229 PLAY_SONG(tone_plover_gb);
230 #endif
231 layer_off(_PLOVER);
232 }
233 return false;
234 break;
235 case MACSLEEP:
236 if (record->event.pressed) {
237 // ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
238 register_code(KC_RSFT);
239 register_code(KC_RCTL);
240 register_code(KC_POWER);
241 unregister_code(KC_POWER);
242 unregister_code(KC_RCTL);
243 unregister_code(KC_RSFT);
244 }
245 return false;
246 break;
247 }
248 return true;
249}
250
251void matrix_init_user(void) {
252 #ifdef AUDIO_ENABLE
253 startup_user();
254 #endif
255}
256
257#ifdef AUDIO_ENABLE
258
259void startup_user()
260{
261 _delay_ms(20); // gets rid of tick
262 PLAY_SONG(tone_startup);
263}
264
265void shutdown_user()
266{
267 PLAY_SONG(tone_goodbye);
268 _delay_ms(150);
269 stop_all_notes();
270}
271
272void music_on_user(void)
273{
274 music_scale_user();
275}
276
277void music_scale_user(void)
278{
279 PLAY_SONG(music_scale);
280}
281
282#endif
diff --git a/keyboards/planck/keymaps/mjtnumsym/readme.md b/keyboards/planck/keymaps/mjtnumsym/readme.md
new file mode 100644
index 000000000..ba6d05144
--- /dev/null
+++ b/keyboards/planck/keymaps/mjtnumsym/readme.md
@@ -0,0 +1,26 @@
1# Mike's Rethought Planck
2
3- Music/Audio
4- Dynamic Macros
5- Media Keys
6- Works with iPhone Camera Adapter
7
8## Layers
9
10Qwerty for letters and mods.
11
12Numsym for all numbers and symbols used in typing. Follows a similar approach to
13planck but puts both on the same layer eschewing the F-keys.
14
15Fkeys layer is for the seldom used stuff like F-keys and some additional features
16such as dynamic macros, media keys, and a sleep shortcut for OS X.
17
18Adjust layer is mainly for keyboard configuration stuff.
19
20## Dynamic Macros
21
22Hold TAB key, then press ";" to record macro 1 and "'" to record macro 2.
23
24When you are done recording, press TAB again.
25
26For playback of macros, TAB+"," plays macro 1 and TAB+","plays macro 2.
diff --git a/keyboards/roadkit/keymaps/flipphone/Makefile b/keyboards/roadkit/keymaps/flipphone/Makefile
new file mode 100644
index 000000000..f4671a9d1
--- /dev/null
+++ b/keyboards/roadkit/keymaps/flipphone/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif \ No newline at end of file
diff --git a/keyboards/roadkit/keymaps/flipphone/config.h b/keyboards/roadkit/keymaps/flipphone/config.h
new file mode 100644
index 000000000..df06a2620
--- /dev/null
+++ b/keyboards/roadkit/keymaps/flipphone/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7
8#endif \ No newline at end of file
diff --git a/keyboards/roadkit/keymaps/flipphone/keymap.c b/keyboards/roadkit/keymaps/flipphone/keymap.c
new file mode 100644
index 000000000..b48d72e9e
--- /dev/null
+++ b/keyboards/roadkit/keymaps/flipphone/keymap.c
@@ -0,0 +1,216 @@
1#include "roadkit.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7#ifdef BACKLIGHT_ENABLE
8 #include "backlight.h"
9#endif
10
11#ifdef AUDIO_ENABLE
12 #include "audio.h"
13#endif
14
15void backlight_toggle(void){
16};
17
18enum roadkit_layers {
19 _NUMPAD,
20 _FPH,
21 _FPHNOISY,
22 _ADJUST,
23 _DYN
24};
25
26enum roadkit_keycodes {
27 NUMPAD = SAFE_RANGE,
28 FPH_1,
29 FPH_2,
30 FPH_3,
31 FPH_4,
32 FPH_5,
33 FPH_6,
34 FPH_7,
35 FPH_8,
36 FPH_9,
37 FN_0,
38 BACKLIT,
39 MACSLEEP,
40 DYNAMIC_MACRO_RANGE,
41};
42
43#include "dynamic_macro.h"
44
45// Fillers to make keymaps cleaner looking
46#define _______ KC_TRNS
47#define XXXXXXX KC_NO
48
49const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
50 [_NUMPAD] = /* Numpad */
51 KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
52 KC_KP_4, KC_KP_5, KC_KP_6, \
53 KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
54 LT(_ADJUST, KC_KP_0), KC_KP_DOT),
55 [_FPH] = /* Quiet T9 */
56 KEYMAP(FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
57 FPH_4, FPH_5, FPH_6, \
58 FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
59 LT(_ADJUST, KC_SPACE), KC_KP_DOT),
60 [_FPHNOISY] = /* Noisy T9 */
61 KEYMAP(FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
62 FPH_4, FPH_5, FPH_6, \
63 FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
64 LT(_ADJUST, KC_SPACE), KC_KP_DOT),
65 [_ADJUST] = /* Adjustments */
66 KEYMAP(KC_NUMLOCK, TG(_FPHNOISY), TG(_FPH), TG(_NUMPAD), \
67 KC_BSPC, BACKLIT, KC_DEL, \
68 MACSLEEP, _______, _______, _______, \
69 _______, MO(_DYN)),
70 [_DYN] = /* DYNAMIC MACRO */
71 KEYMAP(DYN_REC_START1, DYN_REC_START2, _______, DYN_REC_STOP, \
72 _______, _______, _______, \
73 DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
74 _______, _______),
75};
76
77const uint16_t PROGMEM fn_actions[] = {
78
79};
80
81void persistant_default_layer_set(uint16_t default_layer) {
82 eeconfig_update_default_layer(default_layer);
83 default_layer_set(default_layer);
84}
85
86uint16_t fph_tap_qty = false;
87uint16_t fph_keycode = 0; // stores which spacebar was used, either raise or lower...
88
89uint16_t get_render_keycode(uint16_t keycode, uint16_t tap_qty){ // maybe replace shift with "mods"
90 tap_qty--; // reduce by one to match array indexes.
91 switch(keycode){
92 case FPH_2:
93 {uint16_t kc[] = {KC_A, KC_B, KC_C};
94 if(tap_qty % 6 > 2)
95 return LSFT(kc[tap_qty % 3]);
96 return kc[tap_qty % 3];}
97 break;
98 case FPH_3:
99 {uint16_t kc[] = {KC_D, KC_E, KC_F};
100 if(tap_qty % 6 > 2)
101 return LSFT(kc[tap_qty % 3]);
102 return kc[tap_qty % 3];}
103 break;
104 case FPH_4:
105 {uint16_t kc[] = {KC_G, KC_H, KC_I};
106 if(tap_qty % 6 > 2)
107 return LSFT(kc[tap_qty % 3]);
108 return kc[tap_qty % 3];}
109 break;
110 case FPH_5:
111 {uint16_t kc[] = {KC_J, KC_K, KC_L};
112 if(tap_qty % 6 > 2)
113 return LSFT(kc[tap_qty % 3]);
114 return kc[tap_qty % 3];}
115 break;
116 case FPH_6:
117 {uint16_t kc[] = {KC_M, KC_N, KC_O};
118 if(tap_qty % 6 > 2)
119 return LSFT(kc[tap_qty % 3]);
120 return kc[tap_qty % 3];}
121 break;
122 case FPH_7:
123 {uint16_t kc[] = {KC_P, KC_Q, KC_R, KC_S};
124 if(tap_qty % 8 > 2)
125 return LSFT(kc[tap_qty % 4]);
126 return kc[tap_qty % 4];}
127 break;
128 case FPH_8:
129 {uint16_t kc[] = {KC_T, KC_U, KC_V};
130 if(tap_qty % 8 > 2)
131 return LSFT(kc[tap_qty % 4]);
132 return kc[tap_qty % 4];}
133 break;
134 case FPH_9:
135 {uint16_t kc[] = {KC_W, KC_X, KC_Y, KC_Z};
136 if(tap_qty % 8 > 2)
137 return LSFT(kc[tap_qty % 4]);
138 return kc[tap_qty % 4];}
139 break;
140 case FPH_1:
141 {uint16_t kc[] = {KC_COMM, LSFT(KC_SLSH), KC_EXLM, KC_AT, KC_MINS, KC_UNDS, KC_PLUS, \
142 KC_SCLN, LSFT(KC_SCLN), KC_QUOT, LSFT(KC_QUOT), KC_TILD, \
143 KC_PIPE, KC_BSLS, KC_HASH, LSFT(KC_4), KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, \
144 KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, LSFT(KC_COMM), LSFT(KC_DOT)};
145 return kc[tap_qty % 26];}
146 }
147 return KC_NO;
148}
149
150bool process_record_user(uint16_t keycode, keyrecord_t *record) {
151 if (!process_record_dynamic_macro(keycode, record)) {
152 return false;
153 }
154 uint8_t layer;
155 layer = biton32(layer_state);
156
157 switch (keycode) {
158 case FPH_1 ... FPH_9:
159 if(layer == _FPHNOISY){
160 if (record->event.pressed) {
161 if(fph_keycode != keycode) { // key change
162 fph_tap_qty = 0;
163 fph_keycode = keycode;
164 } else { // same key tapped again so erase and increment.
165 register_code(KC_BSPC);
166 unregister_code(KC_BSPC);
167 fph_tap_qty++;
168 }
169 uint16_t render_keycode = get_render_keycode(keycode, fph_tap_qty);
170 // find mods? Apply mods..
171 register_code(render_keycode);
172 unregister_code(render_keycode);
173 } else {
174 // do we need to do anything on key-release?
175 }
176 } else { // not noisy, be demure .
177 if (record->event.pressed) {
178 if(fph_keycode != keycode) { // key change, kill everything.
179 uint16_t render_keycode = get_render_keycode(fph_keycode, fph_tap_qty);
180 // find mods? Apply mods..
181 register_code(render_keycode);
182 unregister_code(render_keycode);
183 fph_keycode = keycode;
184 fph_tap_qty = 0;
185 } else { // same key tapped again so increment counter silently
186 fph_tap_qty++;
187 }
188 } else {
189 // do we need to do anything on key-release?
190 // maybe start a timer on this one?
191 }
192 }
193 return false;
194 break;
195 case BACKLIT:
196 if (record->event.pressed) {
197 #ifdef BACKLIGHT_ENABLE
198 backlight_step();
199 #endif
200 }
201 return false;
202 break;
203 case MACSLEEP:
204 if (record->event.pressed) {
205 register_code(KC_RSFT);
206 register_code(KC_RCTL);
207 register_code(KC_POWER);
208 unregister_code(KC_POWER);
209 unregister_code(KC_RCTL);
210 unregister_code(KC_RSFT);
211 }
212 return false;
213 break;
214 }
215 return true;
216}
diff --git a/keyboards/roadkit/keymaps/flipphone/readme.md b/keyboards/roadkit/keymaps/flipphone/readme.md
new file mode 100644
index 000000000..ad630be19
--- /dev/null
+++ b/keyboards/roadkit/keymaps/flipphone/readme.md
@@ -0,0 +1,26 @@
1# Flip Phone layout for Roadkit
2
3BEWARE, THIS DOES NOT WORK YET.
4
5Uses the numpad with classic cellular phone style letters assigned to the numbers.
6
7# LAYERS
8
9* Numpad - The layer that matches the caps mostly
10* FPH - Base layer for text
11* FPHNOISY - Text layer that outputs every character and then backspaces as they're replaced
12* DYN - dynamic macro layer for recording and playing macros
13
14## FPH
15
16Poke the "2" key twice and it makes "B".
17
18## FPHNOISY
19
20Poke the "2" key twice and it makes "A"+backspace+"B" so you can see it cycle through.
21
22## MACROS
23
24May be able to record macros with the T9 layer because the "KC_*"s are only sent
25at the end. Trying to do a macro with T9NOISY would probably fill up the buffer
26in just a few characters.
diff --git a/keyboards/roadkit/keymaps/mjt/Makefile b/keyboards/roadkit/keymaps/mjt/Makefile
new file mode 100644
index 000000000..f4671a9d1
--- /dev/null
+++ b/keyboards/roadkit/keymaps/mjt/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif \ No newline at end of file
diff --git a/keyboards/roadkit/keymaps/mjt/config.h b/keyboards/roadkit/keymaps/mjt/config.h
new file mode 100644
index 000000000..df06a2620
--- /dev/null
+++ b/keyboards/roadkit/keymaps/mjt/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7
8#endif \ No newline at end of file
diff --git a/keyboards/roadkit/keymaps/mjt/keymap.c b/keyboards/roadkit/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..d3c82ac84
--- /dev/null
+++ b/keyboards/roadkit/keymaps/mjt/keymap.c
@@ -0,0 +1,236 @@
1#include "roadkit.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7#ifdef BACKLIGHT_ENABLE
8 #include "backlight.h"
9#endif
10
11#ifdef AUDIO_ENABLE
12 #include "audio.h"
13#endif
14
15void backlight_toggle(void){
16};
17
18enum roadkit_layers {
19 _NUMPAD,
20 _NAVIGATION,
21 _EXCEL,
22 _ADJUST,
23 _DYN
24};
25
26enum minivan_keycodes {
27 NUMPAD = SAFE_RANGE,
28 NAVIGATION,
29 EXCEL,
30 NUMPAD_LOCK,
31 NAVIGATION_LOCK,
32 EXCEL_LOCK,
33 PARENS,
34 BRACKETS,
35 BRACES,
36 BACKLIT,
37 MACSLEEP,
38 DYNAMIC_MACRO_RANGE,
39};
40
41#include "dynamic_macro.h"
42
43// Fillers to make keymaps cleaner looking
44#define _______ KC_TRNS
45#define XXXXXXX KC_NO
46
47
48const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
49 [_NUMPAD] = /* Numpad */
50 KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
51 KC_KP_4, KC_KP_5, KC_KP_6, \
52 KC_KP_1, KC_KP_2, KC_KP_3, NAVIGATION, \
53 EXCEL, KC_KP_DOT),
54 [_EXCEL] = /* Excel related */
55 KEYMAP(KC_KP_SLASH, KC_KP_ASTERISK, KC_MINS, KC_TAB, \
56 KC_QUOT, KC_KP_EQUAL, PARENS , \
57 KC_DQT, BRACKETS, BRACES, _______, \
58 _______, MO(_DYN)),
59 [_NAVIGATION] = /* Navigation */
60 KEYMAP(KC_HOME, _______, KC_PGUP, KC_TAB, \
61 KC_END, KC_UP, KC_PGDN, \
62 KC_LEFT, KC_DOWN, KC_RIGHT, _______, \
63 _______, MO(_DYN)),
64 [_ADJUST] = /* Adjustments */
65 KEYMAP(KC_NUMLOCK, MACSLEEP, BACKLIT, _______, \
66 KC_BSPC, _______, KC_DEL, \
67 EXCEL_LOCK, NUMPAD_LOCK, NAVIGATION_LOCK, _______, \
68 _______, _______),
69 [_DYN] = /* DYNAMIC MACRO */
70 KEYMAP(DYN_REC_START1, DYN_REC_START2, _______, _______, \
71 _______, _______, _______, \
72 DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
73 _______, _______),
74};
75
76const uint16_t PROGMEM fn_actions[] = {
77
78};
79
80#ifdef AUDIO_ENABLE
81
82float tone_startup[][2] = SONG(STARTUP_SOUND);
83float tone_numpad[][2] = SONG(QWERTY_SOUND);
84float tone_excel[][2] = SONG(DVORAK_SOUND);
85float tone_navigation[][2] = SONG(COLEMAK_SOUND);
86float tone_plover[][2] = SONG(PLOVER_SOUND);
87float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
88float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
89
90float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
91#endif
92
93void persistant_default_layer_set(uint16_t default_layer) {
94 eeconfig_update_default_layer(default_layer);
95 default_layer_set(default_layer);
96}
97
98bool fn_tap_used = false; // sets to false when space is pressed,
99 // sets to true when any other key is pressed,
100 //when space is lifted, if another key was prssed, don't send space.
101uint16_t fn_keycode = 0; // stores which spacebar was used, either raise or lower...
102
103bool process_record_user(uint16_t keycode, keyrecord_t *record) {
104 if (!process_record_dynamic_macro(keycode, record)) {
105 return false;
106 }
107
108 switch (keycode) {
109 case NAVIGATION: // This key is enter if tapped, navigation if held
110 if (record->event.pressed) {
111 fn_keycode = NAVIGATION; // these two lines figure out if the next action is
112 fn_tap_used = false;
113 layer_on(_NAVIGATION);
114 update_tri_layer(_EXCEL, _NAVIGATION, _ADJUST);
115 } else {
116 layer_off(_NAVIGATION);
117 update_tri_layer(_EXCEL, _NAVIGATION, _ADJUST);
118 if(!fn_tap_used && fn_keycode == NAVIGATION ){
119 register_code(KC_KP_ENTER);
120 unregister_code(KC_KP_ENTER);
121 fn_keycode = 0;
122 fn_tap_used = false;
123 }
124 }
125 return false;
126 break;
127 case EXCEL:
128 if (record->event.pressed) {
129 fn_keycode = EXCEL;
130 fn_tap_used = false;
131 layer_on(_EXCEL);
132 update_tri_layer(_EXCEL, _NAVIGATION, _ADJUST);
133 } else {
134 layer_off(_EXCEL);
135 update_tri_layer(_EXCEL, _NAVIGATION, _ADJUST);
136 if(!fn_tap_used && fn_keycode == EXCEL ){
137 register_code(KC_KP_0);
138 unregister_code(KC_KP_0);
139 fn_keycode = 0;
140 fn_tap_used = false;
141 }
142 }
143 return false;
144 break;
145 default:
146 fn_tap_used = true;
147 break; // don't return because this just handles the spacebars.
148 }
149 // this is the normal keycode processing switch from Planck default layout.
150 switch (keycode) {
151 case NUMPAD_LOCK:
152 if (record->event.pressed) {
153 #ifdef AUDIO_ENABLE
154 PLAY_NOTE_ARRAY(tone_numpad, false, 0);
155 #endif
156 persistant_default_layer_set(1UL<<_NUMPAD);
157 }
158 return false;
159 break;
160 case NAVIGATION_LOCK:
161 if (record->event.pressed) {
162 #ifdef AUDIO_ENABLE
163 PLAY_NOTE_ARRAY(tone_navigation, false, 0);
164 #endif
165 persistant_default_layer_set(1UL<<_NAVIGATION);
166 }
167 return false;
168 break;
169 case EXCEL_LOCK:
170 if (record->event.pressed) {
171 #ifdef AUDIO_ENABLE
172 PLAY_NOTE_ARRAY(tone_excel, false, 0);
173 #endif
174 persistant_default_layer_set(1UL<<_EXCEL);
175 }
176 return false;
177 break;
178 case PARENS:
179 if (record->event.pressed) {
180 register_code(KC_RSFT);
181 register_code(KC_9);
182 unregister_code(KC_9);
183 register_code(KC_0);
184 unregister_code(KC_0);
185 register_code(KC_RSFT);
186 register_code(KC_LEFT);
187 unregister_code(KC_LEFT);
188 }
189 return false;
190 break;
191 case BRACKETS:
192 if (record->event.pressed) {
193 register_code(KC_LBRC);
194 unregister_code(KC_LBRC);
195 register_code(KC_RBRC);
196 unregister_code(KC_RBRC);
197 register_code(KC_LEFT);
198 unregister_code(KC_LEFT);
199 }
200 return false;
201 break;
202 case BRACES:
203 if (record->event.pressed) {
204 register_code(KC_RSFT);
205 register_code(KC_LBRC);
206 unregister_code(KC_LBRC);
207 register_code(KC_RBRC);
208 unregister_code(KC_RBRC);
209 unregister_code(KC_RSFT);
210 register_code(KC_LEFT);
211 unregister_code(KC_LEFT);
212 }
213 return false;
214 break;
215 case BACKLIT:
216 if (record->event.pressed) {
217 #ifdef BACKLIGHT_ENABLE
218 backlight_step();
219 #endif
220 }
221 return false;
222 break;
223 case MACSLEEP:
224 if (record->event.pressed) {
225 register_code(KC_RSFT);
226 register_code(KC_RCTL);
227 register_code(KC_POWER);
228 unregister_code(KC_POWER);
229 unregister_code(KC_RCTL);
230 unregister_code(KC_RSFT);
231 }
232 return false;
233 break;
234 }
235 return true;
236}
diff --git a/keyboards/roadkit/keymaps/mjt/readme.md b/keyboards/roadkit/keymaps/mjt/readme.md
new file mode 100644
index 000000000..80c0e5240
--- /dev/null
+++ b/keyboards/roadkit/keymaps/mjt/readme.md
@@ -0,0 +1,22 @@
1# Mike's custom keymap for roadkit
2
3Based on the 13 key layout.
4
5## LAYERS
6
7* Numpad - The layer that matches the caps
8* Excel - / * - = and () [] {} macros
9* Navigation - arrow keys and home/end
10* ADJUST - just like planck adjust, lets you set default layer.
11* DYN - dynamic macro layer for recording and playing macros
12
13## MACROS
14
15Sadly, the dynamic macros are probably going worthless because they keys that
16they record have to be pressed on this keyboard. This keyboard doesn't have
17most letters...
18
19## LEADER KEYS
20
21This board would probably be better with the user of leader keys instead of
22complex layers with a raise/lower setup... Something to look into for later.
diff --git a/keyboards/tv44/keymaps/mjt/Makefile b/keyboards/tv44/keymaps/mjt/Makefile
new file mode 100644
index 000000000..41afd9a55
--- /dev/null
+++ b/keyboards/tv44/keymaps/mjt/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = yes # Console for debug(+400)
9COMMAND_ENABLE = no # Commands for debug and configuration
10NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/tv44/keymaps/mjt/config.h b/keyboards/tv44/keymaps/mjt/config.h
new file mode 100644
index 000000000..e89a3ea12
--- /dev/null
+++ b/keyboards/tv44/keymaps/mjt/config.h
@@ -0,0 +1,14 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7#ifdef BACKLIGHT_ENABLE
8 #define BACKLIGHT_PIN B2
9 #define BACKLIGHT_LEVELS 7
10#endif
11
12#define USB_MAX_POWER_CONSUMPTION 50
13
14#endif
diff --git a/keyboards/tv44/keymaps/mjt/keymap.c b/keyboards/tv44/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..25f8cfc52
--- /dev/null
+++ b/keyboards/tv44/keymaps/mjt/keymap.c
@@ -0,0 +1,199 @@
1//Author: mike terhar
2
3#include "tv44.h"
4#include "action_layer.h"
5#include "eeconfig.h"
6#ifdef BACKLIGHT_ENABLE
7 #include "backlight.h"
8#endif
9
10enum minivan_layers {
11 _QWERTY,
12 _NUMSYM,
13 _FKEYS,
14 _FKEYGRV,
15 _PLOVER,
16 _ADJUST
17};
18
19enum planck_keycodes {
20 QWERTY = SAFE_RANGE,
21 DYNKEY,
22 DYNAMIC_MACRO_RANGE,
23};
24
25// Fillers to make layering more clear
26#define _______ KC_TRNS
27#define FKEYS F(_FKEYS)
28#define NUMSYM F(_NUMSYM)
29#define FKEYGRV F(_FKEYGRV)
30#define MACSLEEP M(5)
31#define PLOVER M(6)
32#define LAYERRESET M(7)
33#define BACKLIT M(8)
34#define ADJUST M(9)
35#define XXXXXXX KC_NO
36
37#include "dynamic_macro.h"
38
39const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
40[_QWERTY] = {
41 {FKEYS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
42 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT},
43 {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) },
44 {KC_LCTL,KC_LALT,KC_LGUI, KC_SPC,XXXXXXX,XXXXXXX,XXXXXXX,NUMSYM,KC_LEFT,KC_DOWN,KC_UP ,KC_RIGHT}
45},
46[_NUMSYM] = {
47 {FKEYGRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
48 {KC_DEL,KC_EXLM, KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN, ADJUST },
49 { _______, KC_UNDS,KC_PLUS, KC_LCBR,KC_RCBR,KC_PIPE , KC_MINS,KC_EQL,KC_LBRC, KC_RBRC, KC_BSLS, _______},
50 {_______,_______,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,_______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
51},
52[_FKEYS] ={
53 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______},
54 {KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2 },
55 {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,_______,DYN_REC_STOP},
56 {_______,_______,_______,LAYERRESET,XXXXXXX,XXXXXXX,XXXXXXX,LAYERRESET, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
57},
58[_PLOVER] = {
59 {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
60 {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
61 {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
62 {LAYERRESET, XXXXXXX, KC_C, KC_V, XXXXXXX , XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
63},
64[_ADJUST] = {
65 {_______ , RESET, _______, _______, _______, _______, _______, _______, KC_SLCK, KC_PAUS, KC_PSCR, KC_DEL },
66 {_______ , _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
67 {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
68 {BACKLIT, _______, _______, LAYERRESET, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______}
69}
70};
71
72#ifdef AUDIO_ENABLE
73
74float tone_startup[][2] = SONG(STARTUP_SOUND);
75float tone_qwerty[][2] = SONG(QWERTY_SOUND);
76float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
77float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
78float tone_plover[][2] = SONG(PLOVER_SOUND);
79float tone_adjust[][2] = SONG(PLOVER_GOODBYE_SOUND);
80float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
81
82float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
83#endif
84
85void persistant_default_layer_set(uint16_t default_layer) {
86 eeconfig_update_default_layer(default_layer);
87 default_layer_set(default_layer);
88}
89
90const uint16_t PROGMEM fn_actions[] = {
91 [_FKEYS] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_TAB),
92 [_FKEYGRV] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_GRV),
93 [_NUMSYM] = ACTION_LAYER_TAP_TOGGLE(_NUMSYM),
94};
95
96const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
97{
98 switch(id) {
99 case 5: // MACSLEEP
100 if (record->event.pressed) {
101 register_code(KC_RSFT);
102 register_code(KC_RCTL);
103 register_code(KC_POWER);
104 unregister_code(KC_POWER);
105 unregister_code(KC_RCTL);
106 unregister_code(KC_RSFT);
107 }
108 break;
109 case 6: // PLOVER
110 if (record->event.pressed) {
111 #ifdef AUDIO_ENABLE
112 stop_all_notes();
113 PLAY_NOTE_ARRAY(tone_plover, false, 0);
114 #endif
115 layer_off(_NUMSYM);
116 layer_off(_FKEYS);
117 layer_off(_ADJUST);
118 layer_on(_PLOVER);
119 }
120 break;
121 case 7: // LAYERRESET
122 if (record->event.pressed) {
123 #ifdef AUDIO_ENABLE
124 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
125 #endif
126 layer_off(_NUMSYM);
127 layer_off(_FKEYS);
128 layer_off(_PLOVER);
129 layer_off(_ADJUST);
130 }
131 break;
132 case 8: // BACKLIT
133 if (record->event.pressed) {
134 register_code(KC_RSFT);
135 #ifdef BACKLIGHT_ENABLE
136 backlight_step();
137 #endif
138 } else {
139 unregister_code(KC_RSFT);
140 }
141 break;
142 case 9: // ADJUST
143 if(record->event.pressed) {
144 #ifdef AUDIO_ENABLE
145 stop_all_notes();
146 PLAY_NOTE_ARRAY(tone_adjust, false, 0);
147 #endif
148 layer_off(_NUMSYM);
149 layer_off(_FKEYS);
150 layer_off(_PLOVER);
151 layer_on(_ADJUST);
152 }
153 }
154 return MACRO_NONE;
155};
156
157bool process_record_user(uint16_t keycode, keyrecord_t *record) {
158 uint16_t macro_kc = keycode;
159 if (keycode == FKEYS || keycode == ADJUST || keycode == FKEYGRV ){
160 macro_kc = DYN_REC_STOP;
161 }
162 if (!process_record_dynamic_macro(macro_kc, record)) {
163 return false;
164 }
165
166 return true;
167}
168
169void matrix_init_user(void) {
170 #ifdef AUDIO_ENABLE
171 startup_user();
172 #endif
173}
174
175#ifdef AUDIO_ENABLE
176
177void startup_user()
178{
179 _delay_ms(20); // gets rid of tick
180 PLAY_NOTE_ARRAY(tone_startup, false, 0);
181}
182
183void shutdown_user()
184{
185 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
186 _delay_ms(150);
187 stop_all_notes();
188}
189
190void music_on_user(void)
191{
192 music_scale_user();
193}
194
195void music_scale_user(void)
196{
197 PLAY_NOTE_ARRAY(music_scale, false, 0);
198}
199#endif
diff --git a/keyboards/tv44/keymaps/mjt/readme.md b/keyboards/tv44/keymaps/mjt/readme.md
new file mode 100644
index 000000000..c86985f6c
--- /dev/null
+++ b/keyboards/tv44/keymaps/mjt/readme.md
@@ -0,0 +1,26 @@
1# Mike's Minivan
2
3- Arrow Layout (45key)
4- Dynamic Macros
5- Media Keys
6- Works with iPhone Camera Adapter
7
8## Layers
9
10Qwerty for letters and mods.
11
12Numsym for all numbers and symbols used in typing. Follows a similar approach to
13planck but puts both on the same layer eschewing the F-keys.
14
15Fkeys layer is for the seldom used stuff like F-keys and some additional features
16such as dynamic macros, media keys, and a sleep shortcut for OS X.
17
18Adjust layer is tough to get to so it is only for keyboard configuration stuff.
19
20## Dynamic Macros
21
22Hold TAB key, then press ";" to record macro 1 and "'" to record macro 2.
23
24When you are done recording, press TAB again.
25
26For playback of macros, TAB+"," plays macro 1 and TAB+","plays macro 2.