Commit graph

31 commits

Author SHA1 Message Date
Marc Durdin
643ebca530 refactor(windows): merge keyman64 build into keyman32
Merges the build settings for keyman64.dll vc++ project into the
keyman32.dll project, so they are both built from the same project, in
preparation for ARM support, to minimize repetition in the source tree.

There should be no material differences to the built libraries.

Also cleans up some noise in keyman32.vcxproj which made it easier to
verify the changes.

Fixes: #11904
2024-07-02 17:00:38 +10:00
rc-swag
f7391e3a46 chore(windows): add debug log msgs for modifier key press
add debug log messages in the code that processes modifier
key presses. Will be usefull debuging issues with the
seralized event server and modifer keys.
2024-06-03 21:40:24 +10:00
rc-swag
6669d232a6
fix(windows): extra bracket after removing nested if
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-12-21 16:07:17 +10:00
Ross
2c02d34746 fix(windows): modifer event is always serialized
PR #7449 added modifier event to make ensure modifer events
where sent to the serializer even if the key stroke was determined
the key stroke did not need seralizing. However, a logic error was made
trying to use the exiting 'Flag' however this was not set in the
!UseCachedHotkeyModifierState case. This change adds helper function
to simply check if the key is a modifier key and send it to the
event seralizer in that case. Separating from the other logic which
is more concerned with handling hotkeys.
2022-12-21 14:09:35 +10: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
4c3d81db86
Merge pull request #6392 from keymanapp/fix/windows/5996/no-keystrokes-emoji-input
fix(windows): framework for switching of pipeline
2022-04-08 16:16:34 +10:00
Ross
31138ecdbc fix(windows): put correct HK_ALT flag for modifier 2022-03-24 16:20:12 +10:00
rc-swag
4f218e7d6f
fix(windows): apply review comments as batch
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-03-23 15:07:10 +10:00
rc-swag
fec2120b2e
fix(windows): address review comments 2022-03-22 13:37:33 +10:00
Ross
dbc950741a fix(windows): change variable name add comments 2022-03-18 14:41:26 +10:00
Ross
d58a8c97d8 fix(windows): add threat check 2022-03-18 08:25:45 +10:00
Ross
be333860f0 fix(windows): framework for switching of pipeline
We want to be able to switch of the seralized pipeline if a keyman
keyboard is not active. To do this we need to store this information
in a way the seralized thread can get the information.
2022-03-17 13:02:50 +10:00
Marc Durdin
733d112d05 fix(windows): swap default for flag 2021-05-29 16:16:14 +10:00
Marc Durdin
9fbcc3fd7b fix(windows): avoid cached hotkey state 2021-05-29 15:41:35 +10:00
Marc Durdin
5c8d21b204 fix(windows): hotkeys correctly ignore right modifier keys
Fixes #4619.

The hotkey check in keyman32 would ignore right modifier keys, but the
behaviour was not quite right: it actually needs to take the modifier
into account, but just not treat it as a valid modifier.

While fixing this, I noticed that some of the tests in the
`KeyLanguageSwitchPress` function were using the wrong modifier flags. I
wish I had fewer different modifier flag sets but that ship has probably
sailed.
2021-03-09 16:02:14 +11:00
Marc Durdin
3e9f397b27 chore(windows): small cleanups
1. Remove unused variables
2. Remove invalid build configurations
3. Move hotkey checks before touch keyboard panel check, so hotkeys
   still work when touch panel is active; the touch keyboard panel check
   is there to disable serialised input which conflicts with it.
2020-10-28 10:27:24 +11:00
Marc Durdin
1ebe2f5fa1 fix(windows): Windows touch keyboard would cancel on each keystroke
Fixes #2450. When Keyman serialized input, it would cause the touch keyboard to cancel
because the touch keyboard thought the received event meant the user was touching the
physical keyboard. This resolves that problem, using a watch timer to check the visibility
of the touch input panel.
2020-02-04 16:18:18 +11:00
Marc Durdin
9209adb45d refactor(windows): cleaned up hotkey change code
Just refactoring minor bits and pieces on this PR. Esp: removed the
unnecessary interrogation of TSF (yay!) and cached the debug flag so it
isn't checked on every single keystroke.
2019-11-20 06:47:44 +11:00
Marc Durdin
ecd44063e7 feat(windows): left-only hotkeys
Fixes #364.

Hotkeys in Windows are currently implemented using RegisterHotkey.
However RegisterHotkey does not distinguish between left and right
modifier keys, which means that they override some keyboards' RAlt
combinations.

