Seems as though there is no simple solution for number input fields. There has been a long protracted discussion about web browsers blocking non-numeric characters natively for number input fields for several years.
Additionally, when non-numerical characters are entered the field value becomes invalid and unreadable by JavaScript. There is no simple solution for replacing non-numerical characters after they have been entered into number input fields; only preventing them from being entered.
As far as your problem goes, the only solution is to figure out why a QWERTZ keyboard is not properly mapping the 0
character as a digit. Although I have tested it with a virtual QWERTZ keyboard layout and it worked just fine for me on your website.
If you are in a bind and need it right now just remove that entire case "number"
from the switch in the loop.