Forbid and deactivate alphanumeric keys in a form?

scenario: form validation

I ask myself the question: in a special input form for postcode for example, in which only numbers (integer) are allowed. In a usability view I would say, you should be allowed to input all keys (abcd, 1234), the logic should fit it in the background. Would you forbid and deactivate alphanumeric keys, that the user cannot put the wrong keys into the input field? I think the user would be confused. What is your opinion?

The HTML-Input for numbers: no way. It is a desktop application on Windows.

Thank you!