iOS: Improved handling of chinese keyboards

Credit goes to @zhanleewo
Fixes #1093