Skip to content

OpenKey v2.0.9

Choose a tag to compare

@github-actions github-actions released this 05 Mar 13:09
· 15 commits to master since this release

Release v2.0.9 — built from commit 65cebcb

New Features

  • OKLog file logger: Added new OKLog namespace that writes detailed events to %APPDATA%\OpenKey\openkey.log (rotates at 1MB). Each log line includes timestamp, category, and message. Also mirrors to OutputDebugString for DebugView. Categories include:
    • LIFECYCLE: OpenKey init/shutdown
    • HOOK: hook install, remove, death detection, reinstall
    • TOGGLE: VI mode on/off
    • FOREGROUND: app focus changes
    • SESSION: screen lock/unlock

Improvements

  • Hook heartbeat: Added _hookHeartbeat volatile updated on every keyboard callback. This is groundwork for detecting "zombie hooks" (handle still valid but Windows silently removed).
  • Hook health-check now runs every 1s: Reduced from 60s to 1s for faster detection of silently-removed hooks.

Fixes

  • Fix intermittent hook removal causing "need retoggle" issue: Previously, keyboardHookProcess called SendMessageTimeout() on every keystroke to check IME status. On a busy system, this could push the callback over Windows' ~300ms hook timeout budget, causing WH_KEYBOARD_LL to be silently removed. The fix caches the IME state and only re-queries when foreground changes or after 500ms.

  • Fix circumflex transform when another vowel already has tone/horn: Added guard in insertAOE() to skip circumflex transform if any other vowel already has TONE_MASK or TONEW_MASK. Fixes chưa + a → chưâ (wrong) → chưaa (correct).

  • Fix gi- cluster in old orthography: Added missing rule in handleOldMark() for gi- cluster. Fixes giacs → giác (was incorrectly producing giac).

  • Cache GetForegroundWindow/ImmGetDefaultIMEWnd per foreground session: Reduces syscalls on every keystroke.

Full Changelog: v2.0.8...v2.0.9