This feature reimplements hotkey support in the low level keyboard hook,
and adds a feature flag / debug flag Flag_UseRegisterHotkey to return
to the RegisterHotkey model if that is so needed.

I have made minimal refactoring changes to this code, although there
are certainly functions here which could be improved.

I have flagged a couple of potential improvements with TODO.
2019-11-19 17:30:28 +11:00
Marc Durdin
ccc6498739 fix(windows): Keyman was crashing sporadically
Fixes #2147.

This potentially addresses the issues reported in #2147 where Keyman
would crash due to a race condition as a critical section was not
deleted before attempting to recreate it.

Some logging has been added for debugging these issues.

Also fixes memory leaks and another race on startup relating to loading
the taskbar icon.

There are still some known memory leaks because DLL_THREAD_DETACH is
not called for all threads before keyman32.dll is unloaded, so those
threads don't get the opportunity to clean themsselves up. However, the
key danger with the csGlobals critical section has been addressed.
2019-11-06 17:44:32 +11:00
Marc Durdin
5dd0737185 [Windows] Use RegisterHotkey to (a) simplify hotkeys and (b) avoid serialization issues with modifiers 2018-12-17 13:45:19 +11:00
Marc Durdin
48cdb3c0b3 [Windows] Patch serialization code for MSTSC and Hyper-V client 2018-11-03 20:24:06 +11:00
Marc Durdin
b395f7b122 [Windows] Remove USE_SERIALEVENTSERVER define 2018-10-19 05:34:48 +11:00
Marc Durdin
738e1946a6 [Windows] Debug logging and proof of concept tests for keyboarding support within metro-style apps
[Windows] More tidyup and robustness for metro app support - debug cleanup and serialization of input (not quite finished)

[windows] Refactor serialized input code when used with key event thread model

[windows] Add consistent precompiled headers for other projects

[windows] Merge console window test into metro support

[Windows] Tidy up work and identify additional TODOs for metro-style app support

[Windows] Ensure error case falls through to default hook processing for console windows

[Windows] Refactor shared memory into memory mapped file so we can cross 32-64 bit boundary

[Windows] Tweaks to C++ security calls and parameters

[Windows] Start refactor of SerialKeyEvent* classes

[Windows] Rename to SerialKeyEventServer (refactoring)

[Windows] Complete refactoring of SerialKeyEventClient class

[Windows] Further encapsulation and cleanup with 'interfaces' to reduce header pollution

[Windows] Complete serialization fix with move of modifier state management from client thread to server thread to guarantee consistency

[Windows] Replace atom-based keyboard switching with memory mapped file indexed to avoid security constraints

[Windows] Fixup Left Alt+Shift interaction with serializer

[Windows] Use Windows 8.1 SDK for test
2018-10-18 20:00:49 +11:00
Marc Durdin
56115da652 [Windows] Serialized input: don't trigger on console windows 2018-10-05 14:40:57 +10:00
Marc Durdin
7e2c21b8a7 [Windows] Refactor serialized input to use a low level keyboard hook to avoid conflicts 2018-10-03 15:22:38 +10:00
Marc Durdin
b65b982584 Keyman Desktop and Keyman Developer open source 10.0 alpha seed (#121)
* Keyman for Windows 10.0 Open Source

* Squashed 'windows/src/ext/jedi/jedi/' content from commit f444ad2

git-subtree-dir: windows/src/ext/jedi/jedi
git-subtree-split: f444ad2da4693851e523f1ea6bd541f701904c24

* Squashed 'windows/src/ext/jedi/jcl/' content from commit d63d3c9fd

git-subtree-dir: windows/src/ext/jedi/jcl
git-subtree-split: d63d3c9fd9ff84efdd8159084ec6a60313644243

* Squashed 'windows/src/ext/jedi/jvcl/' content from commit bee19f3b4

git-subtree-dir: windows/src/ext/jedi/jvcl
git-subtree-split: bee19f3b46909fde2fa92c06cd2706f41d99f6c3

* Add required .res files

* Add required .res files

* Add docbook files (forced)

* Add required libxslt

* Add required jedi files

* Add installation files

* Tweak .gitignore for open

* CI

* Remove KMW from Developer source (#122)

* Remove KMW from Developer source (copies during build)

* Remove KMW from Developer source (copies during build)

* Remove KMW from Developer source (copies during build)

* Fixup release build and copy license, readme from kmw during build

* Remove obsolete build help documentation

* Keyman Engine 10 on Windows regression for shift states (#129)

* Improve #128 -- cleaner debug messages

* Fixes #127, shift state now resets correctly; and more work for #128

* Fixes #130 (#131)
2017-07-25 10:53:06 +07:00