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
- HTML | DOM TouchEvent shiftKey Property
- HTML | KeyboardEvent which Property
- HTML | DOM KeyboardEvent key Property
- HTML | DOM keyboardEvent charCode Property
- HTML | DOM KeyboardEvent code Property
- HTML | DOM KeyboardEvent metaKey Property
- HTML | DOM KeyboardEvent location Property
- HTML | DOM KeyboardEvent keyCode Property
- HTML DOM | KeyboardEvent altKey Property
- HTML | DOM KeyboardEvent
- HTML | DOM KeyboardEvent getModifierState() Method
- HTML | DOM Bdo dir Property
- HTML | DOM value Property
- HTML | DOM li value Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.