This question already has an answer here:
I can't believe this bug has still not been solved with Ubuntu 14.04 ? On my 2 laptops, Acer and Asus, on a random basis, the keyboard layout switch from FR to EN.
This is very frustrating when you type a password and can't see the letters.
How to solve that for good ?