Oh! A simple fix on line 7 would fix that, change line 7 to this

Code: javascript
if (document.layers || e.which) { pressedKey = e.which; }