diff --git a/users/plodah/functions/combos.c b/users/plodah/functions/combos.c index 0f527dc3e5..95583bebed 100644 --- a/users/plodah/functions/combos.c +++ b/users/plodah/functions/combos.c @@ -60,3 +60,19 @@ COMBO(pl_combo_ms25, C(KC_V)), }; #endif // ! defined(IS_MOUSE) +#ifdef PLODAH_BORING_LAYER +void plodah_layerchange_comboactions(layer_state_t state){ + switch (get_highest_layer(state)) { + case PLODAH_BORING_LAYER: + if(is_combo_enabled()){ + combo_disable(); + } + break; + default: + if(! is_combo_enabled()){ + combo_enable(); + } + break; + } +} +#endif // PLODAH_BORING_LAYER diff --git a/users/plodah/plodah.c b/users/plodah/plodah.c index bde4c8fe73..917f933633 100644 --- a/users/plodah/plodah.c +++ b/users/plodah/plodah.c @@ -74,6 +74,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { # include "functions/combos.c" #endif // COMBO_ENABLE +//========================// +// LAYER CHANGE // +//========================// +#if defined(PLODAH_BORING_LAYER ) +layer_state_t layer_state_set_user(layer_state_t state) { + # if defined(PLODAH_BORING_LAYER ) + plodah_layerchange_comboactions(state); + # endif // PLODAH_BORING_LAYER + return state; +} +#endif // PLODAH_BORING_LAYER + //==============================// // KEYCHRON DIPSWITCH // //==============================// @@ -90,6 +102,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //=======================// // MATRIX SCAN // //=======================// +#if (defined(PLODAH_ALTTAB_ENHANCEMENTS_ENABLE)) || ( defined(AUTOCORRECT_ENABLE) && defined(RGB_MATRIX_ENABLE) ) || (defined(PLODAH_TYPINGINDICATOR_RGBINDEX)) void matrix_scan_user(void) { # if defined(PLODAH_ALTTAB_ENHANCEMENTS_ENABLE) plodah_alttab_check(); @@ -101,6 +114,8 @@ void matrix_scan_user(void) { plodah_typingindicator_check(); # endif // PLODAH_TYPINGINDICATOR_RGBINDEX } +#endif // (defined(PLODAH_ALTTAB_ENHANCEMENTS_ENABLE)) || ( defined(AUTOCORRECT_ENABLE) && defined(RGB_MATRIX_ENABLE) ) || (defined(PLODAH_TYPINGINDICATOR_RGBINDEX)) + //==========================// // CAPS INDICATOR //