diff options
Diffstat (limited to 'users/drashna/process_records.c')
| -rw-r--r-- | users/drashna/process_records.c | 45 |
1 files changed, 21 insertions, 24 deletions
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) { | |||
| 12 | return true; | 12 | return true; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | |||
| 16 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | 15 | // Defines actions tor my global custom keycodes. Defined in drashna.h file |
| 17 | // Then runs the _keymap's record handier if not processed here | 16 | // Then runs the _keymap's record handier if not processed here |
| 18 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 17 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| @@ -35,30 +34,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 35 | 34 | ||
| 36 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader | 35 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader |
| 37 | if (!record->event.pressed) { | 36 | if (!record->event.pressed) { |
| 38 | #if !defined(KEYBOARD_viterbi) | 37 | uint8_t temp_mod = get_mods(); |
| 39 | uint8_t temp_mod = get_mods(); | 38 | uint8_t temp_osm = get_oneshot_mods(); |
| 40 | uint8_t temp_osm = get_oneshot_mods(); | 39 | clear_mods(); clear_oneshot_mods(); |
| 41 | clear_mods(); clear_oneshot_mods(); | ||
| 42 | #endif | ||
| 43 | send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); | 40 | send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); |
| 44 | #if defined(KEYBOARD_viterbi) | 41 | #ifndef MAKE_BOOTLOADER |
| 45 | send_string_with_delay_P(PSTR(":dfu" SS_TAP(X_ENTER)), MACRO_TIMER); | 42 | if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) |
| 46 | #else | 43 | #endif |
| 47 | if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { | 44 | { |
| 48 | #if defined(__arm__) | 45 | #if defined(__arm__) |
| 49 | send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); | 46 | send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); |
| 50 | #elif defined(BOOTLOADER_DFU) | 47 | #elif defined(BOOTLOADER_DFU) |
| 51 | send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); | 48 | send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); |
| 52 | #elif defined(BOOTLOADER_HALFKAY) | 49 | #elif defined(BOOTLOADER_HALFKAY) |
| 53 | send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); | 50 | send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); |
| 54 | #elif defined(BOOTLOADER_CATERINA) | 51 | #elif defined(BOOTLOADER_CATERINA) |
| 55 | send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); | 52 | send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); |
| 56 | #endif // bootloader options | 53 | #endif // bootloader options |
| 57 | } | 54 | } |
| 58 | if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } | 55 | if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } |
| 59 | send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); | 56 | send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); |
| 60 | set_mods(temp_mod); | 57 | set_mods(temp_mod); |
| 61 | #endif | 58 | set_oneshot_mods(temp_osm); |
| 62 | } | 59 | } |
| 63 | break; | 60 | break; |
| 64 | 61 | ||
