A macOS menu-bar app that locks your keyboard input source. Whenever you (or another app) switch input methods, LockIME immediately switches back to the locked one — globally, or per-frontmost-app, or (with the optional enhanced mode) per browser URL.
macOS 14+ · Apple silicon & Intel — separate apps, download the
-arm64or-x86_64file matching your Mac · built with SwiftUI, Liquid Glass on macOS 26 (Tahoe).
Install with Homebrew (the cask picks the build matching your Mac's architecture):
brew install --cask oomol-lab/tap/lockimeOr download the .dmg matching your Mac (-arm64 for Apple silicon,
-x86_64 for Intel) from the
latest release.
Either way, the app keeps itself up to date via Sparkle.
- Instant re-lock — switches the active input source back the moment you (or another app) change it, globally or per-app.
- Lock or switch — per-app and per-URL rules can lock an input source (re-applied whenever it drifts) or just switch to it once when you focus the app or page, then step out of the way and let you change it freely.
- Flexible URL matching — per-URL rules (enhanced mode) match by a domain and its subdomains, an exact domain, a domain keyword, or a regular expression over the full URL, and apply in a priority order you drag to arrange — first match wins.
- Menu-bar control — activate/deactivate, switch the locked input source, view the current source, and track the activation count from the menu bar.
- Keyboard shortcuts — configurable global shortcuts to toggle locking and cycle the locked input source, plus per-app shortcuts to cycle or unbind the rule for whichever app is frontmost.
- Launch at login — starts automatically when you log in (off by default).
- Light & dark mode — a unified, system-native design language that adapts to light and dark appearance, plus a bespoke app icon. See docs/DESIGN.md.
- Live language switching — switch between 9 languages instantly, no restart: English, 简体中文, 繁體中文, 日本語, Français, Deutsch, Español, Português, Русский.
- 24-hour activation log — review what was switched, why, and for how long.
- Config backup — export your per-app and per-URL rules to a
.lockimefile and import them back, with a review step that previews additions, conflicts, and removals before anything is applied. - Auto-update — stable and beta channels via Sparkle, with a custom update window.
- Tiny download — the whole app ships in a
.dmgunder 3 MB. - No system permissions for core locking — an optional Accessibility-gated enhanced mode unlocks finer-grained per-URL and focused-field rules.
- Automation — a
lockime://URL scheme lets other apps, scripts, and Shortcuts drive LockIME (see below).
LockIME exposes a lockime:// URL scheme so other apps, scripts, Shortcuts, and
launchers can drive it — toggle locking, retarget the input source, manage
rules, and read state back with x-callback-url
callbacks. It is off by default — turn it on in Settings ▸ General ▸
Automation.
open "lockime://lock"
open "lockime://lock-to-source?id=com.apple.keylayout.ABC"
open "lockime://set-app-rule?bundle=com.apple.Terminal&mode=lock&source=com.apple.keylayout.ABC"Full reference: URL Scheme API.
LockIME follows a single design system (Sources/LockIME/UI/DesignSystem.swift):
semantic colors, system materials, and SF Symbols drive light/dark adaptation;
Liquid Glass is reserved for the floating/navigation layer only. The brand
"Lock Indigo" accent ships as an AccentColor asset. The full spec lives in
docs/DESIGN.md.
The app icon is generated programmatically (no design tool) — regenerate it with:
./scripts/make-appicon.sh # renders the master via SwiftUI and rebuilds the appiconsetRequires Xcode 26+ (the app itself targets macOS 14+), and XcodeGen
- xcbeautify (
brew install xcodegen xcbeautify).
make gen # generate LockIME.xcodeproj from project.yml
make build # build (Debug)
make run # build & launch
make test # run unit tests
make archive # Release archive (Developer ID)The Xcode project is generated from project.yml and is not checked in.
Hardware-touching integration tests (real TIS switching) are excluded from
make test; run them with make test-hw (briefly changes the input source).
Dispatch-driven, notarized Developer ID releases with Sparkle auto-update over stable and beta channels: run the Release workflow (Actions → Release) and it computes the version from git tags, builds, and creates the tag and GitHub Release automatically — never push a tag by hand. The beta channel is the nightly build. Every release ships separate Apple-silicon and Intel apps, each on its own update feed (no universal binary, no cross-arch updates). See docs/RELEASING.md.
- LockIMEKit (static library) — pure, fully unit-tested logic using only system frameworks: lock engine, app monitor, rules, enhanced (Accessibility) observer, logging model, localization.
- LockIME (app) —
@main, SwiftUI UI, the design system, and the thin integration shims for Sparkle, KeyboardShortcuts, and PermissionFlow.
Copyright © 2026 Hangzhou Wumou Software Co., Ltd.