Marc Durdin
96f288a83d
fix(core): properly support 'other' modifier state with uint32_t type
...
While the modifier state property in core's API is 16-bit, internally
ldml_processor supports the modifier flag LDML_KEYS_MOD_OTHER with a
value of `0x10000`, which requires widening the value (we match the
32-bit size of the KMX_DWORD value from KMX+).
Note: this is not yet well unit-tested.
Relates-to: #11072
Fixes : #12057
2024-08-24 12:26:52 +08:00
Marc Durdin
bad54e4fed
Merge pull request #12171 from keymanapp/refactor/core/make-utfcodec-common
...
refactor(core): move utfcodec to common
2024-08-14 19:10:16 +10:00
Marc Durdin
613bdb6c19
refactor(core): move utfcodec to common
...
Refactor to support codecvt cleanup work in kmcmplib.
2024-08-13 15:04:07 +02:00
Marc Durdin
859c88a6de
docs: add .kmx specification
...
Fixes : #11407
2024-08-12 17:04:24 +07:00
Marc Durdin
1be73a9c2e
refactor(windows): clean up logging
...
* Remove unused parameters from SendDebugMessage functions
* Add SendDebugEntry and SendDebugExit functions for tracking
function entry/exit
* Add indenting and function names to log entries
* Remove unused debug functions
* Eliminate now-unused hwnd parameter in initialization functions
* Replace Log,LogEntry,LogExit functions with SendDebug equivalents in
kmtip
Many functions now have SendDebugEntry/SendDebugExit (or
return_SendDebugExit) pairs. It is important to SendDebugExit on all
returns from a function to keep the log indent depth consistent. In some
cases I chose not to add these logging calls, e.g. on frequently called
functions such as the message hooks.
2024-07-03 21:28:37 +10:00
Steven R. Loomis
38c6fe1ba3
Merge pull request #11778 from keymanapp/feat/core/9467-remove-icu-for-wasm-epic-ldml
...
feat(core): remove ICU from core under wasm 🙀
2024-06-17 08:22:38 -05:00
Steven R. Loomis
ca34550a8d
feat(core): update util_regex per review comments
...
- remove some TODOs that were obsolete
- copy/clarify/expand comments between the ICU and non-ICU sides
Fixes : #9467
2024-06-14 08:55:15 -05:00
Steven R. Loomis
b2e3215b0b
Merge branch 'feat/core/9467-devolve-regex-to-js2-epic-ldml' into feat/core/9467-remove-icu-for-wasm-epic-ldml
2024-06-13 14:29:18 -05:00
Steven R. Loomis
ff3c9736f4
Merge branch 'master' into feat/core/9467-devolve-regex-to-js2-epic-ldml
2024-06-13 14:29:01 -05:00
Steven R. Loomis
a744afc34f
feat(core): remove ICU from core under wasm
...
Fixes : #9467
2024-06-13 14:20:58 -05:00
Steven R. Loomis
1a61a589b3
feat(core): devolve regex to js for wasm
...
- assert was wrong!
Fixes : #9467
2024-06-13 13:07:29 -05:00
Steven R. Loomis
263d0e32f2
chore(core): update comments and remove a raw numeric literal
...
- per review comments
Fixes : #9467
Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2024-06-13 12:17:55 -05:00
Steven R. Loomis
acd3cc5847
feat(core): devolve regex to JS
...
- use JS regex code
- almost there - some perhaps escaping differences
Fixes : #9467
2024-06-07 18:11:20 -05:00
Steven R. Loomis
55a025c767
refactor(core): devolve regex to js for wasm
...
- new module, core/src/util_regex.hpp
- no wasm implementationyet
Fixes : #9467
2024-06-05 16:53:43 -05:00
Steven R. Loomis
f156a7264d
feat(core): generator in core/src for util_normalize_table.h
...
- temporary header file generated by wasm during build
- built using icu
- test_unicode verifies the contents and synchronization with running ICU.
- this is used by util_normalize to provide normalization properties under wasm without needing to include ICU.
Fixes : #9467
2024-06-05 15:47:20 -05:00
Steven R. Loomis
e9673867fa
feat(core): speedup NFD boundary table
...
- use RLE encoding, thanks @mcdurdin
- much smaller table and faster lookup
Fixes : #9467
2024-06-04 12:23:16 -05:00
Steven R. Loomis
53a6638a70
feat(core): generate and use static table in wasm for NFD boundary
...
- add core/tools build tree with custom targets
- add to core/build.sh to generate nfd_table.h
- test_unicode to validate Unicode version and compare NFD to actual ICU
- currently, linear search of the table.
2024-06-04 11:15:17 -05:00
Steven R. Loomis
5d420248eb
feat(core): move more normalization logic into JS
...
- major redo of actions_normalize - into UTF-32 and not using ICU directly
- add some utilities: u32len, u32dup, context_items_from_utf32
#9467
2024-05-24 18:20:30 -05:00
Steven R. Loomis
a80a0a7dcb
feat(core): move more normalization logic into JS
...
- add a normalize_nfd() which takes a single codepoint
- temporarily keep ICU in actions_normalize.cpp and ldml_transforms.cpp
- expand wasm opts in unit tests
2024-05-24 10:42:57 -05:00
Steven R. Loomis
465c4bfdc0
feat(core): add a KMN_NO_ICU internal switch to start being able to turn off ICU
...
- always set to 0 for now (keep ICU around)
- set KMN_IN_LDML_TESTS in tests to keep ICU there for test and comparison
- add core_icu.cpp and put some utils there.
#9467
2024-05-24 09:24:53 -05:00
Steven R. Loomis
43cd828e9d
feat(core): change normalize_nfd() to use JS native call instead of ICU
...
- does not hit all ICU usage yet
#9467
2024-05-23 17:09:00 -05:00
Steven R. Loomis
d8b5c25954
chore(core): refactor to move most normalization calls into util_normalize.cpp
...
- fold ldml_utils.hpp into core_icu.h
- refactor to use km::core::util::normalize_nfd() functions where simple to do so
For #9467
2024-05-23 14:47:38 -05:00
Steven R. Loomis
e5ee26aaea
fix(core): add a test to verify ICU and Unicode version
...
- load version data from node.js, Blocks.txt, and ICU4C
- support wasm: copy package.json, nodeversions.json and Blocks.txt into the keyboard area so that they can be mounted under wasm
also:
- rename 'fallback' macro to KMN_FALLBACK to not conflict with hedley in utfcodec.hpp
- fix ambiguous path type in tests
Fixes : #10183
2024-05-23 09:31:15 -05:00
Steven R. Loomis
d3c9fbbadc
chore(core): update core to C++17 fixes
...
- remove some tangled templates in jsonpp
- remove one unneeded include of sstream, and rewrite another as a string conversion.
Fixes : #8800
2024-05-13 17:50:20 -05:00
Steven R. Loomis
02413c0251
chore(core): update core to C++17
...
- use utfcodec.hpp's convert<>() instead of codecvt
Fixes : #8800
2024-05-08 16:41:30 -05:00
Steven R. Loomis
6706ae0957
chore(core): km_core_cp -> km_core_cu
...
- km_core_cp represents a 16 bit code unit, not a code point.
Fixes : #11033
2024-05-02 17:39:15 -05:00
Steven R. Loomis
44f0dea3cd
Merge branch 'fix/core/10955-reset-on-frame' into fix/core/10955-double-marker-on-delete
2024-04-25 16:59:30 -05:00
Steven R. Loomis
fa1fd75157
fix(core): ldml fix for multiple marker deletion
...
- current code only deletes a single marker and falls through
- update the ldml test code, get rid of 'expected character' backspace logic (now that we have context object)
- update test cases
2024-04-25 16:59:20 -05:00
Steven R. Loomis
cd867ba801
fix(core): update vkey_should_invalidate_context per comment
...
Fixes #10955
2024-04-25 08:58:47 -05:00
Steven R. Loomis
ba8dcad949
Apply suggestions from code review
...
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-04-24 08:22:41 -05:00
Steven R. Loomis
f77bbb2418
fix(core): update state_should_invalidate_context
...
- don't invalidate on keyup
- don't check context()->empty()
- clean up structure and comments
Fixes : #10955
2024-04-18 10:34:21 -05:00
Steven R. Loomis
dc965f4e1a
fix(core): ldml backspace processing should delete all markers
...
- current code would only delete a single marker and fall through
- should loop consuming all markers until a non-marker char is hit
2024-04-18 08:57:19 -05:00
Steven R. Loomis
4f2ef499ea
fix(core): update core to handle reset context
...
- clear the app context as well as the cached context
Fixes : #10955
2024-04-17 10:31:33 -05:00
Steven R. Loomis
37530acb14
fix(core): update core to handle reset context
...
- fix range check vk to use a static instead of c++17 function
2024-04-15 20:32:49 -05:00
Steven R. Loomis
4f8c9eb983
fix(core): update core to handle reset context
...
- range check vk
- split modifier test out to separate function
2024-04-15 10:49:41 -05:00
Steven R. Loomis
bd10290af3
fix(core): update core to handle reset context
...
- fixup comment
2024-04-11 23:34:20 -05:00
Steven R. Loomis
46239c6a96
Update core/src/state.hpp
...
Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2024-04-11 22:27:02 -05:00
Steven R. Loomis
9ca4e99fb7
fix(core): update core to handle reset context
...
- mark event flags as unused for now
Fixes : #10955
2024-04-08 09:35:35 -05:00
Steven R. Loomis
51c93acb38
fix(core): update core to handle reset context
...
- it was the check for deletion that was unneeded
Fixes : #10955
2024-04-05 18:33:37 -05:00
Steven R. Loomis
11b07128b8
fix(core): update core to handle reset context
...
- reset for ctrl or alt modifiers, but NOT for key-up
Fixes : #10955
2024-04-05 18:23:39 -05:00
Steven R. Loomis
a455c5b95b
fix(core): update core to handle reset context
...
- updates to debug_api test for rearranged items
- try to rearrange the action queue to match prior behavior
Fixes : #10955
2024-04-05 16:31:23 -05:00
Steven R. Loomis
55483e4ccc
fix(core): update ldml test source to handle reset
...
- correct invalidate logic
Fixes : #10955
2024-04-05 14:42:52 -05:00
Steven R. Loomis
628d13d7a6
fix(core): core to automatically reset context if a frame key pressed
...
- update comments per review
Fixes : #10955
2024-04-05 12:05:57 -05:00
Steven R. Loomis
f1b0d8c837
fix(core): core to automatically reset context if a frame key pressed
...
- move the reset table into its own cpp
- update function signatures per review comments
Fixes : #10955
2024-04-05 11:58:47 -05:00
Steven R. Loomis
c91095f0ca
fix(core): core to automatically reset context if a frame key pressed
...
- update ldml test with an exception for k_102_keytest
2024-04-04 17:12:26 -05:00
Steven R. Loomis
2c4d8e34e3
fix(core): skip leading trail surrogate char in km_core_state_context_set_if_needed()
2024-04-04 12:02:17 -05:00
Steven R. Loomis
5b1c853557
fix(common,core): support other lookup for modifiers
...
- the 'other' keyword was incorrectly called 'default'
Fixes : #11072
2024-04-01 23:21:33 -05:00
Steven R. Loomis
ae6f7b5d78
chore(core): support default lookup for modifiers
...
- fix spec
Fixes : #11072
2024-03-29 12:38:18 -05:00
Steven R. Loomis
bca037cbf3
chore(core): support default lookup for modifiers
...
- remove default flag from kmx_file.h
Fixes : #11072
2024-03-29 12:07:29 -05:00
Steven R. Loomis
89f5a0e090
fix(core): support default lookup for modifiers
...
Fixes : #11072
2024-03-28 13:12:01 -05:00