While this approach might be working to solve this issue, I would suggest you take a look at what we did for en (English) layout.
https://github.com/mozilla-b2g/gaia/blob/0c59963c04b4dab26f5d64f073b48b842ce498d6/apps/keyboard/js/layout.js#L171
It uses a special syntax to describe what keys need to be hidden/shown when input type=email.

Thank you.