Fixes#7028.
Note that the desktop layout is not currently used by KeymanWeb. The
designer has a number of additional issues, as the .keyman-touch-layout
format is not well suited to describing a fixed hardware layout, but
fixing this is outside the scope of this issue.
Adds infrastructure required to support caps lock control on keyboard
activation per #5822.
Keyboardprocessor implementation is currently a stub, and engines will
need corresponding updates to support the new API.
Fixes#7216.
The warning message 0x209A 'The rule will never be matched because its
key code is never fired.' was being generated multiple times for a
single line because the `JavaScript_Key` function it is generated by is
used for various purposes.
This PR keeps a cache of reported key rules to ensure that the message
is reported only once for a given key rule, and also improves the
reporting to clarify which specific key is unreachable, which makes it
easier to diagnose when using `any(k)` style messages, for example:
```
lao_phonetic.kmn (237): Warning: 209A The rule will never be matched for key 'ñ' because its key code is never fired.
```
This also reduces the warning to a hint, as this should not be a
blocking issue for a keyboard, rather just a place the keyboard author
can tidy up.
Adds compilers and minimal unit tests for transform sections bksp,
finl, ordr, and tran, and cleans up problems in the corresponding
builders.
Adds a utility script for building test fixtures for manual analysis:
./build.sh build-fixtures
Refactors constants to give us design-time type safety once more.
This refactor work simply splits the existing functions into separate
files to prevent kmx-plus-builder.ts getting too big.
The functions now have no side-effects. Some of them mutate input
parameters, but they are fairly self-contained, which should make
unit tests simpler. Note that `alloc_string` is used extensively, but
works on the input parameter `sect_strs`.
Adds definitions for LDML keyboard transform elements `transforms`,
`backspaces`, and `reorders`, and the binary format sections `bksp`,
`elem`, `finl`, `ordr`, and `tran`.
Minimally updates the compiler so that it will build, but no other
changes to the compiler.
Compiler and Typescript updates to support building these sections will
come in the next PR.
The purpose of these tests is to ensure that our slightly WET constant
definitions for compiler errors are consistent in their usage:
* that names are consistent between the message functions and
constants
* that constants have unique codes
* that constants have the right error mask for their type
This means we don't have to worry about DRYing out the constants, which
would probably require us to have a preprocessing step, which has its
own negatives.
Also, added more reporting to e2e test in case of failures.
Uses our `K_xxx` constants for the CLDR VKey Enum mapping. Renames
us-virtual-keys to virtual-key-constants, better reflecting its purpose,
and adds a unit test to verify that the codes in the CLDR VKey Enum
mapping correspond to our expected Keyman virtual key codes.
vkeyMaps table compiler, unit test, and fixes to json schema. Adds a
vkeyMaps entry to the basic e2e test.
us-virtual-keys.ts has a new mapping for CLDR VKey Enums, but I will
tweak this in an upcoming commit to use constants instead of hard-coded
values.
Just wanted to rename this to make it clearer. Also added a prefix to
each message generator to indicate the type of message, as otherwise it
is not obvious within the compiler which messages are going to cause the
compiler to fail.
Note that the message generator function prefixes are Title Cased
whereas the message identifier constant prefixes are CAPS. I guess this
could be confusing but I think it works okay in practice.