Fixes#6364.
Removes `&layerChanged` and adds `&newLayer` and `&oldLayer` system
stores with the additional nuances around values as described in #6364.
The Caps Lock change I made in the previous commit broke
desktop Caps Lock handling. The fix was a little more
convoluted. Turns out that _UpdateVKShift is also pretty
crufty. I simplified it, removing dead code.
Selecting the new Caps Lock `caps` layer was not correctly setting the
layer state in the key event to `caps`, which caused Caps Lock rules
to fail to match.
Some of the global color variables in shellHelperFunctions.sh were a
little dangerously named. This cleans that up and removes a couple of
redundant functions from other locations.
mac/bashHelperFunctions.sh should be removed and replaced with
references to shellHelperFunctions.sh -- but I wanted to leave that for
a separate branch.
Relates to #5815.
build.sh is a new script that builds any or all of the keyboards in the
common/test/keyboards folder. build.bat is a wrapper for build.sh, just
for Windows CMD.
Assumes that kmcomp.exe has already been built or allows you to specify
your own kmcomp.exe if necessary.
Relates to #5853 and others.
Selection management was not working properly with the various
OutputTargets:
1. When there is a non-empty selection, rules have no context -- it's
like new text.
2. Backspace over a selection deletes just the selection.
3. Typing a character replaces the selection, of course, and collapses
the caret to the end of the new text.
4. `hasSelection` is a very strange name for `OutputTarget` descendants.
It doesn't mean "has an active selection" but rather, kinda means
"supports selection internally".
5. Added `isSelectionEmpty` which is used for some of the new selection
rules above.
Note that the `touchAlias` OutputTarget class does not currently support
selection. I hope we can deprecate `touchAlias` with the use of
`inputMode` (#3030) in the future, rather than adding support for
selection.