April 2, 2000 - Handling Keyboard Strokes
April 2, 2000 Handling Keyboard Strokes Tips: April 2000
Yehuda Shiran, Ph.D.
|
var asciiU = 85;
var asciiu = 117;
var ascii6 = 54;
This is how you check inside the handleEvent() function:
if (window.event.keyCode == asciiU ||
window.event.keyCode == asciiu ||
window.event.keyCode == ascii8)
Learn more about the Snakes game in Column 47, A DOM-Based Snakes Game, Part II .