ctrlKey Event Attribute
Event Object
Definition and Usage
The ctrlKey event attribute can return a Boolean value that indicates whether the Ctrl key was pressed and held down when the event occurred.
Syntax
event.ctrlKey=true|false|1|0
Example
Example
The following example alerts whether the "CTRL" key was held down when a mouse button is clicked:
Click somewhere in the document. An alert box will tell you whether you pressed the CTRL key.
Try it »
Event Object