Thank you for the reply. I checked your new engine and got a different outcome! But, now, the IME is turned on from the very beginning (from the 1st character of the username). The good thing is that it types ascii characters in spite of IME being on (so everything gets underlined by IME when it is typed). But, probably because of IME, tab is not produced. So the password is also typed in the username line. That is, with the above example, auto-type produces
where there is no tab between username and password.
The problem persists if a key that turns off IME is inserted at the beginning of the auto-type sequence.