Is your input in chinese? Does it happen when the input is english?
No matter chinese or english, i will lose focus accidently even striking UP/DOWN keys.
It seems losing focus is relative to some pecial applications, such as opera, VBOX, etc. However, xterm doesnot lose focus up to now.
Best Regards!