To make sure that the active LED mode is restored to a good state, re-init it.
Without this change, LED modes that do all their work in the `init()` method
will not refresh when NumLock is turned off.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
The new `init_mode()` method simply (re-)inits the current mode. Useful when a
plugin that changes LEDs outside of LED modes wants to reset the active LED
mode. Doubly useful when the active LED mode does all the work in its `init()`
method.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Having the LED effects of the NumLock layer as a special LED mode has a number
of drawbacks, like not interacting well with led mode switching: one can't get
back to the NumLock effect once switching away from it (but the mode remains
active nevertheless).
To avoid this and other issues, don't make the effect a LED mode. Instead,
override the active LED mode with the numlock layer colors. This way, it is
always in sync with the layer.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This converts the Style Guide to Markdown. Some small changes were
applied, mostly in the beginning, up until "Local Variables", roughly. After
that, only striked through sections were removed, and the wording was kept.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
While technically one can specify colors otherwise, for the sake of simplicity,
mention only `CRGB`, but do mention it explicitly, so the reader does not need
to look at the example to figure this out.
Fixes#9.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Attempt to explain when and why to use it over `MACRO`.
Fixes#9 together with the previous commit.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
It now tells the reader that the value of `.row`/`.col` is unspecified if not
triggered by a key.
Addresses part of #9.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Fixes#1. But the consequence is that the plugin will not play nicely with LED
modes that do not refresh.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>