Commit graph

614 commits

Author SHA1 Message Date
Marc Durdin
c0e640fe73
Merge pull request #7710 from keymanapp/chore/windows/keyman-debug-symbols
chore(windows): include debug info in keyman build
2022-11-14 11:57:26 +11:00
Marc Durdin
1efe89b946
Merge pull request #7707 from keymanapp/chore/windows/report-errors-for-cust-init-better
chore(windows): Add safecall for internal CustomisationStorage API interface
2022-11-14 11:57:19 +11:00
Marc Durdin
2e58174092 chore(windows): include debug info in keyman build
Same as #7600, but for keyman.dpr.
2022-11-14 10:52:20 +11:00
Marc Durdin
ce93901a5f chore(windows): Add safecall for internal CustomisationStorage API interface
This makes it easier to track what is happening for errors where
otherwise we found that exception messages were being cropped; for
example, see KEYMAN-WINDOWS-X.

The error messages were being cropped because the exception handler was
in the exe module, but the exception was being raised in kmcomapi
module. When the exception was handled, the handler tested to see if
the exception object inherited from exemodule.Exception, but it was
inheriting from kmcomapi.Exception instead, and so it did not attempt
to load the message detail.

By adding `safecall` calling convention to `KeymanCustomisation`, we
move responsibility for handling the exception to the
`TKeymanAutoObject.SafeCallException` function, and we get full detail
for the exception.
2022-11-14 09:40:14 +11:00
Marc Durdin
0eb39dc9ea fix(windows): click in 1 pixel high box in Language Switch window caused crash
Fixes #7698.

Due to a `>` instead of a `>=` check, there was a one pixel high box at
the bottom of each list of input methods for each language which would
reuslt in an invalid value for `FNewHoverKeyboard`
(`lang.KeyboardCount`).

As well as fixing this, I changed the result for clicking below the
input method list to the more logical last item in the list rather than
the first.
2022-11-12 10:23:32 +11:00
Marc Durdin
52c9fde57a
Merge pull request #7667 from keymanapp/fix/windows/base-layout-support-in-core
fix(windows): base layout support in Keyman Core
2022-11-11 06:37:39 +11:00
Marc Durdin
4738b6a514 fix(windows): Improve shutdown robustness
Relates to KEYMAN-WINDOWS-B.

While this doesn't address the root cause of the exception, it should
prevent this unhandled exception, and adds breadcrumbs to help us see
which code path might be triggering the issue.
2022-11-10 16:10:49 +11:00
Marc Durdin
b087d22928 fix(windows): base layout support in Keyman Core
While Keyman Core already supported the base layout flags, they were not
being passed in from Keyman Engine for Windows. This meant that any
rules that used `baselayout` would fail, such as in sil_ipa with AltGr+0
for }

0bf72bed74/release/sil/sil_ipa/source/sil_ipa.kmn (L348-L350)

This patch adds support for the following properties:

* KM_KBP_KMX_ENV_BASELAYOUT: the legacy base layout name, e.g. kbdus.dll
* KM_KBP_KMX_ENV_BASELAYOUTALT: the BCP 47 base layout name, e.g. en-US
* KM_KBP_KMX_ENV_SIMULATEALTGR: whether the user has selected to emulate
  AltGr with Ctrl+Alt, for example on laptops without a right alt key.
* KM_KBP_KMX_ENV_BASELAYOUTGIVESCTRLRALTFORRALT: whether the system base
  layout in use generates Ctrl+RAlt when RAlt is pressed, which can be
  true for many European system layouts. This is necessary when
  associating the keyboard with a European language because the base
  keyboard becomes the language's default keyboard, rather than kbdus.
2022-11-10 11:26:44 +11:00
rc-swag
51e6dd8543
chore(windows): apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-10-27 09:03:22 +10:00
Ross
102f34ecb0 feat(windows): convert wm keyevent and to private wm user message
wm_keyman_keyevent and wm_keyman_modifierevent have been convert to use
the WM_USER message range and no longer global message
2022-10-26 15:34:12 +10:00
rc-swag
65696d85f1
fix(windows): review comments for code comment
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2022-10-14 18:33:12 +10:00
rc-swag
b6722f6a0a
fix(windows): Add review suggestions
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-10-14 16:14:51 +10:00
Ross
90eb7c77ec fix(windows): ensure all modifier events go to seralized queue 2022-10-13 13:24:29 +10:00
rc-swag
f8a0397fb3
docs(windows): apply review suggestions
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-09-12 10:38:43 +10:00
Ross
e406018267 docs(windows): add steps for using testhost debugging 2022-09-12 10:20:49 +10:00
Marc Durdin
30ccee63e8
Update windows/src/engine/keyman32/tests/keyman-engine-tests/kmprocessactionstests.cpp
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2022-09-10 06:20:48 +10:00
Ross
fc57b3d8e4 fix(windows): fix includes and dep for unit test proj
Also add a test for surrogate backspace
2022-09-09 16:10:57 +10:00
Ross
90851ad311 fix(windows): TSF apps delete all of smp
When the windows platform recieves the action for a backspace
it will check to see if the character being delete is a surrogate
pair. If it is and the app is TSF aware app it will need to backspace
twice to remove both parts of the surrogate pair. For legacy apps this
is not required.
2022-09-08 22:28:35 +10:00
Ross
04a0f5a32f fix: grammar and typos 2022-08-22 13:42:31 +10:00
Ross
ecad0209cb fix: Add invalidate context action to non-updatable parse
Rename ProcessActionsTestParse to NonUpdatable parse. It does
more then just test. Add handling for the invalidate context action
to this parse, so that if we emit a keystroke we invalidate the context
2022-08-22 11:51:01 +10:00
Ross
f2fe3b1693 fix: remove saving and restoring context kbd options
Remove the saving of context and keyboard options
on the non updateable call to process hook.

