Commit graph

3486 commits

Author SHA1 Message Date
Marc Durdin
f022a121df chore(developer): Merge branch 'fix/developer/5648-debugger-include-keyman-core' into feat/developer/debugger-platform-option 2021-09-10 10:43:44 +10:00
Ross
a90a99784a feat(windows): cast size_t to int for list size 2021-09-07 12:00:34 +10:00
Marc Durdin
aac9c284f2 chore(windows): temp skip version info check for kmnkbp0-0 2021-09-06 06:56:11 +10:00
Ross
8719a27ee9 feat(windows): add save and restore options
Add save and restore methods for saving and restoring
keyboard processor options.
2021-09-03 13:45:18 +10:00
Ross
5ffb136acf feat(windows): Added UpdateKeyboardOptions
This functions was to update the keyboard options in the
windows engine with the current options in the core

However it is not needed as first thought. This is because the options
will not be updated in first Non updatable call kmtip. This is due to
the fact the actions will not be processed. A variation on the current
core implementation. I am still pushing the branch as the unit test will
be usefull.
2021-09-02 11:57:44 +10:00
Ross
e125736e0e feat(windows): Update all TODOs with Issue numbers 2021-08-30 10:18:57 +10:00
Marc Durdin
5b9e49ce4e chore: sign kmnkbp0-0.dll 2021-08-27 17:22:23 +10:00
Marc Durdin
fbdbf65553 chore(developer): build core with developer 2021-08-27 16:24:44 +10:00
Ross
0663fcbeb7 feat(windows): Add unit tests for process actions 2021-08-27 14:18:14 +10:00
Marc Durdin
adc2509c5c fix(developer): include Keyman Core in Keyman Developer
Fixes #5648.

Includes kmnkbp0-0.dll in the installer for Keyman Developer.
2021-08-27 13:22:19 +10:00
Marc Durdin
3d488c4ead feat(developer): Debugger keyboard options
Fixes #5642.
Relates to #5013.

This adds support for viewing and setting keyboard options in the
debugger. This initial implementation does not have 100% coverage of
keyboard options; specifically:

1. keyboard options are not saved between debug sessions.
2. in single-step debugging, the keyboard options will be shown as
   updated at the start of a keystroke batch, not when the rule which
   calls `set()` is fired. This level of granularity is not currently
   visible from the engine. It does not impact the correctness of the
   rule processing, only the view of the current state of the keyboard
   option.

I do not anticipate supporting either of those functions in 15.0.

This commit renames the existing `TfrmDebugStatus_Options` to
`TfrmDebugStatus_Platform`. I had originally planned to show both the
platform and keyboard options in the same debug status window, but for
space reasons I have split them. (I'm sorry if this makes reading the
PR a little more challenging.)

There is a significant amount of rewriting of kmxfileutils.pas and
debugkeyboard.pas. This extends support for working with kmx files and
modernises the code (e.g. using generics for list types).

Note in particular the `ExpandSentinel` function in kmxfileutils.pas.
This is copied from CompileKeymanWeb.pas but has different internal
references, so cannot be used as-is -- CompileKeymanWeb works with
intermediate object 'files' from the kmx compiler, whereas the debugger
works with final binary .kmx files which have a different in-memory
layout. It may be possible to unify this in future but that would
involve additional risk. (Seriously, I would probably prefer to rewrite
CompileKeymanWeb.pas in C++, Rust or TypeScript than to invest in
merging these two use cases.)
2021-08-27 11:07:00 +10:00
Marc Durdin
1f6aac7fd7 feat(developer): Debugger platform option
Relates to #5013.

Adds a debug status page to allow the user to select an alternative
platform so they can debug rules relating to those platforms which
are constrained by the `platform()` statement in the keyboard source.

