For example, when I use the Messages app in which I use one keyboard, and in Xcode, I use only English keyboard. Can macOS switch my keyboard to English when I make the Xcode window active?

4 Answers 4


Follow these steps to changing your keyboard language dynamically:

  1. Open up System Preferences. This should be in your /Applications folder.

  2. Click on "Keyboard":

    System Preferences - Main page

  3. Click on the "Input Sources" tab:

    System Preferences - Keyboard preference pane

  4. You should see a checkbox titled "Automatically switch to a document's input source". Check that checkbox and you're done!

    System Preferences - Keyboard preference pane - Input Sources tab

  • 1
    It works with messenger. But doesn't switch language to English in XCode. Maybe there is some input source preferences in XCode?
    – VladasZs
    Sep 14, 2016 at 15:31
  • 2
    It works! I just switched language to English in XCode once and system remembered it automatically.
    – VladasZs
    Sep 14, 2016 at 15:41
  • 1
    My god, thanks! Nothing will bring me down today :)
    – Gelbander
    Apr 4, 2019 at 6:59

I have developed a app for this functionality.

GhostSKB - smart switcher of language input source for no-en users of macOS

It will help you to setting default input source for almost every app. By using it, when your app become active, the input source will be automatically changed to the default input source which you setted in GhostSKB.


You may also want to try Punto Switcher. Used it for a long time, worked perfectly. They have versions for Mac and Windows. It automagically recognizes the language you typing in and switches keyboard layout to that language, converting everything you have already typed before into correct layout! And it's free.

UPD. You may also have a look to Caramba Switcher. This is newer version of Punto from the same developer. Punto was bought by Yandex and frozen. Caramba is alive.


I created Input Source Pro, a tool that dynamically switches keyboard inputs based on the app or website you're using.

Here's how Input Source Pro can assist you:

  • 🔄 App-specific keyboard settings: With Input Source Pro, you can set a default keyboard for each app. Your input source automatically adjusts when you switch apps, streamlining your multitasking.

  • 🏄 URL-based keyboard switching: The tool also supports automatic keyboard switching based on the website you're visiting. This feature could be a game changer if you frequently move between sites that require different input sources.

  • 🖥️ Keyboard display: A handy tooltip feature reminds you of your current keyboard input during various interactions.

If this sounds like a tool that could simplify your workflow, give it a shot. 🙌

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .