I’m binding on the keydown event with jQuery to allow some specific characters in a textbox. I’m trying to make my code cross browser and platform compliant. My main issue is that I can’t find a way to map the received key-code to a valid char-code, especially for key code coming from the numeric pad (decimal separator, is it a comma or a period, etc.).
I’m binding on the keydown event with jQuery to allow some specific characters in
Share
Well, like I said in comments, the goal behind this question was to filter a textbox on numeric values. I managed to reach my goal using the keypress event.
I’ve published a jQuery plug-in for those who are interested in the solution.