Possible Duplicate:
Which keycode for escape key with jQuery
This little piece of code works like a charm for Firefox and Opera. Internet Explorer doesn't like it.
window.document.onkeydown = function (e) {
if (!e) {
e = event;
}
if (e.keyCode == 27) {
myfunction();
}
}
Isn't it possible to detect keydown for ESC in IE? Thanks