onKeyPress
The instrcution(s) to be executed are placed wihtin quotes. This event handler will execute the instruction(s) when a key on the keyboard is pressed. The activating key can be defined by using the 'fromCharCode' and 'charCodeAt' JavaScript methods.

The following example will display text of your choosing within a message box when a key is pressed:
onKeyPress="msgWindow.document.write('-- Insert desired text message here --')"
This Event Handler is used with the following:

A
ACRONYM
ADRESS
APPLET
AREA
B
BIG
BLOCKQUOTE
BODY
BUTTON
CAPTION
CENTER
CITE
CODE
DD
DEL
DFN
DIR
DIV
DL
DT
EM
FIELDSET
FONT
FORM
H1
H2
H3
H4
H5
H6
HR
I
IMG
INS
KBD
LABEL
LEGEND
LI
LISTING
MAP
MARQUEE
MENU
OL
P
PLAINTEXT
PRE
Q
S
SAMP
SELCT
SMALL
SPAN
STRIKE
STRONG
SUB
SUP
TABLE
TBODY
TD
TEXTAREA
TFOOT
TH
THEAD
TR
TT
U
UL
VAR
XMP