<script type="text/javascript">
function isKeyPressed(event)
alert("The CTRL key was pressed!")
alert("The CTRL key was NOT pressed!")
<body onmousedown="isKeyPressed(event)">
<p>Click somewhere in the document. An alert box will tell you if you pressed the CTRL key or not.</p>