Last active
November 25, 2015 23:48
-
-
Save kmlawson/89a05c77063c2c350cf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.m | |
// keyswitch | |
// | |
// Created by K. M. Lawson on 2015.11.25. | |
// | |
// | |
// com.apple.inputmethod.Korean.2SetKorean | |
// com.apple.inputmethod.Kotoeri.Japanese | |
// com.apple.inputmethod.TCIM.Pinyin | |
// com.apple.inputmethod.SCIM.ITABC | |
@import Carbon; | |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
NSArray* sources = CFBridgingRelease(TISCreateInputSourceList((__bridge CFDictionaryRef)@{ (__bridge NSString*)kTISPropertyInputSourceID : @"com.apple.inputmethod.SCIM.ITABC" }, FALSE)); | |
TISInputSourceRef source = (__bridge TISInputSourceRef)sources[0]; | |
OSStatus status = TISSelectInputSource(source); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment