If a key has been in a stable state and then changes, report that change
immediately and then wait for a cooldown period before reporting any
additional changes. This reduces latency for registering initial
keypresses.
It would be unusual for this to introduce chatter, since mechanical
switches only tend to be noisy immediately after a key press or release.
This change does not introduce any additional persistent state, although
it does add an additional parameter to the debouncer to distinguish
between the last raw state and the last debounced state.
It also fixes a bug whereby all rows in the matrix would be rewritten
for every row that changed due to a mis-nesting of loops. However,
it now writes to the matrix state unconditionally.
Signed-off-by: Dean Scarff <dos@scarff.id.au>
Macro keycodes pre-date the Ranges plugin, so they previously had a keycode that
sorted before ranges::FIRST. For the sake of backwards compatibility, we want to
keep using the same keycodes.
Fixes#1010.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
The `INSTANTIATE_WEAK_HOOK_FUNCTION` claimed that it's there for v1 API
compatibility alone - it is not. It allows us to have sketches that use no
plugins too, without them having to use `KALEIDOSCOPE_INIT_PLUGINS()` with a
dummy plugin.
We'd need a dummy plugin because `KALEIDOSCOPE_INIT_PLUGINS()` does not support
being invoked with an empty plugin list, due to technical reasons. From an
end-user point of view, not using the macro is much preferable to using it with
a dummy plugin. We can't automatically inject a dummy plugin either, again, due
to technical reasons.
Fixes#1005.
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
@algernon and I have been hashing out a set of terminology over the past week. While this is still fairly incomplete, it is hopefully an improvement on the previous undocumented state of things.