Why I Kept Typing in the Wrong Language on My Mac
On a Mac, the most frustrating moment in typing is wanting Chinese and getting English, or starting to type code and watching a Pinyin candidate bar pop up on screen.
I was editing a paper in VS Code and wanted to add \input. The moment I finished typing input, a row of Chinese candidates popped up underneath my cursor: 你、尼、泥、拟、逆. I had to backspace through all of it, switch to English, and type it again. A minute later I switched over to Slack and WhatsApp to reply to a message. I meant to type "我也不" ("me neither"), and what landed in the chat box was wo ye bu. Backspace, switch to Chinese, type it again.

This used to happen to me dozens of times a day. The strange thing is that switching input sources on macOS isn't actually hard. Pressing Caps Lock is a lot cleaner than juggling Shift and Ctrl+Shift on Windows. What kept tripping me up was simpler: before my fingers hit the keys, I had no idea whether my Mac was currently in Chinese or English.
Technically, macOS tells you the state all the time. Up in the top-right corner of the menu bar, there is a tiny icon — "拼" for Pinyin, "A" for English. But that icon lives at the far edge of the display. When I'm typing, my eyes are locked on the cursor. Nobody glances up at the corner of the screen before every sentence.
What made it worse was that macOS tried to remember the last input source for each window. There is a checkbox in System Settings called "Automatically switch to a document's input source." I kept it turned on for years, assuming it would keep VS Code in English and my chat app in Chinese. In practice, what the system remembered rarely matched what I expected. I would click into a chat window expecting Chinese, and it was still sitting in English from a link I pasted twenty minutes ago. I would click back into VS Code expecting English, and it was still in Pinyin. Whenever the state in my head drifted out of sync with the state on the machine, I typed gibberish.
Eventually I went into macOS System Settings and changed three things. First, under Keyboard → Text Input → Input Sources, I deleted every extra layout and kept only two: "ABC" and "Chinese, Simplified – Pinyin." Every extra keyboard in that list is one more state you can guess wrong. Second, on that same panel, I turned on "Use the Caps Lock key to switch to and from ABC," so switching only ever uses the key under my left pinky. Third, I turned off "Automatically switch to a document's input source."
Once I turned that off, I still guessed wrong occasionally, but far less often. At least the keyboard state only changed when I told it to, instead of shifting behind my back every time I switched windows. If you spend all day jumping between an IDE and a chat app, you can also go the opposite route with a small utility like Input Source Pro, which pins a specific input source to each app so VS Code always forces English and your chat app always forces Chinese.
Even after fixing those settings, though, there was one situation I couldn't avoid: a single sentence that mixes Chinese and English together. In Slack or WhatsApp, I constantly send messages like "我刚 push 了 new build,明天看一下 metrics" ("Just pushed the new build, let's check metrics tomorrow"). Typing that one line with a traditional Pinyin input method means toggling back and forth between Chinese and English several times in five seconds. Miss a single toggle in the middle, and push turns into a row of Chinese characters that you have to delete and retype.
At some point I stopped switching mid-sentence altogether. Now I leave my keyboard on standard English and type the Pinyin and the English straight through in one pass: wo gang push le new build, ming tian kan yi xia metrics. When the sentence is done, I press UnimeType's Convert shortcut once (which you can bind in setup and shortcuts). The Pinyin turns into Chinese across the whole sentence, and the English words stay untouched.

Typing this way means I don't have to wonder whether I'm in Chinese or English mode before I start a mixed sentence, because there is no mode switch in the middle of typing. Everything I type stays on my machine offline while I'm drafting, and nothing is processed until I press Convert. On my Mac, I can also point it at a local LM Studio model so the conversion itself runs completely offline.
My daily setup has stayed pretty much the same since then. When a passage is packed with rare characters where scanning a candidate bar visually helps—or when I'm writing pure code for an hour—macOS Pinyin paired with those three Caps Lock tweaks stays out of my way. Whenever daily work mixes Chinese and English across apps and sentences, I type the whole thing on a bilingual English keyboard and convert it at the end (or test a quick line in the browser with the Pinyin-to-Chinese converter). I use the exact same habit across my Mac, Windows PC, iPhone, iPad, Android phone, and Linux machine.
Download UnimeTypeiOS, Android, macOS, Windows, Linux, and ChromeOS
View downloadsNext: I Pressed Shift Six Times Just to Type Three English Words in One Chinese Sentence