diff options
author | Drashna Jaelre <drashna@live.com> | 2021-07-26 17:59:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-26 17:59:49 -0700 |
commit | eb46c954dcf99d842967cc6095827316ffddd291 (patch) | |
tree | 69f0a5ade629b63731c246888c0e067312e0970f /users/drashna/drashna.c | |
parent | 368efb5d2b834d995ba24cd23349327bab02918b (diff) |
[Keymap] Drashna's Defaults cleanup (#13722)
Diffstat (limited to 'users/drashna/drashna.c')
-rw-r--r-- | users/drashna/drashna.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index b54d0cfcc0..4cef5433d6 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -103,12 +103,12 @@ void shutdown_user(void) { rgblight_enable_noeeprom(); rgblight_mode_noeeprom(1); rgblight_setrgb_red(); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE rgb_matrix_set_color_all(0xFF, 0x00, 0x00); rgb_matrix_update_pwm_buffers(); -#endif // RGB_MATRIX_ENABLE +#endif // RGB_MATRIX_ENABLE shutdown_keymap(); } @@ -124,8 +124,12 @@ void suspend_power_down_user(void) { __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} void suspend_wakeup_init_user(void) { - if (layer_state_is(_GAMEPAD)) { layer_off(_GAMEPAD); } - if (layer_state_is(_DIABLO)) { layer_off(_DIABLO); } + if (layer_state_is(_GAMEPAD)) { + layer_off(_GAMEPAD); + } + if (layer_state_is(_DIABLO)) { + layer_off(_DIABLO); + } suspend_wakeup_init_keymap(); } @@ -142,13 +146,13 @@ void matrix_scan_user(void) { startup_user(); } -#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. +#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. run_diablo_macro_check(); -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE #if defined(RGBLIGHT_ENABLE) matrix_scan_rgb_light(); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #if defined(RGB_MATRIX_ENABLE) matrix_scan_rgb_matrix(); #endif @@ -167,13 +171,15 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) // on layer change, no matter where the change was initiated // Then runs keymap's layer change check layer_state_t layer_state_set_user(layer_state_t state) { - if (!is_keyboard_master()) { return state; } + if (!is_keyboard_master()) { + return state; + } state = layer_state_set_keymap(state); state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #if defined(RGBLIGHT_ENABLE) state = layer_state_set_rgb_light(state); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #if defined(AUDIO_ENABLE) && !defined(__arm__) static bool is_gamepad_on = false; if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) { @@ -192,13 +198,15 @@ __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t // Runs state check and changes underglow color and animation layer_state_t default_layer_state_set_user(layer_state_t state) { - if (!is_keyboard_master()) { return state; } + if (!is_keyboard_master()) { + return state; + } state = default_layer_state_set_keymap(state); #if 0 # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) state = default_layer_state_set_rgb(state); -# endif // RGBLIGHT_ENABLE +# endif // RGBLIGHT_ENABLE #endif return state; } |