Instead of unconditionally running the arduino-based build parts in verbose
mode, respect $VERBOSE. This cuts down on the amount of output we generate by
default, while still allowing us to have a verbose mode if need be.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
* never try to write anything to the host's disks
* read as little as possible from the host's disks
* keep source in ram
* cache build artifacts and intermediate content persistently
Most of these hacks are only necessary because Docker disk performance on macOS is...not performant
Signed-off-by: Jesse Vincent <jesse@keyboard.io>
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
The test has been through a major refactor, lifting out common parts, improving
comments, and naming.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
The new test case exercises a few corners of the system: we test that without
any layer changes, we start out on the right one. We also test that shifting to
another layer preserves the current caching behaviour. We test that the layers
are indeed looped through in activation order, rather than index order. And
finally, we test that explicitly turning off the single active layer will have
us fall back to layer 0.
We only test layer shifts, not locks and moves, because we only changed the
ordering, not how those behave otherwise.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Previously, we used index-ordering for layers, meaning, we looked keys up based
on the index of active layers. This turned out to be confusing, and in many
cases, limiting, since we couldn't easily shift to a lower layer from a higher
one. As such, index-ordering required careful planning of one's layers, and a
deeper understanding of the system.
This patch switches us to activation-ordering: the layer subsystem now keeps
track of the order in which layers are activated, and uses that order to look
keys up, instead of the index of layers. This makes it easier to understand how
the system works, and allows us to shift to lower layers too.
It does require a bit more resources, since we can't just store a bitmap of
active layers, but need 32 bytes to store the order. We still keep the bitmap,
to make `Layer.isActive()` fast: looking up a bit in the bitmap is more
efficient than walking the active layer array, and this function is often used
in cases where speed matters.
As a side effect of the switch, a number of methods were deprecated, and similar
ones with more appropriate names were introduced. See the updated `UPGRADING.md`
document for more details.
Plugins that used the deprecated methods were updated to use the new ones.
Fixes#857.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This change makes Qukeys require a certain minimum amount of time for a
key to be held before it is eligible to get its alternate (i.e. modifier)
value. This should help faster typists avoid unintended modifiers in the
output.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
The biggest problem here is that Qukeys was listed last. It doesn't
matter whether it comes before or after things like Focus, but it
really needs to handle events before other keystroke-handling plugins
like OneShot, TapDance, Macros, et cetera.
I also moved SpaceCadet up, since it does similar key value
resolution, and MousKeys down, because it never changes the value of a
key event.
Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
Two new functions have been introduced in namespace kaleidoscope.
One to conveniently add keyflags to an existing Key variable and
another one that can be overloaded to convert other types to type Key.
The keymap definition macros and the modifier function macro (LCTRL,
LALT, ...) are now using the to-Key conversion functions. This
allows users to use alternative ways to define keymaps by
defining types of their own that automatically convert to type Key.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
This refactors the KEYMAPS(...) macro and factors out
a header and footer portion that are now define as individual
macros START_KEYMAPS and END_KEYMAPS. The original
KEYMAPS(...) macro now relies on the newly defined macros.
The newly introduced macros enable keymap definitions that
allow for macro definitions between the start and end part
which is not possible inside the KEYMAPS(...) macro invocation.
Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
There were a few minor problems in the way Consumer `Key` objects were
constructed (using `CONSUMER_KEY()`). First, no masking of the high
bits was being done, so it was possible to create a "Consumer" key
with the `RESERVED` bit set (e.g. `Key_Transparent`), or the
`SWITCH_TO_KEYMAP` bit (in fact, any `Key` value with both the
`SYNTHETIC` and `IS_CONSUMER` bits set was possible).
This change fixes these potential problems by setting the six bits
taht could conflict to zero. When we need to have special behavior
based on those bits, this can change.
There were a few minor problems in the way Consumer `Key` objects were
constructed (using `CONSUMER_KEY()`). First, no masking of the high
bits was being done, so it was possible to create a "Consumer" key
with the `RESERVED` bit set (e.g. `Key_Transparent`), or the
`SWITCH_TO_KEYMAP` bit (in fact, any `Key` value with both the
`SYNTHETIC` and `IS_CONSUMER` bits set was possible).
Second, the high six bits of the raw `Key` value should always be
`010010` (`SYNTHETIC | IS_CONSUMER`), as Consumer keys don't have any
flags. The macro should really only take one argument: a 16-bit
integer keycode value. The `HID_TYPE_*` constants really shouldn't be
used at all in defining the keys in key_defs_consumer.h, because
setting those bits could potentially cause a key to be misidentified
by some plugin.
This change fixes these potential problems by ignoring the `flags`
parameter, masking the high six bits of the `code` supplied, and
setting those high six bits to the correct value.