I have a content-editable div and I want to restrict the user input so that multiple characters can not be input on a single keypress?Any idea how I could work it out?
Asked
Active
Viewed 242 times
0
-
2Can you give an example of how someone could input multiple characters using just one keypress? – Reactgular May 17 '13 at 14:05
-
@MathewFoscarini I mean to say pressing it for a long time,without a keyup event between the two generated keypress events – Romantic Electron May 17 '13 at 14:11
-
Possible duplicate http://stackoverflow.com/questions/2540335/how-to-capture-key-repeats-with-javascript – Mark Walters May 17 '13 at 14:14
-
@MathewFoscarini thanks for redirecting me....please close it as duplicate if you can – Romantic Electron May 17 '13 at 14:30