added Key_LEDEffectPrevious

pull/365/head
Nate Soares 7 years ago
parent e3f112affc
commit e2d8866392

@ -130,8 +130,12 @@ Key LEDControl::eventHandler(Key mappedKey, byte row, byte col, uint8_t keyState
if (mappedKey.flags != (SYNTHETIC | IS_INTERNAL | LED_TOGGLE)) if (mappedKey.flags != (SYNTHETIC | IS_INTERNAL | LED_TOGGLE))
return mappedKey; return mappedKey;
if (keyToggledOn(keyState)) if (keyToggledOn(keyState)) {
next_mode(); if (mappedKey == Key_LEDEffectNext)
next_mode();
else
prev_mode();
}
return Key_NoKey; return Key_NoKey;
} }

@ -7,6 +7,7 @@
#define LED_TOGGLE B00000001 // Synthetic, internal #define LED_TOGGLE B00000001 // Synthetic, internal
#define Key_LEDEffectNext (Key) { 0, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE } #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 { namespace kaleidoscope {
/** Base class for LED modes. /** Base class for LED modes.

Loading…
Cancel
Save