With the swap, using `raw` becomes more straightforward, because the flags will
occupy the higher bits, and the keyCode the lower ones. This makes range checks
much more intuitive.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
The text of the GPL-2 in LICENSE was old, had the old FSF address, and referred
to the LGPL as the "Library GPL" (it's been "Lesser GPL" for a while now). This
simply updates the text with the latest text of the GPL-2. Apart from
formatting, the FSF address change, and the Library->Lesser GPL, there are no
other changes.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
There is no `libraries/` in the core firmware anymore, do not add that to the
library search path.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Apart from marking the `build` target as the default, and a custom
`astyle` target, everything else will just be dispatched further to
tools/keyboardio-builder.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
If there exists a configuration in the user's home directory, source it
too. Allows setting up some host-wide defaults.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
If there are no local libraries installed, do not add the directory to
the arduino-builder commandline.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Instead of cding all the time to the Sketch directory, remain where it
was, and work from there. This makes it possible to use relative paths
for the various tool paths.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Now supports everything that the old Makefile did, and a bit more. Some
cases still need to be handled, and documentation needs to be written,
but it is in a much better shape now.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
The tool - a work in progress - is meant to eventually replace the Makefile. It
is set up so that it can easily be reused by third-party libraries to build
their own examples, with minimal amount of configuration.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
These were moved to their own repos, and are now included in
keyboardio-libraries, which in turn is included in Arduino-Boards. As such,
remove the libraries from the core firmware.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This is the same Keyboardio-MouseKeys that lived in core KeyboardioFirmware up
until this point. It has been lifted out, the same GPL-2 license file added,
along with a README, and the URL in library.properties has been updated.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This is the same plugin that was in KeyboardioFirmware before, with a README,
and a license file attached, and the URL corrected in library.properties.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
For some delays, the holding was not long enough, or it never triggered. Do that
independently of the other cases, in a separate branch, instead of chaining it
into an else branch.
This makes the example work as desired.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Only turn the LED off if it was on before. Otherwise we will turn off those too
that were not in the map yet.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Instead of relying on the active effect to turn the LED off, do so
ourselves at the end.
Fixes#1.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
The macro needs to check `.keyCode` and `.flags` separately, due to byte
ordering. If it does not, it will easily catch other things.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
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>