HTML | DOM KeyboardEvent shiftKey Property
The KeyboardEvent shiftKey property in HTML DOM is a read-only property and used to return a Boolean value which indicates the SHIFT key is pressed or not. The KeyboardEvent shiftKey property returns true if the SHIFT key is pressed, otherwise returns false.
Below program illustrates the KeyboardEvent shiftkey Property in HTML DOM:
Example: This example check whether the SHIFT key is pressed or not.
Before Press the key:
After Press the key:
Supported Browsers: The browser supported by KeyboardEvent shiftKey Property are listed below:
- Internet Explorer
- Google Chrome
- Apple Safari
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.