diff --git a/src/Kaleidoscope/Colormap.cpp b/src/Kaleidoscope/Colormap.cpp index 1c22cfd4..cfa6e502 100644 --- a/src/Kaleidoscope/Colormap.cpp +++ b/src/Kaleidoscope/Colormap.cpp @@ -65,6 +65,11 @@ bool ColormapEffect::focusHook(const char *command) { map_base_, max_layers_); } +bool ColormapEffect::focusHookLayerwise(const char *command) { + return ::LEDPaletteTheme.themeLayerFocusHandler(command, PSTR("colormap.layer"), + map_base_, max_layers_); +} + } kaleidoscope::ColormapEffect ColormapEffect; diff --git a/src/Kaleidoscope/Colormap.h b/src/Kaleidoscope/Colormap.h index 208cfab4..d385e4db 100644 --- a/src/Kaleidoscope/Colormap.h +++ b/src/Kaleidoscope/Colormap.h @@ -29,6 +29,7 @@ class ColormapEffect : public LEDMode { void max_layers(uint8_t max_); static bool focusHook(const char *command); + static bool focusHookLayerwise(const char *command); protected: void setup(void) final; @@ -47,3 +48,6 @@ extern kaleidoscope::ColormapEffect ColormapEffect; #define FOCUS_HOOK_COLORMAP FOCUS_HOOK(ColormapEffect.focusHook, \ "colormap.map") + +#define FOCUS_HOOK_COLORMAP_LAYER FOCUS_HOOK(ColormapEffect.focusHookLayerwise, \ + "colormap.layer")