Skip to content

OpenKey CE 2.1.0 - #1

Merged
llawliet11 merged 12 commits into
masterfrom
feature/openkey-ce-modernize
Oct 12, 2026
Merged

llawliet11 merged 12 commits into
masterfrom
feature/openkey-ce-modernize

Conversation

@llawliet11

Copy link
Copy Markdown
Owner

Community edition of OpenKey for current macOS, built from upstream tuyenvm/OpenKey master.

neoxtech99 and others added 12 commits May 21, 2026 12:40
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.
@llawliet11
llawliet11 merged commit 1349084 into master Oct 12, 2026
@llawliet11
llawliet11 deleted the feature/openkey-ce-modernize branch October 12, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants