aboutsummaryrefslogtreecommitdiffstats
path: root/src/Kaleidoscope-LayerHighlighter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Kaleidoscope-LayerHighlighter.h')
-rw-r--r--src/Kaleidoscope-LayerHighlighter.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/Kaleidoscope-LayerHighlighter.h b/src/Kaleidoscope-LayerHighlighter.h
index ba67395..3807cd1 100644
--- a/src/Kaleidoscope-LayerHighlighter.h
+++ b/src/Kaleidoscope-LayerHighlighter.h
@@ -1,20 +1,27 @@
#pragma once
-#include <Kaleidoscope.h>
+#include "kaleidoscope/KeyEvent.h" // for KeyEvent
+#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult
+#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn…
+#include "kaleidoscope/plugin.h" // for Plugin
-class LayerHighlighter : public kaleidoscope::Plugin {
- public:
- LayerHighlighter(uint8_t l): color(CRGB(160, 0, 0)), lockHue(170), layer(l) {}
+namespace kaleidoscope {
+ namespace plugin {
+ class LayerHighlighter : public Plugin {
+ public:
+ LayerHighlighter(uint8_t l): color(CRGB(160, 0, 0)), lockHue(170), layer(l) {}
- cRGB color;
- uint8_t lockHue;
+ 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();
+ EventHandlerResult onSetup(void);
+ EventHandlerResult onKeyEvent(KeyEvent &event);
+ // EventHandlerResult onKeyswitchEvent(Key &mapped_key, KeyAddr key_addr, uint8_t key_state);
+ EventHandlerResult afterEachCycle();
- private:
- const uint8_t layer;
- static byte row, col;
- uint8_t savedLEDMode;
-};
+ private:
+ const uint8_t layer;
+ };
+
+ }
+}