i've lifted this from something i wrote t'other day which was working
in ie7...
$(document).keypress(function(e){
var key;
if (!e)
e = window.event
if ((!e.charCode)|(e.charCode == 0)) {
key = e.keyCode
} else {
key = e.charCode
}
/* put stuff here! */
});
give it a go. it has lots of magical little quirks which can make
keypress/down/up stuff a royal pain in the arse.
a good reference (which may not be much use to your issue) is
http://www.quirksmode.org/js/keys.html