Merge pull request #17870 from RudyLu/keyboard/Bug959200_master

Bug 959200 - Letters on keyboard sometimes not placed correctly.
r=janjongboom(cherry picked from commit b68b9f9a266727ed8fee3b6664c4316393caab8e)
a=v1.3t+