Commit graph

955 commits

Author SHA1 Message Date
rc-swag
96da136a95
Merge pull request #5443 from keymanapp/feat/windows/keyman-core-integration-2
feat(windows): Keyman Core integration 🥑
2021-09-30 10:54:17 +10:00
Marc Durdin
1b16a0d957
Merge pull request #5746 from keymanapp/fix/developer/5702-shift-6-ampersand
fix(developer): move ampersand to shift+7 on touch
2021-09-30 06:09:24 +10:00
Marc Durdin
c0ac074618
Merge pull request #5720 from keymanapp/fix/developer/5327-touch-remove-empty-rows
fix(developer): remove empty touch rows on save
2021-09-29 07:38:31 +10:00
rc-swag
b71fde66f9
Merge branch 'master' into feat/windows/keyman-core-integration-2 2021-09-27 21:40:22 +10:00
Marc Durdin
d4b9f18106 fix(developer): move ampersand to shift+7 on touch
Fixes #5702.

On the phone layout for two templates, ampersand (`&`) was on Shift+6
instead of on Shift+7.
2021-09-24 14:01:24 +10:00
Marc Durdin
6b8d941f9e chore: add KeymanDeveloperPaths to kmcomp project 2021-09-21 06:45:26 +10:00
Marc Durdin
e6190ee05f fix(developer): run kmlmc from Keyman source path
Makes it possible to run the kmlmc.cmd compiler wrapper script from
Keyman Developer while debugging from source.

Adds a new class `TKeymanDeveloperPaths` which is similar to
`TKeymanPaths`, to provide a future single location for all Keyman
Developer path-related functions. There are a number scattered through
the source at present, e.g. in `RedistFiles.pas`, so this is just a
starting point.
2021-09-21 06:25:35 +10:00
Marc Durdin
ffd66e32e1
Merge pull request #5697 from keymanapp/fix/developer/5013-debugger-ralt-not-working
fix(developer): support chiral modifiers in debugger 🐞
2021-09-20 16:12:47 +10:00
Marc Durdin
41a9e8c26d
Merge pull request #5696 from keymanapp/feat/developer/5695-debugger-track-set-option-value
feat(developer): track changes to option values better in debugger 🐞
2021-09-20 16:12:39 +10:00
Marc Durdin
6de2238a25 fix(developer): remove empty touch rows on save
Fixes #5327.
2021-09-20 09:15:09 +10:00
Marc Durdin
838693d132
Merge pull request #5647 from keymanapp/feat/developer/debugger-keyboard-options
feat(developer): Debugger keyboard options 🐞
2021-09-17 10:11:29 +10:00
Marc Durdin
7295ea9af3
Merge pull request #5640 from keymanapp/feat/developer/debugger-platform-option
feat(developer): Debugger platform option 🐞
2021-09-17 10:10:53 +10:00
Marc Durdin
72e6188192 fix(developer): support chiral modifiers in debugger
The ralt, rctrl, lalt, lctrl modifiers were not working correctly
in the debugger.

Relates to #5013.
2021-09-15 15:55:42 +10:00
Marc Durdin
cec8d11759 feat(developer): track changes to option values better in debugger
Fixes #5695.

When the debugger is in single-step mode, reflects the value of option
stores at the time of the change rather than at the beginning of the
batch.
2021-09-15 15:29:44 +10:00
Marc Durdin
564a8a019a chore(developer): Merge branch 'feat/developer/debugger-platform-option' into feat/developer/debugger-keyboard-options 2021-09-14 14:18:39 +10:00
Marc Durdin
207bf84fd9 fix(developer): iOS platform is touch not hardware 2021-09-14 06:24:37 +10:00
Marc Durdin
4aeb06f98d feat(developer): handle form factor in platform options 2021-09-13 15:51:20 +10:00
Marc Durdin
bab345cb65 chore(developer): Merge branch 'master' into fix/developer/5577-import-from-layout-dirty-flag 2021-09-13 12:27:12 +10:00
Marc Durdin
36c21657e2 fix(developer): ensure file modified after import from layout
Fixes #5577.

This ensures that the touch layout file is marked as modified after
running Import From Layout in Keyman Developer, so that changes are
not lost when you save.
2021-09-10 14:19:47 +10:00
Marc Durdin
986743b05e chore(developer): fixup merge issue 2021-09-10 12:02:16 +10:00
Marc Durdin
8dffc75e00
Merge branch 'feat/developer/debugger-platform-option' into feat/developer/debugger-keyboard-options 2021-09-10 10:48:29 +10:00
Marc Durdin
e1bcf00117 chore(developer): Merge branch 'fix/developer/5648-debugger-include-keyman-core' into feat/developer/debugger-keyboard-options 2021-09-10 10:44:10 +10:00
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
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
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
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
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
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
Marc Durdin
4ed4aeebf6 refactor(developer): keyman core library path 2021-08-04 12:46:07 +10:00
Marc Durdin
63f8137005 refactor(developer): rename and move debugging.pas
Removes a lot of unused functions and one unit. Cleanup for debugging.
2021-08-04 09:44:56 +10:00
Marc Durdin
90c8252370 refactor(developer): visual keyboard import
Refactors visual keyboard import from kmx to use Keyman Core, and at the
same time removes any UI interactions or direct Windows dependencies
from the process.
2021-08-04 07:44:18 +10:00
Marc Durdin
c5eb0a4d3f feat(developer): refactoring debugging code 2021-08-03 17:06:31 +10:00
Marc Durdin
bdea4279f1 refactor(developer): debugger/core integration 2021-08-03 06:22:34 +10:00
Ross
7a9ee207a8 feat(windows): update project include paths for core 2021-08-02 13:13:03 +10:00
Marc Durdin
ed73d5667b chore: add variable docs 2021-07-30 15:27:12 +10:00
Marc Durdin
5f2caba964 fix(developer): compiler use and match behavior for Web should be same as Core
Fixes #5440.

Currently, the behavior of `use()` and `match` for KeymanWeb compiled
keyboards is not identical to the Windows (or Core) behavior. The
example keyboard in #5440 generates 'foo' instead of 'abc' on web.

This fixes that by ensuring that `match` is not called when `use()` is
found in a group rule match.
2021-07-30 14:46:13 +10:00