Gergely Nagy
72630bd326
Update the example to use Kaleidoscope.use
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
2a7eb7f4ee
Update the README.md to show an up to date example
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
7eded65ba3
Fix the LEDControl references
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
a8fdb3a5f0
Really fix the example this time...
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
bbf5ae3a08
Updated the example to work with the new LEDControl APIs
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
a5d3a9ff37
Updated to use Kaleidoscope.use instead of USE_PLUGINS
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
dc0b2a2b91
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
4dbc5d5707
Update the example to work with the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
475e9b531f
Merge pull request #8 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
bf60ae58e5
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
b9e2d3a27d
Merge pull request #3 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
be10584f52
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
dafb257e42
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
b40874edfc
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
25fcd12402
Merge pull request #1 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
a451ed8383
Merge pull request #11 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
ad076a36dd
Merge pull request #3 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
4781af907b
Merge pull request #7 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
2765bca10b
Merge pull request #5 from keyboardio/f/led-api-update
...
Updated to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
1672a1c033
Merge pull request #7 from keyboardio/f/led-api-update
...
Update to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
1e08277a90
Merge pull request #4 from keyboardio/f/led-mode-api-update
...
Update to use the new LEDMode/LEDControl API
7 years ago
Gergely Nagy
8829c32fb7
Merge pull request #11 from keyboardio/f/led-mode/api-redesign
...
Major update of how LED modes work
7 years ago
Gergely Nagy
8375838c81
Redo the logic that checks if we need to highlight
...
Instead of using `Kaleidoscope-Ranges` and custom helper functions with magic
constants to decide whether we need to highlight a key, refresh it, or leave it
alone, use an if-else chain and inner ifs for activity.
Leverages the new `OneShot.isOneShotKey(key)` and `OneShot.isActive(key)`
methods.
The net result is slightly cleaner code (though it can still be improved), and
about 0.2ms saved, along with some PROGMEM space.
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
6fbcf4ec5d
Add a `OneShot.isActive(key)` method
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
f39cb776a3
Lift out the `isOS` macro into `OneShot.isOneShotKey`.
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
e15aaed8c6
loopHook: Correct a thinko
...
Thanks @obra for catching it!
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
kaleidoscope@gergo.csillger.hu
ddd7ce47f7
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: kaleidoscope@gergo.csillger.hu <algernon@madhouse-project.org>
7 years ago
Gergely Nagy
da0c998760
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
b829d6371b
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
75edd6425e
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
25cb263e6a
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
7f705c43b5
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
de54b5b279
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
a7f9207cec
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
8bb7a5b1e4
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
7c67b22dff
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
0d22199cac
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
559858db8a
Updated to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
fe53c4fabe
Update to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
d4ddd5fd73
Update to use the new LEDMode/LEDControl API
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
b4c07442ac
Major update of how LED modes work
...
There were a number of issues with the model we had before, namely that plugins
that changed LED colors outside of LED modes had no way to signal "go back to
whatever color this key was". To this end, the `LEDMode.refreshAt` method is
introduced, which these plugins can call to tell the mode to update a given key.
As part of this, the API was redesigned, with code that is common between all
LED modes moving to the base class, among other things, much better names, and a
flow of control that is easier to follow.
In the new setup, there are four methods a LED mode can implement:
- `setup()` to do boot-time initialization (registering hooks, etc).
- `onActivate()` called every time the mode is activated.
- `update()` called each cycle.
- `refreshAt()` may be called by other plugins to refresh a particular key.
All of these are protected methods, to be called via `LEDControl` only.
Much of the new API design was done by @cdisselkoen, huge thanks for his work!
Fixes #9 .
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
2e1ae36cff
Use the new Layer.lookupOnActiveLayer function
...
We want to highlight keys as specified by the layer, not as their current role,
otherwise we may be missing keys we should highlight.
Thanks to @cdisselkoen for the report and the reproduction steps! Fixes #3 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
7 years ago
Jesse Vincent
aab19f505a
Tweak the bootgreeting timeout so that it turns off at the bottom end of a pulse
7 years ago
Jesse Vincent
588fa21148
fix a lint issue
7 years ago
Jesse Vincent
580953a39a
astyle
7 years ago
Jesse Vincent
b431927176
Merge pull request #1 from algernon/f/key-chatter-detection
...
Initial attempt at chatter detection
7 years ago
Gergely Nagy
f3094e1538
Initial attempt at chatter detection
...
For every key we press, we keep a map of its state each cycle (for 8 cycles).
When the key is released, we color it white if we had more than two state
changes (ie, chatter), otherwise we turn it blue (all is well).
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Jesse Vincent
20c5b8e779
Make out breathing blue a little bit purer blue.
...
Slight brighten up the breathe color so it's visible under keycaps
7 years ago
Jesse Vincent
f11189edc2
Update README to match code.
7 years ago
Jesse Vincent
64f20850b5
Add a workaround for [ + LSHIFT as a single key report not generating the proper
...
key events. (It generates [ instead of { )
7 years ago