The key capture events (keypress, keyup, keydown) all work fine in
Firefox. But I can't get IE7 to do anything with them. Specifically, I
am trying to capture the Enter key. I have tried both jquery 1.2.6 and
1.3.2

Before trying to do anything with the key capture, this is all I am
trying to do currently:

  $("input").keydown(function(e){
    if (e.which == 13){
     alert("Enter key pressed");
    }
  });

I register this event on document ready. As I said, it works fine in
Firefox and Safari. In ie, the alert does not fire at all. If I try to
just alert(e.which), the alert fires and says "undefined" for every
key, and reports correctly in Firefox. Interestingly, the demo at
http://docs.jquery.com/Events/keypress works fine in ie. However,
looking at that code its embedded in a frame and in a try catch block
and in a window.onload, not a jquery document ready. Anyone got
suggestions?
Thanks,
- Mike

Reply via email to