I've found that I've had to add keydown to both document and body in order to detect ctrl and shift in both ie and ff.\
$(document).add("body").keydown( function(e) {
  var ctrl = e.keyCode == 16 || e.ctrlKey ;
  var alt = e.keyCode == 18 || e.altKey;
});

Blair


On 10/5/06, Klaus Hartl <[EMAIL PROTECTED] > wrote:
Sam Collett schrieb:
> In IE:
> e.keyCode returns the same as e.charCode in Firefox
> The keys keyCode detects in Firefox are not detected at all in IE (so
> you cannot prevent copy/paste in text boxes for example)


Sam, if you need that, maybe you can use oncopy/onbeforecopy in IE for
that...


-- Klaus

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to