Note that while touch platforms are listed here, there is not yet any
method of activating touch key events (e.g. `[T_foo]`). This
functionality is planned for a future update.
2021-08-26 10:12:57 +10:00
Ross
a4801373db feat(windows): err logs, DEBUG_ASSERT macro
Added some more error logs
Added a DEBUG_ASSERT macro
Update variable names
2021-08-24 17:17:26 +10:00
Marc Durdin
a820c5cdef
Merge pull request #5597 from keymanapp/fix/developer/5013-debug-f6-and-focus
fix(developer): F6 in debugger and cef focus 🐞
2021-08-24 12:17:04 +10:00
Marc Durdin
fa20ed06a4
Merge pull request #4172 from keymanapp/chore/windows/sentry-tool-param-file-support
chore(windows): sentrytool param file support
2021-08-24 12:16:58 +10:00
rc-swag
aab8cb178c
fix(windows): apply suggestion changes core integration review
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-08-23 09:51:10 +10:00
Marc Durdin
6b0058f5e7
Merge pull request #5595 from keymanapp/chore/developer/5013-debug-events-panel
chore(developer): hide debug events panel 🐞
2021-08-20 10:51:42 +10:00
Marc Durdin
1f4044c497
Merge pull request #5594 from keymanapp/fix/developer/5013-test-mode
fix(developer): get Test Mode working again 🐞
2021-08-20 10:51:32 +10:00
Marc Durdin
485c5d2ee7
Merge pull request #5593 from keymanapp/chore/developer/5013-remove-forcekeyboard
chore(developer): refactor forcekeyboard in debug 🐞
2021-08-20 10:51:23 +10:00
Marc Durdin
3456ec6a8b
Merge pull request #5592 from keymanapp/chore/developer/5013-deadkey-value-1-based
chore(developer): debug deadkey 1-based values 🐞
2021-08-20 10:51:16 +10:00
Marc Durdin
ab9db35c32
Merge pull request #5588 from keymanapp/fix/developer/5013-tidyup
fix(developer): debugger cleanup 🐞
2021-08-20 10:51:06 +10:00
Ross
937bf8a485 feat(windows): review comments 2021-08-19 14:17:34 +10:00
Ross
4350c5a63d feat(windows): review comments rename keyman32-tests 2021-08-19 11:51:31 +10:00
rc-swag
a681f46319
feat(windows): apply review suggestions
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-08-19 09:07:30 +10:00
Marc Durdin
623315ea18
Merge branch 'master' into fix/windows/4549-welcome-in-front 2021-08-19 06:33:20 +10:00
Ross
e2b73af029 fix(windows): rename reg key prefix dw for DWORD 2021-08-18 15:44:45 +10:00
Marc Durdin
3f2ca56a39 fix(developer): F6 in debugger and cef focus
Relates to #5013.

If user presses F6 in the debugger (while not in run mode), will now
switch to editor view, and vice-versa.

Also fixes the inversion of the focus test in CEF so that focus controls
work correctly for web hosts.
2021-08-18 15:28:37 +10:00
Marc Durdin
bb351a7d0b chore(developer): hide debug events panel
Relates to #5013.

Hide the debug events panel by default, and add
a Tools menu item to make it visible for dev purposes
(Ctrl+Shift+click on Tools menu to view).
2021-08-18 09:05:53 +10:00
Marc Durdin
9f0ba213aa fix(developer): null check 2021-08-18 08:31:00 +10:00
Marc Durdin
11043b62c9 fix(developer): get Test Mode working again
Relates to #5013.

This resolves the broken Test Mode with Keyman Core. Previously, Test
Mode just dumped the keyboard into Keyman for Windows, and let it do its
thing. Given that we no longer have the dependency on Keyman for
Windows, the Test window must use Keyman Core to process keystrokes, and
that means there are some differences in how Test Mode operates in 15.0:

* Behind the scenes, the Test mode is just the Debug mode with
  breakpoints and single step disabled, and the Debug Status window
  hidden
* Test mode requires debug information in the keyboard (see note below)
* You can always switch between Test and Debug mode
* Deadkeys are always shown in the debug window

Test Mode now requires debug information to be included in the keyboard
in order for deadkeys to be tracked correctly in the editor. While it
would be possible to remove the need for this, it does not add any
significant benefit to do so -- doing so would mean that the tester
would have less visibility into deadkeys, and complicate the Core
marker tracking in the debug window.

I considered removing Test Mode altogether, but it still feels like a
useful view for playing with a keyboard without all the debugging
paraphernalia cluttering the display. It's a little slower than full
native Keyman for Windows (aka the 14.0 Test Mode), because the debug
hooks are still running in the background, but it is quite usable.

