From 493fbb3dc1423e0d42e57a6dc7ba38b880b37eb5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 15 Mar 2019 08:57:44 -0700 Subject: [Keymap] Update to drashna keymaps: Conform to QMK Standards Edition (#5377) * Use correct functions for dip switch code * Some planck cleanup * Hopefully fix RGB Sleeping with RGB Matrix * Add rgbmatrix extern * Add numpad 5x6 layout * RGB Tweaks * Add RGB startup animation * Minor RGB Fixes * Turn off RBG on planck * Enable separate storage of EEPROM * Update Macro pad * Add BJohnson Keymap and minor darshna tweaks * Clean up rgb and other code for new numpad * Remove clicky hachy thing * Update my code to use built in MOD_MASK defines * Fix up modifier calls * Tweak to KC_MAKE * Tweak to KC_MAKE * Add Semi-colon to numpad * Preprocess out rgb matrix stuff if not enabled * Formatting of KC_MAKE * Add stuff for matrix and light rgb coexistance * Fix bad spelling * Change where layer indication shows based on rgblight status * Force set mods in KC_MAKE * Optimize CRKBD --- users/drashna/process_records.c | 45 +++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 24 deletions(-) (limited to 'users/drashna/process_records.c') diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 73cad92f6..2d9025b37 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -12,7 +12,6 @@ bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } - // Defines actions tor my global custom keycodes. Defined in drashna.h file // Then runs the _keymap's record handier if not processed here bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -35,30 +34,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { - #if !defined(KEYBOARD_viterbi) - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); clear_oneshot_mods(); - #endif + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); - #if defined(KEYBOARD_viterbi) - send_string_with_delay_P(PSTR(":dfu" SS_TAP(X_ENTER)), MACRO_TIMER); - #else - if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { - #if defined(__arm__) - send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); - #elif defined(BOOTLOADER_DFU) - send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); - #elif defined(BOOTLOADER_HALFKAY) - send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); - #elif defined(BOOTLOADER_CATERINA) - send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); - #endif // bootloader options - } - if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); - set_mods(temp_mod); - #endif +#ifndef MAKE_BOOTLOADER + if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) +#endif + { + #if defined(__arm__) + send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); + #elif defined(BOOTLOADER_DFU) + send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); + #elif defined(BOOTLOADER_HALFKAY) + send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); + #elif defined(BOOTLOADER_CATERINA) + send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); + #endif // bootloader options + } + if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); + set_mods(temp_mod); + set_oneshot_mods(temp_osm); } break; -- cgit v1.2.3