Repository navigation
OpenKey CE 2.1.0 - #1
Merged
Merged
Conversation
isSpotlightVisible() previously returned true whenever a window owned by "Spotlight" existed anywhere in the on-screen window list. A dismissed or fading Spotlight window can linger in that list, so OpenKey wrongly kept using the selection-replacement path (Shift+Left + overwrite) while the user was already typing in another app. On apps that don't cooperate with that path, the overwrite is appended instead of replacing, producing duplicated characters. Tighten the check to only count Spotlight as active when its window is actually being drawn (alpha > 0) and floats above normal app windows (window layer > 0), which excludes stale/fading leftover windows. Reproduced and verified fixed on macOS (Apple Silicon) with Telex + Unicode and "Fix browser/Excel suggestions" enabled: open Spotlight, type Vietnamese, dismiss, then type in another app. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012Ro8o88gTWKFHDPaXwCvzR
initEventTap creates an active event tap, so macOS puts a deadline on OpenKeyCallback. When the callback misses that deadline (sustained CPU load) or on kCGEventTapDisabledByUserInput, the system switches the tap off and reports it back through the callback as a pseudo event type. OpenKeyCallback never checked for those two types, and CGEventTapEnable was only ever called once during setup. Once macOS turned the tap off, nothing turned it back on: the menu bar still showed the current mode and the switch key still worked, but no keystroke was converted in any app until OpenKey was relaunched. Handle both notifications in the callback and re-enable the tap. The normal event path is unchanged. Refs tuyenvm#258
Target macOS 13, hardened runtime, bundle ID com.nghia-pham.openkey-ce, SMAppService launch at login, legacy settings import, update check against the fork, release script that signs and notarizes.
Stop over-releasing the input source language string, finish the update check callback on every path, warn when legacy OpenKey runs, pin the release output directory.
Name the macOS 27 permission, show real SMAppService status with a Login Items prompt, ship LICENSE and a source pointer inside the DMG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Community edition of OpenKey for current macOS, built from upstream tuyenvm/OpenKey master.