The windows Text Input Processor calls twice one call
is not updateable. With the core integeration we run
the processor only once, preserving the actions and
context to be applied on the updatable call.
2022-08-17 11:39:16 +10:00
Marc Durdin
b1b097b659 chore(windows): update include paths 2022-08-11 14:30:15 +02:00
Marc Durdin
35adc5b970
Merge pull request #6630 from keymanapp/chore/developer/js-to-lmc
chore(developer): rename developer/js to developer/kmlmc 🎢
2022-07-06 05:42:19 +10:00
Marc Durdin
f639a95e55 fix(windows): show full version number
Updated various places in Keyman for Windows to show the full
VersionWithTag rather than the short version number we had been
previously showing:

- Support tab
- System Information, About dialog
2022-06-29 11:03:41 +10:00
Marc Durdin
4f36c3c2df chore(developer): Merge branch 'master' into chore/developer/js-to-lmc 2022-06-25 05:48:57 +10:00
Marc Durdin
385045e978 chore(windows): fixup refs and move StockFileNames
* StockFileNames.pas was missed in earlier moves.
* Cleaned up references in various dproj files
* Fixed up broken references to common files
2022-06-23 09:47:59 +10:00
Marc Durdin
8cbebf7ade chore(windows): move general package units to common 2022-06-23 06:36:23 +10:00
Marc Durdin
2aaa31eae2 chore(windows): move general keyboard units to common 2022-06-23 06:33:16 +10:00
Marc Durdin
7895cf2382 chore(windows): move utilicon.pas to common 2022-06-22 14:03:19 +10:00
Marc Durdin
331c9d2d71 chore(windows): move shared general units to common 2022-06-22 13:58:58 +10:00
Marc Durdin
eba8a4ab35 chore(windows): move CRC32.pas to common 2022-06-22 10:36:55 +10:00
Marc Durdin
46c314cbb7 chore(windows): move BCP47Tag.pas to common 2022-06-22 10:35:18 +10:00
Marc Durdin
092c149f31 chore(windows): delete unused WideStringClass.pas 2022-06-21 09:55:52 +10:00
Marc Durdin
34d3ea5899 chore(windows): delete unused MLang.pas 2022-06-21 09:51:02 +10:00
Marc Durdin
9c02dfb67c chore(windows): delete unused IntegerArray.pas 2022-06-21 09:46:57 +10:00
Marc Durdin
7583fa64fe chore(windows): delete unused exceptionw.pas 2022-06-21 09:46:01 +10:00
Marc Durdin
9dbe33e36e chore(windows): move KeymanVersion.pas to common and update refs 2022-06-21 09:39:04 +10:00
Marc Durdin
ad4039b5db chore(windows): move RegistryKeys.pas, ErrorControlledRegistry.pas, Glossary.pas, ScanCodeMap.pas to common 2022-06-21 09:39:03 +10:00
Marc Durdin
f163ceb6d5 chore(windows): move Unicode.pas to common 2022-06-21 09:39:01 +10:00
Marc Durdin
ff9a4c5edb chore(windows): move GetOSVersion to common 2022-06-21 09:39:00 +10:00
Marc Durdin
9db6293b84 chore(windows): move usp10 to common 2022-06-21 09:38:59 +10:00
Marc Durdin
58230160b0 chore(windows): move CleartypeDrawCharacter to common 2022-06-21 09:38:58 +10:00
Marc Durdin
4a15809ae1 chore(windows): move PaintPanel to common 2022-06-21 09:38:57 +10:00
Marc Durdin
4b2fa6cc05 chore(windows): move keybtn and onscreenkeyboard to common
Components are related so moved together.
2022-06-21 09:38:56 +10:00
Marc Durdin
636cbc0469 chore(windows): update refs to FixedTrackbar 2022-06-21 09:38:55 +10:00
Marc Durdin
7ff83dcc1f chore(windows): move ExtShiftState to common 2022-06-21 09:38:52 +10:00
Marc Durdin
ba642cf06d chore(windows): rearrange global/delphi/ui units
Moves:
* Keyman.System.Util.RenderLanguageIcon.pas -> common
* UfrmKeymanBase.dfm -> kmshell
* UfrmKeymanBase.pas -> kmshell
* UfrmWebContainer.dfm -> kmshell
* UfrmWebContainer.pas -> kmshell
* XMLRenderer.pas -> kmshell
* UFixupMissingFile.pas -> kmshell

Also:
* Removes duplicate GenericXMLRenderer.pas
* Removes unused unit references in keyman.dpr
2022-06-13 10:01:39 +10:00
Marc Durdin
1eff4dbca4 chore(windows): move global/delphi/visualkeyboard to common 2022-06-13 06:57:46 +10:00
Marc Durdin
6a56fca2d6 chore(windows): move global/delphi/tlb to common 2022-06-13 06:29:23 +10:00
Marc Durdin
cbda56f3e5 chore(windows): move global/delphi/standards to common 2022-06-13 06:15:47 +10:00