Note the removal of `Application.ProcessMessages`. This resolves the
issue of keystrokes being swallowed by the debugger during
non-interactive debug runs, making rapid input work properly in both
Debug Mode and Test Mode.
2021-08-18 07:46:39 +10:00
Marc Durdin
77dc2ae749 chore(developer): refactor forcekeyboard in debug 2021-08-18 07:02:22 +10:00
Marc Durdin
db0f432b1c chore(developer): debug deadkey 1-based values 2021-08-18 06:24:27 +10:00
Marc Durdin
265d3e0b83 chore(developer): remove unused TDebugEventCursor 2021-08-17 19:13:43 +10:00
Marc Durdin
cbe99922eb fix(developer): debugger cleanup
Relates to #5013.

Before starting on new functionality in the debugger, I wanted to
cleanup a bunch of bits and pieces, including:

1. Correct handling of text selection and deletion
2. Refactor of character grid at bottom of debug window
3. Deadkey realignment after text changes
4. Correct tracking of cursor position between events
5. Handling a few destruction edge cases
2021-08-17 19:04:32 +10:00
Ross
3b3ea6e75b feat(windows): clean up formating 2021-08-17 17:16:56 +10:00
Ross
4bf4106a37 chore(windows): Merge branch 'master' into feat/windows/keyman-core-integration-2 2021-08-17 16:23:38 +10:00
Ross
0f4e3d1768 feat(windows): core saving context null pointer check 2021-08-17 14:10:44 +10:00
Marc Durdin
d90f382499 fix(windows): handle restoring modal dialogs consistently
Fixes #5574.

When a user presses Win+M, Win+D, or clicks the desktop button on the
taskbar, all windows get minimized, even those that do not have the
WS_MINIMIZE flag. Delphi modal dialog forms are not expecting this, and
do not restore correctly later.

This scenario arises only when a form is created with a `nil` owner and
then `form.ShowModal` is called.

The fix was already implemented on Splash and HTML forms, but
differently; I have chosen to use the implementation from the Splash
form as it is simpler and seems to work correctly.
2021-08-17 06:31:31 +10:00
Ross
ae9ba52ab9 fix(windows): meson build for static lib 2021-08-10 17:43:55 +10:00
Marc Durdin
93cc5d45f2
Merge pull request #5513 from keymanapp/feat/developer/5013-keyman-core-debugger-part-1
feat(developer): debugger uses Keyman Core 🐞
2021-08-06 13:43:22 +10:00
Marc Durdin
3faa32b9cd chore(developer): address review comments 2021-08-06 12:49:21 +10:00
Marc Durdin
25f5315970
Merge pull request #5556 from keymanapp/fix/windows/tsysinfo-format-grid
fix(windows): tsysinfo format grid correctly
2021-08-06 07:52:07 +10:00
SabineSIL
b99e98e123
fix(Windows) bug 4833
keyboard installation prompt wordwrap
2021-08-05 21:03:10 +02:00
Marc Durdin
f223fe7780 fix(windows): Welcome should always show in front
Fixes #4549.

The Package Welcome dialog would not always show in front because its
owner could be `nil` in some circumstances.
2021-08-05 17:10:34 +10:00
Marc Durdin
1570d914ca chore(windows): rewrite LoadParamsFromFile 2021-08-05 16:46:09 +10:00
Marc Durdin
ab263a743f chore(windows): sentrytool param file support
The maximum command line length in Windows is 2047 characters. In Delphi
it appears to be 1024 characters. In debugging, I hit that 1024
character limit which was pretty annoying.

So this patch allows us to use an `@file` parameter to put command line
parameters into a text file and read from that instead. It's probably a
little hacked together and could be turned into a class that we could
usefully reuse in all our other command line apps.

I looked around for a generic Delphi solution but did not find an
existing one that was any good.

Low priority, not required for beta, but putting it up because I've done
the work already.
2021-08-05 16:24:30 +10:00
Marc Durdin
39dbd09245 fix(windows): tsysinfo format grid correctly
Minor fix to make the module list format correctly with
chromium browser instead of mshtml, plus a tweak to build
copy xsl files as well to bin
2021-08-05 16:20:20 +10:00
Darcy Wong
4fc408fa90
Merge pull request #5486 from keymanapp/chore/crowdin-update-az
chore(ios,windows): Update crowdin strings for Azerbaijani
2021-08-05 07:51:55 +07:00
Marc Durdin
dbf47eeee3 chore(developer): fix debugkeyboard reference 2021-08-04 13:47:28 +10:00
Marc Durdin
142d0807a3 refactor(developer): move FDeadkeys back into frmDebug 2021-08-04 13:09:32 +10:00