aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorishtob <ishtob@gmail.com>2018-08-10 11:30:21 -0400
committerDrashna Jaelre <drashna@live.com>2018-08-10 08:30:21 -0700
commitfd0bd29a0a3f2de93a3e561007805fac67e7e0cd (patch)
treed7c9a379d6b04fb851854102631cdde5c3f9b607
parentfeb5e4aaebb78842c090230f68ea9de80a5c17e6 (diff)
downloadqmk_firmware-fd0bd29a0a3f2de93a3e561007805fac67e7e0cd.tar.gz
qmk_firmware-fd0bd29a0a3f2de93a3e561007805fac67e7e0cd.zip
Keymap: adding my personal userspace to QMK master (#3605)
* Adding my personal planck keymap * Adding readme.md to my keymap * Create my userspace add users/ishtob/ * Moved macros off keymap macros now exsists in my userspace, moved them off keyboard specific keymaps * Create my userspace add users/ishtob/ * rebase from main QMK repo
-rwxr-xr-xkeyboards/planck/keymaps/ishtob/config.h60
-rw-r--r--keyboards/planck/keymaps/ishtob/keymap.c112
-rw-r--r--keyboards/planck/keymaps/ishtob/macros_public.h57
-rw-r--r--keyboards/planck/keymaps/ishtob/readme.md7
-rwxr-xr-xkeyboards/planck/keymaps/ishtob/rule.mk4
-rwxr-xr-xusers/ishtob/config.h76
-rw-r--r--users/ishtob/ishtob.c69
-rw-r--r--users/ishtob/ishtob.h76
-rw-r--r--users/ishtob/readme.md87
-rwxr-xr-xusers/ishtob/rules.mk7
10 files changed, 349 insertions, 206 deletions
diff --git a/keyboards/planck/keymaps/ishtob/config.h b/keyboards/planck/keymaps/ishtob/config.h
index 730b4eaed..e58ade0b0 100755
--- a/keyboards/planck/keymaps/ishtob/config.h
+++ b/keyboards/planck/keymaps/ishtob/config.h
@@ -1,60 +1,36 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3 1
4#include "../../config.h" 2#ifndef USERSPACE_CONFIG_H
3#define USERSPACE_CONFIG_H
5 4
6#define LEADER_TIMEOUT 300
7//#define BACKLIGHT_BREATHING
8#define PREVENT_STUCK_MODIFIERS
9 5
6#ifdef AUDIO_ENABLE
7
8// #define STARTUP_SONG SONG(E1M1_DOOM)
9// #define GOODBYE_SONG SONG(SONIC_RING)
10/* #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
11 SONG(COLEMAK_SOUND), \
12 SONG(DVORAK_SOUND), \
13 }
14*/
10//audio clicky 15//audio clicky
11 #define AUDIO_CLICKY 16 #define AUDIO_CLICKY
12 // to enable clicky on startup 17 // to enable clicky on startup
13 //#define AUDIO_CLICKY_ON 18 //#define AUDIO_CLICKY_ON
14 #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f 19 #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f
15 20
16/* ws2812 RGB LED 21
17#define RGB_DI_PIN B5 22#endif
18#define RGBLIGHT_ANIMATIONS 23
19#define RGBLED_NUM 8 // Number of LEDs 24#define FORCE_NKRO
20#define RGBLIGHT_HUE_STEP 10 25
21#define RGBLIGHT_SAT_STEP 17 26#define LEADER_TIMEOUT 300
22*/ 27#define PREVENT_STUCK_MODIFIERS
23#undef PLANCK_MIT_LAYOUT
24 28
25#undef DEBOUNCE 29#undef DEBOUNCE
26#define DEBOUNCE 0 30#define DEBOUNCE 0
27 31
28//rgb-reactive
29#define RGB_MATRIX_KEYPRESSES
30#define EECONFIG_RGB_MATRIX (uint32_t *)16
31
32//skip usb startup check 32//skip usb startup check
33//#define NO_USB_STARTUP_CHECK 33//#define NO_USB_STARTUP_CHECK
34 34
35 35
36/*
37 * MIDI options
38 */
39
40/* Prevent use of disabled MIDI features in the keymap */
41//#define MIDI_ENABLE_STRICT 1
42
43/* enable basic MIDI features:
44 - MIDI notes can be sent when in Music mode is on
45*/
46#define MIDI_BASIC
47
48/* enable advanced MIDI features:
49 - MIDI notes can be added to the keymap
50 - Octave shift and transpose
51 - Virtual sustain, portamento, and modulation wheel
52 - etc.
53*/
54//#define MIDI_ADVANCED
55
56/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
57//#define MIDI_TONE_KEYCODE_OCTAVES 2
58
59
60#endif 36#endif
diff --git a/keyboards/planck/keymaps/ishtob/keymap.c b/keyboards/planck/keymaps/ishtob/keymap.c
index be74a0d51..36720c4c3 100644
--- a/keyboards/planck/keymaps/ishtob/keymap.c
+++ b/keyboards/planck/keymaps/ishtob/keymap.c
@@ -1,7 +1,6 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard, 1// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2// this is the style you want to emulate. 2// this is the style you want to emulate.
3 3
4#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
5#include "planck.h" 4#include "planck.h"
6#include "action_layer.h" 5#include "action_layer.h"
7// #include "dynamic_macro.h" 6// #include "dynamic_macro.h"
@@ -9,65 +8,10 @@
9 #include "audio.h" 8 #include "audio.h"
10#endif 9#endif
11#include "eeconfig.h" 10#include "eeconfig.h"
12 11#include "ishtob.h"
13//Macro definition
14#if (__has_include("macros_private.h") && !defined(SECRETS))
15#include "macros_private.h"
16#else
17#include "macros_public.h"
18#endif
19 12
20extern keymap_config_t keymap_config; 13extern keymap_config_t keymap_config;
21 14
22// Each layer gets a name for readability, which is then used in the keymap matrix below.
23// The underscores don't mean anything - you can have a layer called STUFF or any other name.
24// Layer names don't all need to be of the same length, obviously, and you can also skip them
25// entirely and just use numbers.
26#define _QWERTY 0
27#define _COLEMAK 1
28#define _DVORAK 2
29#define _LOWER 3
30#define _RAISE 4
31#define _PLOVER 5
32#define _FNLAYER 6
33#define _NUMLAY 7
34#define _MOUSECURSOR 8
35#define _ADJUST 16
36
37enum planck_keycodes {
38 QWERTY = SAFE_RANGE,
39 COLEMAK,
40 DVORAK,
41 PLOVER,
42 LOWER,
43 RAISE,
44 BACKLIT,
45 EXT_PLV,
46 DFU,
47};
48
49// Fillers to make layering more clear
50#define _______ KC_TRNS
51#define XXXXXXX KC_NO
52// Custom macros
53#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
54#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl
55#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl
56#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
57// Requires KC_TRNS/_______ for the trigger key in the destination layer
58#define LT_FN(kc) LT(_FNLAYER, kc) // L-ayer T-ap Function Layer
59#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
60#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
61#define TG_NUMLAY TG(_NUMLAY) //Toggle for layer _NUMLAY
62#define P_CITRIX M(KC_CITRIX) // My login macros
63#define P_MPASS M(KC_MPASS)
64#define P_META M(KC_META)
65#define O_DAYRN M(KC_DAYRN) // My work macros
66#define O_AUTODC M(KC_AUTODC)
67#define O_RTQ6H M(KC_RTQ6H)
68#define M_EMAIL M(KC_EMAIL) // My personal email
69#define M_EMAIL2 M(KC_EMAIL2) // My work email
70
71const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
72/* Qwerty 16/* Qwerty
73 ,-----------------------------------------------------------------------------------. 17 ,-----------------------------------------------------------------------------------.
@@ -86,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
86 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS), 30 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS),
87 KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL 31 KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
88), 32),
89 33
90/* Colemak 34/* Colemak
91 * ,-----------------------------------------------------------------------------------. 35 * ,-----------------------------------------------------------------------------------.
92 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | 36 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
@@ -104,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
104 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS), 48 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT_RAI(KC_MINS),
105 KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL 49 KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
106), 50),
107 51
108/* Dvorak 52/* Dvorak
109 * ,-----------------------------------------------------------------------------------. 53 * ,-----------------------------------------------------------------------------------.
110 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | 54 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
@@ -122,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
122 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, LT_RAI(KC_MINS), 66 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, LT_RAI(KC_MINS),
123 KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL 67 KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL
124), 68),
125 69
126/* Lower 70/* Lower
127 * ,-----------------------------------------------------------------------------------. 71 * ,-----------------------------------------------------------------------------------.
128 * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ~ | \ | 72 * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ~ | \ |
@@ -140,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
140 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______, 84 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______,
141 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY 85 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
142), 86),
143 87
144/* Raise 88/* Raise
145 * ,-----------------------------------------------------------------------------------. 89 * ,-----------------------------------------------------------------------------------.
146 * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | * | \ | 90 * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | * | \ |
@@ -158,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
158 _______, KC_LEFT, KC_DOWN, KC_RIGHT,KC__MUTE, KC_VOLD, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______, 102 _______, KC_LEFT, KC_DOWN, KC_RIGHT,KC__MUTE, KC_VOLD, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______,
159 _______, _______, _______, _______, _______, KC_SPC, KC_0, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NLCK 103 _______, _______, _______, _______, _______, KC_SPC, KC_0, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NLCK
160), 104),
161 105
162/* Plover layer (http://opensteno.org) 106/* Plover layer (http://opensteno.org)
163 * ,-----------------------------------------------------------------------------------. 107 * ,-----------------------------------------------------------------------------------.
164 * | # | # | # | # | # | # | # | # | # | # | # | # | 108 * | # | # | # | # | # | # | # | # | # | # | # | # |
@@ -170,14 +114,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
170 * | Exit | | | A | O | | E | U | | | | 114 * | Exit | | | A | O | | E | U | | | |
171 * `-----------------------------------------------------------------------------------' 115 * `-----------------------------------------------------------------------------------'
172 */ 116 */
173 117
174[_PLOVER] = LAYOUT_planck_grid( 118[_PLOVER] = LAYOUT_planck_grid(
175 KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , 119 KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
176 XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, 120 XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
177 XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, 121 XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
178 EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX 122 EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
179), 123),
180 124
181/* FN layer on Esc key 125/* FN layer on Esc key
182 * ,-----------------------------------------------------------------------------------. 126 * ,-----------------------------------------------------------------------------------.
183 * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | + | 127 * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | + |
@@ -195,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
195 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______, 139 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______,
196 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY 140 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
197), 141),
198 142
199/* Num Layer 143/* Num Layer
200 * ,-----------------------------------------------------------------------------------. 144 * ,-----------------------------------------------------------------------------------.
201 * | | Q | Up | 4 | | | 7 | 8 | 9 | - | + | Bksp | 145 * | | Q | Up | 4 | | | 7 | 8 | 9 | - | + | Bksp |
@@ -213,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
213 _______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PSLS, _______, 157 _______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PSLS, _______,
214 _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______, KC_NLCK, KC_MPLY 158 _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______, KC_NLCK, KC_MPLY
215), 159),
216 160
217/* Mouse Layer (semi-col) 161/* Mouse Layer (semi-col)
218 * ,-----------------------------------------------------------------------------------. 162 * ,-----------------------------------------------------------------------------------.
219 * | ACCL0| ACCL1| ACCL2|Email |Email2| Home | Wh_Up| WHL_L| M_Up | WHL_R|PASS| Meta | 163 * | ACCL0| ACCL1| ACCL2|Email |Email2| Home | Wh_Up| WHL_L| M_Up | WHL_R|PASS| Meta |
@@ -225,14 +169,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
225 * | | | | | | BTN1 | | | | Citx | | 169 * | | | | | | BTN1 | | | | Citx | |
226 * `-----------------------------------------------------------------------------------' 170 * `-----------------------------------------------------------------------------------'
227 */ 171 */
228 172
229[_MOUSECURSOR] = LAYOUT_planck_grid( 173[_MOUSECURSOR] = LAYOUT_planck_grid(
230 KC_ACL0, KC_ACL1, KC_ACL2, M_EMAIL,M_EMAIL2, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, P_MPASS, P_META, 174 KC_ACL0, KC_ACL1, KC_ACL2, M_EMAIL,M_EMAIL2, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, P_MPASS, P_META,
231 _______, XXXXXXX, XXXXXXX, XXXXXXX, O_RTQ6H, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, O_DAYRN, 175 _______, XXXXXXX, XXXXXXX, XXXXXXX, O_RTQ6H, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, O_DAYRN,
232 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, 176 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______,
233 _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, P_CITRIX, O_AUTODC 177 _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, P_CITRIX, O_AUTODC
234), 178),
235 179
236/* Adjust (Lower + Raise) 180/* Adjust (Lower + Raise)
237 * ,-----------------------------------------------------------------------------------. 181 * ,-----------------------------------------------------------------------------------.
238 * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | 182 * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del |
@@ -250,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
250 _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, 194 _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG,
251 _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG 195 _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG
252) 196)
253 197
254 198
255}; 199};
256 200
@@ -281,7 +225,7 @@ void persistant_default_layer_set(uint16_t default_layer) {
281void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; 225void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };
282 226
283 227
284bool process_record_user(uint16_t keycode, keyrecord_t *record) { 228bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
285 switch (keycode) { 229 switch (keycode) {
286 case QWERTY: 230 case QWERTY:
287 if (record->event.pressed) { 231 if (record->event.pressed) {
@@ -369,36 +313,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
369 } 313 }
370 return false; 314 return false;
371 break; 315 break;
372 case DFU:
373 if (record->event.pressed) {
374 clear_keyboard();
375 #if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
376 process_midi_all_notes_off();
377 #endif
378 #if defined(AUDIO_ENABLE) && !defined(NO_MUSIC_MODE)
379 music_all_notes_off();
380 uint16_t timer_start = timer_read();
381 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
382 shutdown_user();
383 while(timer_elapsed(timer_start) < 250)
384 wait_ms(1);
385 stop_all_notes();
386 #else
387 wait_ms(250);
388 #endif
389 // this is also done later in bootloader.c - not sure if it's neccesary here
390 #ifdef BOOTLOADER_CATERINA
391 *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
392 #endif
393 bootloader_jump();
394 }
395 return false;
396 break;
397 } 316 }
398 return true; 317 return true;
399} 318}
400 319
401void matrix_init_user(void) { 320void matrix_init_keymap(void) {
402 #ifdef AUDIO_ENABLE 321 #ifdef AUDIO_ENABLE
403 startup_user(); 322 startup_user();
404 #endif 323 #endif
@@ -432,4 +351,3 @@ void music_scale_user(void)
432 351
433#endif 352#endif
434 353
435
diff --git a/keyboards/planck/keymaps/ishtob/macros_public.h b/keyboards/planck/keymaps/ishtob/macros_public.h
deleted file mode 100644
index 27d6f7564..000000000
--- a/keyboards/planck/keymaps/ishtob/macros_public.h
+++ /dev/null
@@ -1,57 +0,0 @@
1enum macro_keycodes {
2 KC_CITRIX,
3 KC_MPASS,
4 KC_META,
5 KC_RTQ6H,
6 KC_DAYRN,
7 KC_3DRN,
8 KC_AUTODC,
9 KC_EMAIL,
10 KC_EMAIL2
11};
12
13const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
14{
15 if (!eeconfig_is_enabled()) {
16 eeconfig_init();
17 }
18
19 switch (id) {
20 //my login macros
21 case KC_CITRIX:
22 if (record->event.pressed){
23 return MACRO (I(1), T(1), END);
24 }
25 case KC_MPASS:
26 if (record->event.pressed){
27 return MACRO (I(1), T(1), END);
28 }
29 case KC_META:
30 if (record->event.pressed){
31 return MACRO (I(1), T(1), END);
32 }
33 //my work macros
34 case KC_RTQ6H:
35 if (record->event.pressed){
36 return MACRO (I(1), T(TAB), T(0), T (3), T(0), T(0), T(TAB), T(DOWN), T(TAB), T(0), T (9), T(0), T(0), T(TAB), T(DOWN), T(TAB), T(1), T (5), T(0), T(0), T(TAB), T(DOWN), T(TAB), T(2), T (1), T(0), T(0), T(TAB), D(LALT), T(O), U(LALT), END);
37 }
38 case KC_AUTODC:
39 if (record->event.pressed){
40 return MACRO (I(1), D(LALT), T(V), U(LALT), T(TAB), T(TAB), T(TAB), T(TAB), T(TAB), T(TAB), T(TAB), T(TAB), T(TAB), T(T), T(TAB),T(N), D(LALT), T(S), U(LALT), END);
41 }
42 case KC_DAYRN:
43 if (record->event.pressed){
44 return MACRO (I(1), T(TAB), T(TAB), T(TAB), T(TAB), T(TAB), T(1), D(LALT), T(S), U(LALT), END);
45 }
46 //Ops macros
47 case KC_EMAIL:
48 if (record->event.pressed){
49 return MACRO (I(1), T(1), END); }
50 case KC_EMAIL2:
51 if (record->event.pressed){
52 return MACRO (I(1), T(1), END);
53 }
54 }
55
56 return MACRO_NONE;
57} \ No newline at end of file
diff --git a/keyboards/planck/keymaps/ishtob/readme.md b/keyboards/planck/keymaps/ishtob/readme.md
index 22873141f..108b9ee0c 100644
--- a/keyboards/planck/keymaps/ishtob/readme.md
+++ b/keyboards/planck/keymaps/ishtob/readme.md
@@ -2,7 +2,7 @@
2 2
3#Ishtob's personal planck layout 3#Ishtob's personal planck layout
4 4
5THis is the default layout used with my planck light, though the rest of the keymap could also be used for the full sized planck or let's split. 5This is the default layout used with my planck light, though the rest of the keymap could also be used for the full sized planck or let's split.
6 6
7 7
8Main difference with the default layout: 8Main difference with the default layout:
@@ -14,8 +14,3 @@ Main difference with the default layout:
14* Capslock is on the base layer as it is used quite often with my work's software 14* Capslock is on the base layer as it is used quite often with my work's software
15 15
16* Numbers layer on lower is positioned to resemble a numpad with 5 taking the location of J for the homing bump and easier entry 16* Numbers layer on lower is positioned to resemble a numpad with 5 taking the location of J for the homing bump and easier entry
17
18
19# Secret Macros
20
21`macros_public.h` contains a list of macros that can be replaced with passwords or other sensative private macros. `macros_private.h` will be used if it exsists in the folder during compiling and will ignore `macros_public.h` The private macros can be excluded from git commits by adding it to the exclusion list.
diff --git a/keyboards/planck/keymaps/ishtob/rule.mk b/keyboards/planck/keymaps/ishtob/rule.mk
index 923c3a5dc..c8940c3b4 100755
--- a/keyboards/planck/keymaps/ishtob/rule.mk
+++ b/keyboards/planck/keymaps/ishtob/rule.mk
@@ -1,7 +1,3 @@
1ifeq ($(strip $(SECRETS)),yes)
2 OPT_DEF += -DSECRETS
3endif
4
5# Build Options 1# Build Options
6# comment out to disable the options. 2# comment out to disable the options.
7# 3#
diff --git a/users/ishtob/config.h b/users/ishtob/config.h
new file mode 100755
index 000000000..9c4a7ed8d
--- /dev/null
+++ b/users/ishtob/config.h
@@ -0,0 +1,76 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "config_common.h"
5
6#ifdef AUDIO_ENABLE
7 #define STARTUP_SONG SONG(PLANCK_SOUND)
8 // #define STARTUP_SONG SONG(NO_SOUND)
9
10 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
11 SONG(COLEMAK_SOUND), \
12 SONG(DVORAK_SOUND) \
13 }
14#endif
15
16//#define LEADER_TIMEOUT 300
17//#define BACKLIGHT_BREATHING
18#define PREVENT_STUCK_MODIFIERS
19//#define PERMISSIVE_HOLD
20// #define QMK_KEYS_PER_SCAN 4
21
22//audio clicky
23 //#define AUDIO_CLICKY
24 // to enable clicky on startup
25 //#define AUDIO_CLICKY_ON
26 //#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f
27
28/* ws2812 RGB LED
29#define RGB_DI_PIN B5
30#define RGBLIGHT_ANIMATIONS
31#define RGBLED_NUM 8 // Number of LEDs
32#define RGBLIGHT_HUE_STEP 10
33#define RGBLIGHT_SAT_STEP 17
34*/
35#undef PLANCK_MIT_LAYOUT
36
37//#define MUON_LEFT
38
39#undef DEBOUNCE
40#define DEBOUNCE 0
41
42//rgb-reactive
43//#define RGB_MATRIX_KEYPRESSES
44//#define EECONFIG_RGB_MATRIX (uint32_t *)16
45
46//skip usb startup check
47//#define NO_USB_STARTUP_CHECK
48
49
50/*
51 * MIDI options
52 */
53
54/* Prevent use of disabled MIDI features in the keymap */
55//#define MIDI_ENABLE_STRICT 1
56
57/* enable basic MIDI features:
58 - MIDI notes can be sent when in Music mode is on
59*/
60#define MIDI_BASIC
61
62/* enable advanced MIDI features:
63 - MIDI notes can be added to the keymap
64 - Octave shift and transpose
65 - Virtual sustain, portamento, and modulation wheel
66 - etc.
67*/
68//#define MIDI_ADVANCED
69
70/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
71//#define MIDI_TONE_KEYCODE_OCTAVES 2
72
73// Most tactile encoders have detents every 4 stages
74#define ENCODER_RESOLUTION 4
75
76#endif
diff --git a/users/ishtob/ishtob.c b/users/ishtob/ishtob.c
new file mode 100644
index 000000000..1b847d630
--- /dev/null
+++ b/users/ishtob/ishtob.c
@@ -0,0 +1,69 @@
1/*
2Based on userspace written by @drashna 2017
3Copyright 2018 Hsian Chang <ishtob@gmail.com> @ishtob
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
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.
13You should have received a copy of the GNU General Public License
14along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#include "ishtob.h"
18#include "action.h"
19#include "action_layer.h"
20// #include "dynamic_macro.h"
21#ifdef AUDIO_ENABLE
22 #include "audio.h"
23#endif
24
25
26// Add reconfigurable functions here, for keymap customization
27// This allows for a global, userspace functions, and continued
28// customization of the keymap. Use _keymap instead of _user
29// functions in the keymaps
30__attribute__ ((weak))
31void matrix_init_keymap(void) {}
32
33__attribute__ ((weak))
34void matrix_scan_keymap(void) {}
35
36__attribute__ ((weak))
37bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
38 return true;
39}
40
41__attribute__ ((weak))
42bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
43 return true;
44}
45
46// Call user matrix init, then call the keymap's init function
47void matrix_init_user(void) {
48 matrix_init_keymap();
49}
50
51// No global matrix scan code, so just run keymap's matix
52// scan function
53void matrix_scan_user(void) {
54 matrix_scan_keymap();
55}
56
57bool process_record_user(uint16_t keycode, keyrecord_t *record) {
58 switch (keycode) {
59 case DFU:
60 if (record->event.pressed) {
61 clear_keyboard();
62 reset_keyboard();
63 }
64 return false;
65 break;
66 }
67 return process_record_keymap(keycode, record) && process_record_secrets(keycode, record);
68}
69
diff --git a/users/ishtob/ishtob.h b/users/ishtob/ishtob.h
new file mode 100644
index 000000000..2c47fce79
--- /dev/null
+++ b/users/ishtob/ishtob.h
@@ -0,0 +1,76 @@
1#ifndef USERSPACE
2#define USERSPACE
3#include "quantum.h"
4
5enum userspace_keycodes {
6 QWERTY = SAFE_RANGE,
7 COLEMAK,
8 DVORAK,
9 PLOVER,
10 LOWER,
11 RAISE,
12 BACKLIT,
13 EXT_PLV,
14 DFU,
15 P_CITRIX, //these macro exsists in macros_private.c, which is excluded from git
16 P_MPASS,
17 P_META,
18 O_DAYRN,
19 O_RTQ6H,
20 O_3DRN,
21 O_AUTODC,
22 M_EMAIL,
23 M_EMAIL2
24};
25
26// Each layer gets a name for readability, which is then used in the keymap matrix below.
27// The underscores don't mean anything - you can have a layer called STUFF or any other name.
28// Layer names don't all need to be of the same length, obviously, and you can also skip them
29// entirely and just use numbers.
30#define _QWERTY 0
31#define _COLEMAK 1
32#define _DVORAK 2
33#define _LOWER 3
34#define _RAISE 4
35#define _PLOVER 5
36#define _FNLAYER 6
37#define _NUMLAY 7
38#define _MOUSECURSOR 8
39#define _ADJUST 16
40
41
42
43#define LOWER MO(_LOWER)
44#define RAISE MO(_RAISE)
45
46// Fillers to make layering more clear
47#define _______ KC_TRNS
48#define XXXXXXX KC_NO
49// Custom macros
50#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
51#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl
52#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl
53#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
54// Requires KC_TRNS/_______ for the trigger key in the destination layer
55#define LT_FN(kc) LT(_FNLAYER, kc) // L-ayer T-ap Function Layer
56#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
57#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
58#define TG_NUMLAY TG(_NUMLAY) //Toggle for layer _NUMLAY
59/*
60enum userspace_layers {
61 _QWERTY = 0,
62 _COLEMAK,
63 _DVORAK,
64 _LOWER,
65 _RAISE,
66 _PLOVER,
67 _FNLAYER,
68 _NUMLAY,
69 _MOUSECURSOR,
70 _ADJUST
71};
72*/
73
74
75
76#endif // !USERSPACE \ No newline at end of file
diff --git a/users/ishtob/readme.md b/users/ishtob/readme.md
new file mode 100644
index 000000000..5b7064de9
--- /dev/null
+++ b/users/ishtob/readme.md
@@ -0,0 +1,87 @@
1# Ishtob's userspace
2
3under developement
4
5# Secret Macros
6
7This section is a modified version of what @drashna did in his userspace: https://github.com/qmk/qmk_firmware/tree/master/users/drashna#secret-macros
8
9`macros_private.c` will be used if it exsists in the userspace folder during compiling.
10
11To get started, put the following in rules.mk. this will have the compiler include the macros_private.c file if it exsists.
12```
13SRC += ishtob.c
14ifneq ($(wildcard $(USER_PATH)/macros_private.c),"")
15 SRC += macros_private.c
16endif
17ifeq ($(strip $(NO_SECRETS)), yes)
18 OPT_DEFS += -DNO_SECRETS
19endif
20```
21
22Remember that all macro keycode has to be present in the header file (ishtob.h) to prevent error during compile.
23
24Next, you setup macros_private.c, ensure the keycodes are defined in ishtob.h (or your keymap.h).
25Here is an example of my macros with the sensitive login information removed:
26```
27#include "ishtob.h" //replace this with your userspace or keymap
28#include "quantum.h"
29
30#pragma message "secret macros included" //debug line to let me know this file is included in the compile
31
32//this str is for the monthly password rotation per my workplace's security policy
33char my_str[5] = "stuff";
34
35bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
36 if (record->event.pressed) {
37 switch(keycode) {
38 //my login macros
39 case P_CITRIX:
40 SEND_STRING("username"SS_TAP(X_TAB)"something");
41 send_string(my_str);
42 return false;
43 case P_MPASS:
44 SEND_STRING("something");
45 send_string(my_str);
46 return false;
47 case P_META:
48 SEND_STRING("metausername");
49 return false;
50 //my work macros for the meta application
51 case O_RTQ6H:
52 SEND_STRING(SS_TAP(X_TAB)"0300"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"0900"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"1500"SS_TAP(X_TAB)SS_TAP(X_DOWN)SS_TAP(X_TAB)"2100"SS_TAP(X_TAB)SS_LALT("o"));
53 return false;
54 case O_AUTODC:
55 SEND_STRING(SS_LALT("v")SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)"T"SS_TAP(X_TAB)"N"SS_LALT("s"));
56 return false;
57 case O_DAYRN:
58 SEND_STRING(SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)SS_TAP(X_TAB)"1"SS_LALT("s"));
59 return false;
60 //Ops macros
61 case M_EMAIL:
62 SEND_STRING("privatemail@email.com");
63 return false;
64 case M_EMAIL2:
65 SEND_STRING("workemail@work.com");
66 return false;
67 }
68 }
69 return true;
70}
71```
72
73
74Finally, add the following to .git/info/exclude to prevent private macros from being committed to git.
75```
76# git ls-files --others --exclude-from=.git/info/exclude
77# Lines that start with '#' are comments.
78# For a project mostly in C, the following would be a good set of
79# exclude patterns (uncomment them if you want to use them):
80# *.[oa]
81# *~
82/users/ishtob/macros_private.c
83```
84
85# Special mentions
86
87special thanks to @drashna for helping me through quite a bit of these codes. \ No newline at end of file
diff --git a/users/ishtob/rules.mk b/users/ishtob/rules.mk
new file mode 100755
index 000000000..d19e95266
--- /dev/null
+++ b/users/ishtob/rules.mk
@@ -0,0 +1,7 @@
1SRC += ishtob.c
2ifneq ($(wildcard $(USER_PATH)/macros_private.c),"")
3 SRC += macros_private.c
4endif
5ifeq ($(strip $(NO_SECRETS)), yes)
6 OPT_DEFS += -DNO_SECRETS
7endif