ctrlKey Event Attribute
Definition and Usage
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 alerts whether or not the "CTRL" key was pressed when a
mouse button was clicked:
Try it yourself »
alert("The CTRL key was pressed!")
alert("The CTRL key was NOT pressed!")
<p>Click somewhere in the document.
An alert box will tell you if you
pressed the CTRL key or not.</p>
Thank You For Helping Us!
Your message has been sent to W3Schools.