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:
- Google Chrome 22 and above
- Edge 79 and above
- Firefox 52 and above
- Opera 15 and above