Im using foloowing code to track key events

oEvent=window.event || oEvent;
    iKeyCode=oEvent.keyCode || oEvent.which;alert(iKeyCode);

its giving me alerts in firefox but not in IE and chrome. Its giving me all the other keyborad characters but not esc key and arrow keys.

How can i detect esc key and arrow keys in chrome and IE using javascript??

Edit
Report