Example of Event Object in HTML DOM

The ctrlKey event attribute returns a Boolean value that indicates whether or not the "Ctrl" key was pressed when an event was triggered. The following example shows that  how we can do this

<script type="text/javascript">
function iskeypress(event)
if (event.ctrlKey==1)
  alert("The Ctrl key is pressed now you may continue....")
  alert("OOps The Ctrl key is not pressed")

<body onmousedown="iskeypress(event)">


There are lots of event attribute we can use it here like altKey,shiftKey,metaKey...