TISCopyCurrentKeyboardInputSource will return null when using Chinese input method. Use TISCopyCurrentASCIICapableKeyboardLayoutInputSource instead.