Tim Eves
5429037179
Fix bug #1494 potential for buffer overrun
...
The get/put routines now require the buffer size remaining to be read/written to permit checking and the iterator will update this value whenever iterator comparisions are made. Other direct uses of get/put have been updated.
2019-01-17 17:12:42 +07:00
glasseyes
30be8a13a1
add comment about meson for kmcomp.found
2019-01-03 16:31:40 +07:00
glasseyes
8558a22144
xenial doesn't like files in args
...
Error message is:
"Command line arguments must be strings, files or targets"
even though the arguments are files()
2019-01-03 15:57:18 +07:00
Tim Eves
0514304076
Fix double staged option tests 035 & 036 test correct expected values
2018-12-19 12:36:16 +07:00
Tim Eves
f8f1407fb8
Rfactor options out of class state into virtual methods on abstract_processor
2018-12-19 11:20:28 +07:00
Marc Durdin
8e73a4d729
[Common] Update tests to validate that option persist actions are correctly handled.
2018-12-19 10:45:56 +11:00
Tim Eves
d2e9ef9d49
Enable test support for PERSIST action.
2018-12-18 18:54:06 +07:00
Tim Eves
dfcedcdb6c
Merge branch 'master' into common-refactor-actions-options
2018-12-18 17:27:31 +07:00
Tim Eves
02e2350a43
Merge pull request #1437 from keymanapp/common-refactor-processor-init
...
[wip] [Common] refactor processor init
2018-12-18 17:10:57 +07:00
glasseyes
7e1c076079
put test back and make is use L and R keys
2018-12-18 12:50:41 +07:00
glasseyes
65457bd603
remove test for generic CTRL and ALT
...
which shouldn't be used for input
2018-12-18 12:06:00 +07:00
Tim Eves
86eafe9391
Merge pull request #1427 from keymanapp/common-refactor-path
...
[Common] refactor path
2018-12-18 10:39:46 +07:00
Tim Eves
6c98983155
Implement keyboard option saving test case
2018-12-18 10:16:59 +07:00
Tim Eves
a1766f5405
Enable new kmx tests
2018-12-18 09:45:41 +07:00
Tim Eves
cf28753737
Add extra kmx test keyboards to exercise option processing better
...
Thanks to @mcdurdin for creating those
2018-12-18 09:11:07 +07:00
glasseyes
416aaec057
rename new tests to 038, 039
2018-12-18 08:41:21 +07:00
Tim Eves
57b01ad640
Implement new state API using existing machinery.
2018-12-18 08:39:37 +07:00
Tim Eves
568f1ebcd5
Fix state-api test to use action_item == operator and refactor test build script
2018-12-17 23:41:35 +07:00
Tim Eves
8598daa447
Remove vkey and erased members of action_items union
2018-12-17 23:30:07 +07:00
Tim Eves
0bf44af891
Whitespace, warnings and header tidy ups
2018-12-17 23:28:59 +07:00
Tim Eves
9b9833e9b9
Merge branch 'common-refactor-path' into common-refactor-processor-init
2018-12-17 23:13:52 +07:00
glasseyes
1c2eca06f2
tests for punctuation keys and generic ctrlalt
2018-12-17 20:09:24 +07:00
Tim Eves
35a764ba51
Fix type deduction issue in path::join static function.
...
Will compile on Windows now and switch to normalised paths.
2018-12-17 15:39:10 +07:00
glasseyes
db3e12880b
context for 020 deadkeys and backspace
2018-12-17 10:25:03 +07:00
Tim Eves
18ce72e7c8
Refactor keyboard processor initialisation code.
...
Turn the keyboard class backing the km_kbp_keyboard and km_kbp_keyboard_attr objects into just keyboard_attributes.
Move the abstract_processor and sublcasses as the objects that back km_kbp_keyboard and make keyboard_attrs a member of the asbtract_processor.
Move kmx_processor and mock_processor declarations into their own headers.
Make all vector<km_kbp_option_item> into vector<option> to handle memory management, moving and copying correctly.
Update test cases accordingly
2018-12-17 06:02:22 +07:00
Tim Eves
ca150e099f
Add add path::native() to get system native character type
...
Also normalise path separators from '/' to '\\' on windows and correct
path separator.
2018-12-14 01:59:51 +07:00
Tim Eves
08bab354bd
Add a path handling class since std::filesystem is not reliably available
...
It's not there on Xcode yet and different platforms and compiler put it
into different library files.
2018-12-14 00:50:04 +07:00
Tim Eves
559824a1b7
Replace utf16_to_utf8 with generic utfcodec based string conversion func
...
Templated convert for going between any combination of UTF codecs with
an identity function specialisation for when src & target forms match.
Includes implmentations of json and basic_ostream << operators for
u16string & u32string.
2018-12-14 00:46:54 +07:00
glasseyes
45b89ff5d2
put RALT back into test 000
2018-12-13 12:04:03 +07:00
glasseyes
3f306af8e9
[common] tweak kmx tests for ibus-keyman test
...
handle python compatible /Uxxxxxxxx format for smp
use e.g. [K_A] instead of a in keys:
RALT K_B is ” on an Alt-Gr keyboard so use LALT instead
2018-12-13 12:04:03 +07:00
Marc Durdin
789f166d79
Merge branch 'master' into common-kpapi-kmx-test-harness2
2018-12-06 06:25:44 +11:00
Tim Eves
d985e7b7b7
Add explanatory comments to disabling kmcomp
2018-12-05 17:36:30 +07:00
Tim Eves
f7f1da8267
Fix disabler() being unavailable in meson < 0.45
...
Also handle moved kmn source directory
2018-12-04 17:52:53 +07:00
Tim Eves
b2f56e3072
Make the utf8 to work regardless of km_kbp_path_name defintiion
...
Use template deduction and inlines to allow automatic conversion base on
type rather than system defines.
2018-12-04 17:48:42 +07:00
Tim Eves
b343357ae3
Fixes to get kmx building to work under Windows.
...
Fix encoding issue with refactored kmx.cpp test harness and utf8 to
wchar_t strings conversion.
Fix meson.build so the wine prefix doesn't interfere with running kmcomp
natively on Windows.
2018-12-04 17:48:21 +07:00
Tim Eves
9f98f9c22f
Fixes to get meson to run kmcomp and place output in source dir.
...
This may rebuild a little more frequently than necessary, but not much.
Added support for running kmcomp.exe under wine on non-windows OS only
if wine is available.
2018-12-04 17:48:01 +07:00
Marc Durdin
de6f7d681f
[Common] Add KM_KBP_IT_INVALIDATE_CONTEXT to request that context buffer is flushed
2018-12-04 09:50:33 +11:00
Marc Durdin
8a2b55e58c
[Common] Add support for KM_KBP_IT_EMIT_KEYSTROKE to allow the received key event to be passed on to the application
2018-12-04 09:46:04 +11:00
Daniel Glassey
11639e0236
Merge pull request #1337 from keymanapp/linux-ibus-keyman
...
[Linux] ibus keyman initial work pre kmx keyboardprocessor
2018-11-30 16:26:56 +07:00
Daniel Glassey
f2c983b81b
Merge pull request #1356 from keymanapp/common-kpapi-utf8context
...
[common] add km_kbp_context_items_from_utf8 and to_utf8
2018-11-30 15:05:21 +07:00
Tim Eves
70b6310a19
Fix misnamed km_kbp_context_items_to_utf8 call & add test case.
...
And fix the type of the buffer to match the type in the definition.
Co-Authored-By: Daniel Glassey <glasseyes@users.noreply.github.com>
2018-11-30 15:02:07 +07:00
Tim Eves
4667c5bf84
Add all the missing files that should have been in the preceding commit
...
Co-Authored-By: Daniel Glassey <glasseyes@users.noreply.github.com>
2018-11-30 14:46:54 +07:00
Daniel Glassey
e0cee2b8ae
Merge branch 'master' into linux-ibus-keyman
2018-11-30 09:37:07 +07:00
glasseyes
ca27f40673
warning reminder to copy compiled keyboards
2018-11-30 09:32:59 +07:00
glasseyes
83b0fc4eb5
missing endforeach
2018-11-29 15:48:24 +07:00
glasseyes
a75ce4106b
change kmx test to accept 2 arguments
...
'kmn' and either source root or build root
2018-11-29 15:29:23 +07:00
glasseyes
6c3bb00f41
revert kbp changes apart from prog_kmcomp check
...
they will be in another PR
2018-11-29 13:03:41 +07:00
Marc Durdin
319d5a800a
[Common] Ignore kmcomp if not present and use prebuilt kmx files for tests
2018-11-28 06:28:45 +11:00
glasseyes
337e1ac5d0
Merge branch 'master' into windows-refactor-kmprocess-for-kpapi-daniel
2018-11-27 13:21:19 +07:00
Marc Durdin
e19cf983cb
Merge branch 'master' into windows-refactor-kmprocess-for-kpapi
2018-11-26 11:56:52 +11:00