To be able to change the LEDs under a tap-dance key - for example - we need to
know its position. For this reason, remember the position, and use it when
injecting events, and pass them to `tapDanceAction`, too.
Fixes#3.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
If we find a partial match, do not abort, but continue until we either find a
full match, a mismatch, or until we time out. This make it possible to have gaps
in the sequence, where a partial sequence has no explicit handler.
Fixes#1.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Having a long timeout for tap-dance is counter-intuitive, unlike for the other
special keys with timeouts. Use a short one instead.
Fixes#2.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
When tapping a tap-dance key handled by `TapDance::actionKeys` more times than
the amount of keys available, treat it as if the last action was to be
triggered. This feels not only more intuitive, but it also allows the counter
and state to reset as soon as possible, resulting in a better typing experience.
Fixes#1.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
When a shift is not pressed, press it when a TopsyTurvy key is pressed, and keep
it down as long as the TopsyTurvy key is held, too. Release it when the key
toggles off. This fixes the jitter of #1 in the case where the key is pressed
without a modifier.
In the other case, when a TopsyTurvy key is pressed while a Shift is active too,
send a report after releasing the shifts, to make sure we do not jitter here,
either.
Fixes#1.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Instead of tracking the modifiers in a loop hook, track them in the event
handler. We catch all modifiers, even injected ones. This makes things more
reliable, because the loop hook can also catch modifiers that TopsyTurvy
injected, which is not desirable.
Oh, yeah, we do not catch TopsyTurvy-injected modifiers, because we use the
Keyboard singleton directly, instead of injecting the keys back into the
workflow.
This reduces the jitter described in #1, but does not fix it on its own.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
We are not going to support other firmware than KeyboardioFirmware - if need be,
KeyboardioFirmware will be ported to other hardware instead. As such, remove the
traces of code that suggest otherwise.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Cancel the one-shot state when the interruptor is pressed, not when it is
released. Otherwise, when typing fast, other keys pressed while the interruptor
is still releasing, may have the one-shot effect applied too.
For this to work, we need to do the cancellation post-clear, otherwise the
one-shot modifiers are cleared before they register with the interruptor.
Fixes#1, which used to be keyboardio/Akela#121.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>