Using Prototype.js for Shift-Click detection!

I wrote this needing to redirect a page based on a shift-click. I hope it's self-explanitory, as it should be if you're familiar with the prototype javascript library already.

{Go ahead, give it a try!

		Event.observe(window, 'load', init, false);
		var shiftPressed = 0;

 		function init(){
			watchShiftClick($('clickLink'));
			Event.observe(document, 'keydown', keyHandlerDown, false);
			Event.observe(document, 'keyup', keyHandlerUp, false);
		}

		function watchShiftClick(link) {
			Event.observe(link, 'click', shiftFunction, false);
			/*safari 2.0.3 Event.stop(e) workaround*/
			link.onclick = function() {return false;};
		}

		function keyHandlerDown(event){
			if(event.shiftKey) window.shiftPressed = 1;
		}


		function keyHandlerUp(event)
		{
			/* there's no event.shiftKey onkeyup response
				so this detects it */
			var key = event.which || event.keyCode;
			if (key == 16) {
				window.shiftPressed = 0;
			}
		}

		function shiftFunction(e) {
			Event.stop(e);
			if (shiftPressed == 1) {
				/*shiftClick function*/
				console.log('shift-click');
			} else {
				/* click function*/
				console.log('click');
			}
		}