Keyboard/bug860318 layout improvement commit

The first commit is just to recover what Pavel do to base on his work.
Please help review cf47a65 only if you have reviewed the first part.

Will squash them before merging.