The following events relate to keyboard handling:
These events are classified as keyboard events because they are generated as a result of user interactions with the keyboard.
Note that the onKeyPress event is triggered as a result of a matching pair of onKeyDown and onKeyUp events. You should not rely on the events arriving in any particular order, although onKeyPress probably arrives before onKeyUp.
For example, as a key is pressed, an onKeyDown event is fired. As it is released, an onKeyUp event and an onKeyPress event are fired. An onKeyPress is only fired once for each onKeyDown and onKeyUp pair.
In Netscape, you can capture keyboard events by calling the captureEvents() method like this:
This need not necessarily apply to the window; the area of interest can be more limited by selecting an appropriate object.