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
Jesse Vincent
51e61dc205
Add a helper function for pressing modifier keys that we receive as
...
flags on a key we're asked to press
7 years ago
Jesse Vincent
14ae21267b
Add a new 'wasModifierKeyActive' wrapper around a new method in KeyboardioHID
7 years ago
Gergely Nagy
bed648ce28
Initial import
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Jesse Vincent
f6efa041b7
Merge pull request #175 from keyboardio/h/layers/momentary-reactivation
...
When a momentary layer is held, reactivate the layer if it turns off
7 years ago
Gergely Nagy
33dc593151
layers: Add a comment about the momentary layer handling
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
7 years ago