HTML | DOM TouchEvent ctrlKey Property
The TouchEvent ctrlKey property is a read-only property and used for returning a Boolean value which indicates whether or not the “CTRL” key was pressed when a touch event was triggered. It mostly returns false because generally, touch devices do not have a ctrl key.
Return Value: It returns true if the ctrl key is pressed, else it returns false.
Below program illustrates the TouchEvent ctrlKey property :
Example: Finding out whether the “CTRL” key was pressed on the touch screen or not.
- Before clicking the button:
- After clicking the button:
- Internet Explorer
- Google Chrome