1
0
Fork 0

Unify the key up/down behaviour of RGB keycodes (#15730)

This commit is contained in:
Joel Challis 2022-01-06 07:52:32 +00:00 committed by GitHub
parent 2387a95be6
commit 8dbc8a802c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,12 +51,8 @@ static void __attribute__((noinline, unused)) handleKeycodeRGBMode(const uint8_t
* Handle keycodes for both rgblight and rgbmatrix * Handle keycodes for both rgblight and rgbmatrix
*/ */
bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
#ifndef SPLIT_KEYBOARD // need to trigger on key-up for edge-case issue
if (record->event.pressed) {
#else
// Split keyboards need to trigger on key-up for edge-case issue
if (!record->event.pressed) { if (!record->event.pressed) {
#endif
#if (defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)) #if (defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES))
uint8_t shifted = get_mods() & MOD_MASK_SHIFT; uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
#endif #endif