HTML | DOM TouchEvent shiftKey Property
The TouchEvent shiftKey property is a read-only property and used for returning a Boolean value which indicates whether or not the “shift” key was pressed when a touch event was triggered.
The TouchEvent shiftKey property mostly returns false because generally, touch devices do not have a shift key.
Return Value: It returns true if the shift key is pressed, else it returns false.
Below program illustrates the TouchEvent shiftKey property :
Example: Finding out whether the “shift” key was pressed on the touch screen or not.
- Before clicking the button:
- After clicking the button:
- Internet Explorer
- Google Chrome
- Apple Safari
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.