aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 68f8aab9510473e8d7d979cc9b186929db43442c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Kaleidoscope-LayerHighlighter

Highlight keys defined in a layer while it's locked with an LED
effect.

## Using the extension
```c++
#include <Kaleidoscope-LayerHighlighter.h>

enum { PRIMARY, FUNCTION, NUMPAD, MYLAYER }; // layers

/*
 * Layer definitions, etc.,.
 */

LayerHighlighter myLayerHighlighter(MYLAYER);

KALEIDOSCOPE_INIT_PLUGINS(myLayerHighlighter);

void setup() {
  Kaleidoscope.setup();

  myLayerHighlighter.color = CRGB(160, 160, 0); // yellow
  myLayerHighlighter.lockHue = 100; // green(ish)
}
```

## Plugin methods

Instances of this plugin provide the following instance variables:

### construction

Instantiate this plugin with the layer value to which it applies.

### `.color`
A CRGB value that specifies the color of the LEDs for keys defined
within the layer.

### `.lockHue`
A color hue, normalized from 0-255, specifying the breathing LED color
of any keys defined to lock the layer.

## CREDITS
This was basically just a minor modification of the
[Kaleidoscope-NumPad][NumPad] library, by Jesse Vincent.

[NumPad]: https://github.com/keyboardio/Kaleidoscope-NumPad