detecting arrow keys in Javascript
<p>How do I detect when one of the arrow keys are pressed. I used this to find out:</p>

<pre><code>function checkKey(e) {
var event = window.event ? window.event : e;
if (true) {
    alert(event.keyCode)
}
</code></pre>

<p>}</p>

<p>Though it worked for every other key, it didnt for arrow key (maybe because browser is naturally supposed to scroll on these entries). Thanks in advance.</p>
