@ -130,8 +130,12 @@ Key LEDControl::eventHandler(Key mappedKey, byte row, byte col, uint8_t keyState
if (mappedKey.flags != (SYNTHETIC | IS_INTERNAL | LED_TOGGLE))
return mappedKey;
if (keyToggledOn(keyState))
if (keyToggledOn(keyState)) {
if (mappedKey == Key_LEDEffectNext)
next_mode();
else
prev_mode();
}
return Key_NoKey;
@ -7,6 +7,7 @@
#define LED_TOGGLE B00000001 // Synthetic, internal
#define Key_LEDEffectNext (Key) { 0, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE }
#define Key_LEDEffectPrevious (Key) { 1, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE }
namespace kaleidoscope {
/** Base class for LED modes.