topical media & game development
#javascript-code-10-shiftKey.js / js
// Bind a click handler onto the entire document
document.onclick = function(e){
// Neutralize the Event object
e = e || window.event;
// If the shift key was held down while the click was made
if ( e.shiftKey )
// Display the menu
document.getElementById(“menu”).style.display = ‘block’;
};
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.