<html> <head> <script type="text/javascript"> function isKeyPressed(event){ if (event.shiftKey==1){ alert("The shift key was pressed!") }else{ alert("The shift key was NOT pressed!") } } </script> </head> <body onmousedown="isKeyPressed(event)"> <p>Click in the document.</p> </body> </html>