@amiaoapp: Mac 用户终于有救了!这可能是今年最让我相见恨晚的 Mac 工具。 有没有被输入法逼疯过? 明明切到英文准备敲代码,下一秒又莫名变回中文; 打开 ChatGPT 是英文,切到微信要中文,来回切几十次; 更离谱的是,有些软件还会偷偷帮你切…
摘要
LockIME 是一款免费开源的 Mac 工具,可以锁定输入法,支持全局、按应用和按网址自动切换,避免手动切换输入法的烦恼。
查看缓存全文
缓存时间: 2026/06/20 16:20
Mac 用户终于有救了!这可能是今年最让我相见恨晚的 Mac 工具。
有没有被输入法逼疯过?
明明切到英文准备敲代码,下一秒又莫名变回中文; 打开 ChatGPT 是英文,切到微信要中文,来回切几十次; 更离谱的是,有些软件还会偷偷帮你切输入法…… 今天发现一个免费开源神器:LockIME。 它能直接「锁死」你的输入法!
全局锁定输入法 不同 App 自动使用不同输入法 浏览器不同网站自动切换输入法 24 小时切换记录可查 快捷键一键控制 体积不到 3MB
简单说: 微信永远中文, Cursor 永远英文, 浏览器某些网站自动英文, 再也不用手动切换输入法。 最关键的是: 完全免费! 完全开源! Mac 用户必装级神器! 用过之后最大的感受: 不是效率提升了多少,而是每天少生无数次气…… GitHub: https://github.com/oomol-lab/LockIME…
评论区聊聊: 你一天要切换多少次输入法?
oomol-lab/LockIME
Source: https://github.com/oomol-lab/LockIME
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).
Screenshots
Install
Install with Homebrew (the cask picks the build matching your Mac’s architecture):
brew install --cask oomol-lab/tap/lockime
Or 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.
Features
- 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).
Automation
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.
Design
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 appiconset
Development
Requires 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).
Releasing
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.
Architecture
- 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.
License
Copyright © 2026 Hangzhou Wumou Software Co., Ltd.
相似文章
@interjc: Omarchy 可以玩了,还装了 Rime 和 Mozc 输入法 总体而言比我想象的好,就是一些快捷键快捷键还需要熟悉,而且触摸板容易误触是真的 PS:我的老爷机是 2014 年的 MacBook Pro,Inetl i5 + 8G 内存…
用户在2014款MacBook Pro上安装并测试了Omarchy系统,使用了Rime和Mozc输入法,整体体验优于预期,但快捷键和触摸板操作需适应。
@denziideng: 不安装、不注册,开源离线免费用,Windows离线语音输入值得拥有! 打字慢手酸?语音输入又怕隐私泄露,还得联网? 分享一个 CapsWriter-Offline,GitHub 6.2k的Windows离线语音输入神器,按住CapsLoc…
CapsWriter-Offline 是一款Windows平台的完全离线语音输入工具,按住CapsLock键说话即可自动识别上屏,支持多种模型(SenseVoice、Paraformer等),无需联网和安装,高度自定义且低延迟。
@NFTCPS: 给你们扒一个 macOS 终端神器,专治开会听不懂英文: 麦克风或者会议声音进去,实时字幕加中文翻译直接出来,全程不碰网络,隐私党狂喜 吃 Apple Silicon 的 GPU 本地跑,英文转写完直接喂给混元 MT 翻译成中文 还能分谁…
介绍一个macOS本地实时英文转录和中文翻译的命令行工具livecaption,利用Apple Silicon GPU本地运行,支持说话人分离、two-pass纠偏,无需联网,保护隐私。
@Ryrenz: Mac 用了五年才找到这 6 个免费开源的实用工具! 1、IINA — 45.5k star,Mac 上最好看的视频播放器。为 macOS 原生设计,什么格式都支持,拖进去就播。 https://iina.io 2、Stats — 40.…
推荐6个免费开源的Mac实用工具,包括IINA视频播放器、Stats系统监控、MonitorControl外接显示器控制、Ice菜单栏管理、AltTab窗口切换、Keka压缩解压。
@geekbb: 一个专为 AI 编码设计的 macOS 终端,把工作区管理、分屏和 AI agent 启动流程整合到一起。支持横竖分屏,一键启动 Claude Code、Codex、Gemini CLI 等七个 AI agent,右键选中内容直接提交给 …
kooky 是一个专为 AI 编码设计的 macOS 终端,整合工作区管理、分屏和 AI agent 启动流程,支持一键启动多个 AI agent 和右键提交内容。