Although it doesn't answer the immediate question, I used some of the ideas Lukas Knuth gave me to solve it.
The process is now that a keycode of 0 is caught and handed to a function that runs the contents of the input box through some Regex validation. If the validation fails, then the last character is removed from the input box.
I apologise if anyone comes to this question seeking a solution for the HTC One X passing through 0 as the keycode, after a couple of days of research and experimentation, I couldn't find a solution, so I worked around the problem instead.