6

From what I see in the Googles, there used to be a way to set it so that each application/window could have its own keyboard layout. I have two different apps, and I need different layouts for each one (Dvorak for one, and US for the other).

It seems like that feature may have been removed sometime between the stuff I'm seeing in Google and the current 10.9.5 version. Is there another way to accomplish this now?

  • If you need to do this on an App-Level and not a Document basis as Buscar웃 showed, you could probably use a combination of AppleScript and Keyboard Maestro. I had something like this setup in the past, and it worked well. I don't have the code on my current system, but could probably dig it up from backups. – Lee Joramo Oct 8 '14 at 19:32
10

I use the keyboard switching as well.

To do that I just click on the menu bar Input source name Icon and select the keyboard I need.

keyboard

That assumes you set the Input Sources in your sys pref key board, and you can choose the Automatically switch to documents input source as well if you prefer.

Auto switch:

Choose an input source for a document and have it used every time you work in the document until you close it, even if you switch to other documents that use other input sources in the meantime.

This option appears only when you add a second input source.

input source

3

If you're using Keyboard Maestro for this, use the action called "Set keyboard layout to" instead of the applescript. It instantly changes the layout without pulling down the menu.

2

As @LeeJoramo suggested, you can use Keyboard Maestro and some AppleScript to turn on the desired layout when switching to a certain app. For example, here's a KM macro that sets my keyboard layout to "Greek" when I switch to TextMate:

enter image description here

The script, borrowed from this StackOverflow answer:

tell application "System Events" to tell process "SystemUIServer"
    tell (menu bar item 1 of menu bar 1 whose description is "text input")
        select
        tell menu 1
            click (first menu item whose title contains "Greek")
        end tell
    end tell
end tell
  • Excellent! Thanks for providing the code. One point to note, if you use the popular menu items utility Bartender this script will not work. I am not sure if there is a work around. – Lee Joramo Oct 8 '14 at 21:17
  • 1
    Perfect, thank you! I can do the same without the applescript, Keyboard Maestro has now an action called "Activate Keyboard Layout". – sergiovilar Jan 17 '17 at 12:58
1

There is an app which is aupposed to be able to do this, but I have not tried it mayself: AutoKeyboard

http://www.macupdate.com/app/mac/51829/autokeyboard

  • I use this and works very well. – Alvaro May 2 '17 at 18:47

You must log in to answer this question.

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