tags:

views:

26

answers:

1

Hi all,

how do I switch keyboard layout (AKA input source) programmatically in MacOS X in a Cocoa/Objective C program? Thanks in advance.

+1  A: 

I've not had occasion to try this, but I think you want the functions in text input source services. Note that these are Carbon functions, though usable from Cocoa -- you'll need to add the Carbon framework to your project in order to use them.

walkytalky
You are correct. Also, it's worth noting that that API is not deprecated—it is, in fact, the *modern* replacement for the deprecated Keyboard Layout Services.
Peter Hosey