* 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.
Add a bool to the KeymanGetContext call, allowing the windows engine
to make the decistion to emit backspace key stroke when text is
selecting allowing the application to make the correct decision on
how to handle it. Usually deleting the selected text.
Updated the call stack to keep a const string for the value parameter
being written to registry.
SaveKeyboardOptionCoretoRegistry calls
IntSaveKeyboardOptionCoretoRegistry which calls
RegistryFullAccess::WriteString which calls
RegSetValueExW, which takes a const data parameter.
keyman64.h is now only used by keyman32/keyman64. Shared components have
been moved to legacy_kmx_memory.h - KMX structures in-memory, as used by
kmanalyze, kmdecomp.
Removed unnecessary references to keyman64.h from kmtip.
Also removed aiDebugger.* which are obsolete files.
One day in the future, we could merge keyman64.h with keymanengine.h.
* moved ConvertUTF.h -> common/windows/cpp/include
* moved crc32.h -> common/windows/cpp/include
* moved keymansentry.h -> common/windows/cpp/include
* moved registry.h -> common/windows/cpp/include
* moved unicode.h -> common/windows/cpp/include
* moved xstring.h -> common/windows/cpp/include
and updated corresponding references. Deleted a bunch of old references
to missing headers from .vcxproj files. Updated vkeys.h and vkeys.cpp
references in .vcxproj to use $(KEYMAN_ROOT) instead of relative paths.
Moves vkeys.h to common, turns it into a proper header and adds
corresponding vkeys.cpp so that we don't include the data multiple times
in a project.
Removes duplication of vkeys.h in kmcmpdll and global/inc.
Updates all projects to reference the common files, except kmdecomp,
coming in the next commit, as it is more complex.
The name compiler.h was misleading, so renamed to legacy_kmx_file.h, as
it largely describes .kmx files. There are two declarations in the file
which are specific to kmcmpdll, at the bottom of the file, but
everything else is all related to the .kmx file format. (We may move
those in a future update to kmcmpdll, but that should wait until the
kmcmpdll cross-platform refactor is complete.)
Moved to common/windows/cpp/include/ because it is used by both
Developer and Windows projects.
Where possible, removed redundant references, as compfile.h includes
legacy_kmx_file.h anyway.
While it may be smarter to move to a different build system altogether,
it is also a *lot* more work. This was a fairly minor syntax refresh to
get nmake working with our existing Makefile system. This is now no
longer compatible with Borland make, so you will need to use `nmake` to
build.
The presence of NMAKE.md informs builds systems that nmake should be
used instead of make.
We no longer need to backup debug files as they are saved to the symbol
store during a release build. This reduces the amount of storage
required for a release build and should speed up the build also.
Also fixes the broken build where backup had not been updated for the
new consistent build paths.
Move to all projects using bin/ and obj/ for outputs, and
cleanup all Makefiles and project files accordingly. Remove
some obsolete projects along the way. Cleanup .gitignore
also.
Fixes#4965.
When speech recognition is enabled, it sometimes activates after a
Keyman keyboard is selected. This would cause Keyman to think it is
being deactivated. We needed to check in
`CKMTipTextService::OnActivated` that it was a keyboard-type TIP that
was being activated, and only deactivate the Keyman hooks in that
situation.
This commit also adds a little logging helper function, and removes an
unused variable `guidActiveProfile`.
If the registry setting `HKCU\Software\Keyman
Engine\Debug:Flag_UseAutoStartTask[REG_WORD]` is not `0`, then the this
will enable the restart task. Otherwise, all aspects of it are disabled.
For Keyman 14.0 initial release, we will have this flag disabled. If we
can improve stability of it, we'll consider turning it on.
Fixes#4557.
When focus changes, we need to re-run `_PreserveAltKeys` as settings may
have changed, meaning we have to preserve a different set of keys. I
also made the `_PreserveAltKeys` function idempotent so that we don't
have to worry about cleanup before calling it -- by calling the cleanup
function internally instead.
Fixes#4003.
This addresses the majority of locations where we use the name "Keyman
Desktop" in code. There will be some filenames and paths that do not
change at this point -- particularly at a source level. For now, the
focus is on the user interface changes.
While making these changes, I also made the VERSION and MANIFEST
resources more consistent.
This is the first half of a two-part update to Keyman for Windows. There
are two significant changes here. These changes apply to
keyman32/keyman64, as well as kmtip/kmtip64, but will refer to the
32-bit equivalents for simplicity:
1. Instead of using `GetProcAddress` to connect to keyman32.dll, we
now have an import library connection. This removes one particularly
suspect piece of architecture for Keyman, as using `GetProcAddress`
could lead to a race condition, where keyman32.dll is unloaded after
that function is called but before we use the handle. This makes the
kmtip.dll build dependent on keyman32.dll; loading kmtip.dll (by
selecting a Keyman input method) also loads keyman32.dll.
2. It's not enough (yet) to load kmtip.dll. We also need to be running
keyman.exe itself, due to global hooks that we still require (it may
be possible, one day, to avoid these, but it doesn't look very
hopeful). To that end, kmtip calls new function `TIPIsKeymanRunning`
to check whether keyman32.dll is initialised (and hence keyman.exe
has initialised it). Then, if keyman.exe is not running, it issues an
event to the Windows Event Log, which we will pick up with a
scheduled task in the next PR.
The first part of this is an architectural change which may lead to some
change in behaviours, as keyman32.dll now may not be unloaded from a
process when keyman.exe exits, due to the lock that kmtip.dll now has on
it. It will be important to test this (@MakaraSok) by running through
various startup and shutdown scenarios. In my initial testing, I found
that there were some situations after restarting keyman.exe where I
needed to switch in and out of the Keyman TIP, but those were not all
critical.
This change also lays groundwork for an eventual ability to run the
Keyman input method without keyman.exe running, which will be helpful
e.g. on login screen, even if missing certain additional functionality
such as the serialised input queue.