Closed doodzik closed 7 years ago
If you point me to the right direction in the code base I can debug it and submit a pull request :)
sorry for the late answer, just did not see the notification, will have a look
I found a solution for this, which I will include in the next Version. As the next version contains a rewritten CommandLine Interpreter in swift, it could take a while though.
For the meantime, getting the source list like this, to also include InputSources of type kTISTypeKeyboardInputMode, should allow the use of Pinyin:
+ (CFArrayRef) sourceList {
NSDictionary *keyboardLayoutRefs = @{ (NSString *)kTISPropertyInputSourceType : (NSString *)kTISTypeKeyboardLayout };
CFArrayRef keyboardLayoutInputSources = (TISCreateInputSourceList ((__bridge CFDictionaryRef)(keyboardLayoutRefs),true));
NSDictionary *inputModeRefs = @{ (NSString *)kTISPropertyInputSourceType : (NSString *)kTISTypeKeyboardInputMode };
CFArrayRef inputModeInputSources = (TISCreateInputSourceList ((__bridge CFDictionaryRef)(inputModeRefs),true));
NSArray *keyboardLayouArray = (__bridge NSArray*)keyboardLayoutInputSources;
NSArray *inputModeArray = (__bridge NSArray*)inputModeInputSources;
NSArray * allSources = [keyboardLayouArray arrayByAddingObjectsFromArray:inputModeArray];
return (__bridge CFArrayRef)allSources;
}
Cool, I'll keep an eye open for the release then. Thank you for your time you put into this project :)
with the newly released version 1.0.0
keyboardSwitcher select "Pinyin - Simplified"
works for me.
I have tried to switch to the Pinyin - Simplified layout, but it didn't work. Switching from U.S. to Dvorak works thought. Below are the steps that I took so you can reproduce it:
Great cli program. it is really useful to me 👍