keystroke checking in forms

How would I stop a specific keystroke as it occurs in a form. I can add an onkey down listener to the form and check its keycode, but how would I stop/erase it, being that I don't know where in the form it is occuring?
[226 byte] By [vinays84a] at [2007-11-26 15:45:58]
# 1
Technically not java/jsp but I guess I can help ;-)Most javascript events can be cancelled by returning false from the event handler.onkeydown="return checkKeyStroke()"and have your checkKeyStroke method return false for the invalid key codes.
evnafetsa at 2007-7-8 22:05:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
That worked. Thank you.
vinays84a at 2007-7-8 22:05:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...