Is there a way to automatically change my keyboard language when I switch between windows on macOS?

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


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.