diff options
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r-- | quantum/quantum.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 2bd2c71af..9c6ed3330 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -312,8 +312,16 @@ bool process_record_quantum(keyrecord_t *record) { #endif #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) case RGB_TOG: + // Split keyboards need to trigger on key-up for edge-case issue + #ifndef SPLIT_KEYBOARD if (record->event.pressed) { + #else + if (!record->event.pressed) { + #endif rgblight_toggle(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_MODE_FORWARD: @@ -325,6 +333,9 @@ bool process_record_quantum(keyrecord_t *record) { else { rgblight_step(); } + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_MODE_REVERSE: @@ -336,36 +347,87 @@ bool process_record_quantum(keyrecord_t *record) { else { rgblight_step_reverse(); } + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_HUI: + // Split keyboards need to trigger on key-up for edge-case issue + #ifndef SPLIT_KEYBOARD if (record->event.pressed) { + #else + if (!record->event.pressed) { + #endif rgblight_increase_hue(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_HUD: + // Split keyboards need to trigger on key-up for edge-case issue + #ifndef SPLIT_KEYBOARD if (record->event.pressed) { + #else + if (!record->event.pressed) { + #endif rgblight_decrease_hue(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_SAI: + // Split keyboards need to trigger on key-up for edge-case issue + #ifndef SPLIT_KEYBOARD if (record->event.pressed) { + #else + if (!record->event.pressed) { + #endif rgblight_increase_sat(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_SAD: + // Split keyboards need to trigger on key-up for edge-case issue + #ifndef SPLIT_KEYBOARD if (record->event.pressed) { + #else + if (!record->event.pressed) { + #endif rgblight_decrease_sat(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_VAI: + // Split keyboards need to trigger on key-up for edge-case issue + #ifndef SPLIT_KEYBOARD if (record->event.pressed) { + #else + if (!record->event.pressed) { + #endif rgblight_increase_val(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_VAD: + // Split keyboards need to trigger on key-up for edge-case issue + #ifndef SPLIT_KEYBOARD if (record->event.pressed) { + #else + if (!record->event.pressed) { + #endif rgblight_decrease_val(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_SPI: @@ -381,6 +443,9 @@ bool process_record_quantum(keyrecord_t *record) { case RGB_MODE_PLAIN: if (record->event.pressed) { rgblight_mode(1); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif } return false; case RGB_MODE_BREATHE: |