max1874

直接下载Direct download

TypeSwitch

卡住的词用别的语言先打,连按三次空格,整行变回你在写的语言。Type the words you have. Get the language you meant.

一个 macOS 菜单栏小工具:写到一半想不起某个词,就用你顺手的语言先打下去,连按三次空格,这一行(或选中的文字)会被改写成你正在写的语言,直接替换在原来的输入框里。模型用你自己的 API Key,任何 OpenAI 兼容接口都行。A macOS menu bar utility: when a word won't come, type it in whatever language reaches your fingers, tap Space three times, and the line (or your selection) is rewritten into the language you were writing, right in the text field. It runs on your own API key with any OpenAI-compatible service.

下载 DMG(GitHub Releases)Download the DMG (GitHub Releases)
平台Platform
macOS
要求Requires
macOS 14 或更高,Apple 芯片或 Intel;需要一个 OpenAI 兼容接口的 API Key(本地 Ollama 可不填);需要授予「辅助功能」和「输入监控」权限。macOS 14 or later, Apple silicon or Intel; an API key for an OpenAI-compatible service (not needed for a local Ollama); Accessibility and Input Monitoring permission.
许可证License
MIT

能做什么What it does

连按三次空格,就地改写Triple-tap Space, rewritten in place
选中了文字就改写选中的部分,没选就改写光标所在的那一行,结果直接替换回原来的输入框。触发键、连按次数和间隔都能改,默认是 0.3 秒内连按三次空格。With text selected it rewrites the selection; otherwise the line your cursor is on. The result replaces the original in the same field. The trigger key, tap count and interval are yours to set; the default is three taps of Space within 0.3 seconds.
不绑定语言对Not tied to one language pair
在设置里填你要写成的语言(默认 English),模型懂的语言都可以。发给模型的指令完整显示、可以直接改。Set the language you want the text written in (English by default); any language the model knows works. The instructions sent to the model are shown in full and can be edited.
用你自己的模型Your model, your key
内置 DeepSeek、OpenRouter、OpenAI、Moonshot、本地 Ollama 的地址,也可以填任何 OpenAI 兼容地址。模型列表从该地址读取,API Key 存在 macOS 钥匙串里,App 不内置任何 Key。Presets for DeepSeek, OpenRouter, OpenAI, Moonshot and a local Ollama, or any OpenAI-compatible address. The model list is read from that address, your API key is kept in the macOS keychain, and no key is bundled with the app.
几乎所有输入框都能用Works in most text fields
优先用辅助功能接口读写文字;读不到的 App 会改用复制粘贴,并在用完后把剪贴板恢复原样。如果改写期间焦点切走或文字被改动,它不会写回。也可以把不想触发的 App 加入排除列表。It reads and writes through the Accessibility API first, and falls back to copy and paste where that is unavailable, restoring your clipboard afterwards. If focus moves or the text changes while it works, nothing is written. Apps you never want it in can be excluded.
安全地自动更新Updates itself, with checks
启动时向 GitHub 查询最新版本,有新版时在菜单里提示。安装前先核对随版本发布的校验和,并确认新版本和当前版本是同一个开发者签名,任何一项不通过就丢弃。自动检查可以在设置里关掉。On launch it asks GitHub for the latest release and offers newer ones in the menu. Before installing, the download must match its published checksum and carry the same code signature as the running copy, or it is discarded. The automatic check can be turned off in Settings.

常见问题Questions

为什么需要「辅助功能」和「输入监控」权限?Why does it need Accessibility and Input Monitoring?

「输入监控」用来发现你连按了触发键;它只旁听按键,不拦截也不修改任何按键。「辅助功能」用来读取当前那一行文字并把改写结果写回去。两项都在 系统设置 → 隐私与安全性 里授予,授予后无需重启 App。Input Monitoring lets it notice the trigger taps; it only listens and never blocks or changes a keystroke. Accessibility lets it read the current line and write the rewrite back. Grant both in System Settings → Privacy & Security; no relaunch is needed.

我的文字会发到哪里?Where does my text go?

只在你触发(或在设置里点「测试一句」)时,把那一行或选中的文字,连同改写指令,发送到你自己配置的接口地址。开发者没有服务器,收不到你的文字。详见隐私政策。Only when you trigger it (or press “Test a line” in Settings), the line or selection is sent, together with the rewrite instructions, to the address you configured. The developer runs no server and never receives your text. See the privacy policy.

API Key 从哪来?必须填吗?Where do I get an API key? Is one required?

在 设置 → AI 服务 里选一个服务商,Key 输入框旁有获取 Key 的页面链接。费用由该服务商向你收取。本地运行的 Ollama 一般不需要 Key,可以留空。Pick a provider in Settings → AI service; the key field links to the page where that provider issues keys, and it bills you directly. A local Ollama usually needs no key, so the field can be left blank.

打开时会被 Gatekeeper 拦住吗?Will Gatekeeper block it?

不会。发布的 DMG 用 Developer ID 签名并经过 Apple 公证,下载后拖进「应用程序」即可直接打开。No. The released DMG is signed with a Developer ID certificate and notarized by Apple, so it opens normally after you drag it to Applications.

怎么卸载?How do I uninstall it?

从菜单栏退出 TypeSwitch,把它从「应用程序」拖到废纸篓。如需清干净:先在设置里清空 API Key(会从钥匙串删除),删除 ~/Library/Preferences/dev.typeswitch.app.plist,并在 系统设置 → 隐私与安全性 里移除它的两项权限。Quit TypeSwitch from the menu bar and drag it from Applications to the Trash. To remove everything: clear the API key in Settings first (this deletes it from the keychain), delete ~/Library/Preferences/dev.typeswitch.app.plist, and remove its two grants in System Settings → Privacy & Security.

获取帮助Get help

发邮件到Email qinuobiao3@gmail.com,或在 , or open an issue on GitHub 提 issue。写上设备型号和系统版本,能更快定位问题。. Include your device model and OS version so the problem is easier to find.