I changed the code like following and it's working.
// There seems to be an inconsistency between IME on Windows, and IME on OSX.
// On Windows, Input.inputString is always empty while IME is active. On the OSX it is not.
if (string.IsNullOrEmpty(ime) && !string.IsNullOrEmpty(Input.inputString))
=>
if (!string.IsNullOrEmpty(Input.inputString))
I am in windows.