Improve capslock detection on non-us keyboards 

On non-us keyboards you can obtain lower case characters even pressing
the SHIFT, this caused false positives (issue #1855).