Works fine in a text-input as well, as long as you prevent the default
action of the event (which would be to submit the form):

http://www.jsfiddle.net/DEdb4/1/

Also note you don't have to check by keycode, `event.key` will be set
to something more human readable.

Reply via email to