From 3518ba605aeeeb6ba53263e9bedbf6308173540c Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 9 Aug 2017 11:20:27 +0200 Subject: [PATCH] Documentation & example update Make it clear that layer keys are considered modifiers by the plugin. While in that area, use `Kaleidoscope.use` instead of the now deprecated `USE_PLUGINS` macro. Signed-off-by: Gergely Nagy --- README.md | 18 ++++++++++-------- .../LED-ActiveModColor/LED-ActiveModColor.ino | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 414b7823..6996c802 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ With this plugin, any active modifier on the keyboard will have the LED under it highlighted. No matter how the modifier got activated (a key press, a macro, -anything else), the coloring will apply. +anything else), the coloring will apply. Layer keys, be them layer toggles, +momentary switches, or one-shot layer keys count as modifiers as far as the +plugin is concerned. ## Using the plugin @@ -23,19 +25,19 @@ is also possible to use a custom color instead of the white default. #include void setup () { - USE_PLUGINS(&ActiveModColorEffect); - + Kaleidoscope.use(&ActiveModColorEffect); + Kaleidoscope.setup (); - + ActiveModColorEffect.highlight_color = CRGB(0x00, 0xff, 0xff); } ``` -It is recommended to place the activation (the `USE_PLUGINS` call) of the plugin -last, so that it can reliably override any other plugins that may work with the -LEDs, and apply the highlight over those. +It is recommended to place the activation (the `Kaleidoscope.use` call) of the +plugin last, so that it can reliably override any other plugins that may work +with the LEDs, and apply the highlight over those. -## Plugin methods +## Plugin properties The plugin provides the `ActiveModColorEffect` object, which has the following property: diff --git a/examples/LED-ActiveModColor/LED-ActiveModColor.ino b/examples/LED-ActiveModColor/LED-ActiveModColor.ino index 605a9c87..7653ad06 100644 --- a/examples/LED-ActiveModColor/LED-ActiveModColor.ino +++ b/examples/LED-ActiveModColor/LED-ActiveModColor.ino @@ -40,7 +40,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = { }; void setup() { - USE_PLUGINS(&ActiveModColorEffect); + Kaleidoscope.use(&ActiveModColorEffect); Kaleidoscope.setup();