-
-
Save ctrngk/e1a334ffce1489e7ad2f15b7b46fe826 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
/* Trivial keyboard input layout to english switcher by Alexander V. Zhouravlev. | |
* Compile it with gcc -framework Carbon -o SwitchToEnglish SwitchToEnglish.m */ | |
#import <Carbon/Carbon.h> | |
int main (int argc, const char *argv[]) | |
{ | |
TISInputSourceRef english = TISCopyInputSourceForLanguage(CFSTR("en-US")); | |
if (!english) | |
return 1; | |
return ((noErr == TISSelectInputSource(english))?0:2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment