mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-07 17:36:00 +00:00
This change improves the stability of Keyman for Windows by monitoring the health of the low level keyboard hook. If keyman.exe is unresponsive at any time, Windows can silently uninstall its low level keyboard hook, which results in (at least) two problems: * Keyman's hotkeys stop working * A modifier key can become stuck, if it was pressed around the time Keyman became unresponsive. The most common scenario in which Keyman can become unresponsive is high system load, e.g. rendering graphics, videoconference calls, compiling software. Restarting Keyman always resolved both of these two issues in the past, but with this patch, I hope that this will no longer be necessary. A related 'fakefreeze' project is included for simulating a keyman.exe hang by posting a `wm_keyman_control:KMC_WATCHDOG_FAKEFREEZE` message to it, which keyman.exe responds to by `Sleep()`ing for 5 seconds. While keyman.exe is freezing, any keystroke will cause the low level hook to be uninstalled by Windows. Logging has been updated; look for "LowLevelHookWatchDog" in the log for related events. One final small change in keyman32.cpp, as I refactored the WH_KEYBOARD_LL hook installation/uninstallation, was to always clear out hook variables when uninstalling a hook, because if the hook fails to uninstall, there's really nothing we can do about it anyway, and we probably shouldn't be trying again. Fixes: #8064 |
||
|---|---|---|
| .. | ||
| docs | ||
| include | ||
| src | ||
| build.sh | ||