There are far more characters that can be entered into a computer than there are characters on the keyboard. This is handled via three keys that modify the meanings applied to all the other keys.
In this example we have a function that will return an object having three properties each of which will be true if that particular key is currently pressed and false if that key is currently not pressed. The couple of lines below our example function show how you can use the function with an if statement that tests if the shift key is being pressed.
keyMod = function(event) {
return {'shift': event.shiftKey
,'alt': event.altKey
,'ctrl': event.ctrlKey};
};
k = keyMod();
if (k.shift)
