From 3b411087c6e633073975624a892a0d44fed6fb3b Mon Sep 17 00:00:00 2001 From: zonble Date: Mon, 17 Oct 2011 00:37:59 +0800 Subject: [PATCH] Sets the keyboard layout to com.apple.keylayout.US, besides using Hanyu Pinyin. --- Source/InputMethodController.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/InputMethodController.mm b/Source/InputMethodController.mm index 9961970b..26932d2e 100644 --- a/Source/InputMethodController.mm +++ b/Source/InputMethodController.mm @@ -235,6 +235,9 @@ public: _bpmfReadingBuffer->setKeyboardLayout(BopomofoKeyboardLayout::StandardLayout()); [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:kKeyboardLayoutPreferenceKey]; } + if (keyboardLayout < 4) { + [client overrideKeyboardWithKeyboardNamed:@"com.apple.keylayout.US"]; + } // set the size NSInteger textSize = [[NSUserDefaults standardUserDefaults] integerForKey:kCandidateListTextSizeKey];