keypress returns a value for a character in keyCode in IE and charCode in firefox.
all keys can be read as keycode from the keydown event type.
catch the event and examine the keyCode on keydown.
If you are handling key events only on the body element you will not
be catching events in textareas and inputs until after they have
been processed and returned normally and bubble up to the body-
technically speaking, this is locking the barn door after the horse is stolen.
Attach your event handler to the elements that accept key events.