Even though jQuery is tagged, I don't see that you used it. I see no problem in using jQuery
.keypress()
:
http://api.jquery.com/keypress/[
^].
Again, you should never use
Up
and
Down
keys, as they are reserved for scrolling, cursor motion in cursor mode and more. Use something else, maybe Ctrl+Up, Ctrl+Down.
—SA