aboutsummaryrefslogtreecommitdiffstats
path: root/src/Kaleidoscope-LayerHighlighter.h
blob: ba67395a6652e6731a2237da6f27735eb7a09d21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <Kaleidoscope.h>

class LayerHighlighter : public kaleidoscope::Plugin {
 public:
  LayerHighlighter(uint8_t l): color(CRGB(160, 0, 0)), lockHue(170), layer(l) {}

  cRGB color;
  uint8_t lockHue;

  kaleidoscope::EventHandlerResult onSetup(void);
  kaleidoscope::EventHandlerResult onKeyswitchEvent(Key &mapped_key, byte row, byte col, uint8_t key_state);
  kaleidoscope::EventHandlerResult afterEachCycle();

 private:
  const uint8_t layer;
  static byte row, col;
  uint8_t savedLEDMode;
};