HTML | DOM KeyboardEvent shiftKey Property Last Updated : 06 Jul, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report 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. Syntax: event.shiftKey Below program illustrates the KeyboardEvent shiftkey Property in HTML DOM: Example: This example check whether the SHIFT key is pressed or not. html <!DOCTYPE html> <html> <head> <title> HTML DOM KeyboardEvent shiftKey Property </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>KeyboardEvent shiftKey Property</h2> <p> Check whether the SHIFT key is pressed or not </p> <input type="text" onkeydown="keyboard(event)"> <p id="test"></p> <!-- script to check shift key is pressed or not --> <script> function keyboard(event) { var a = document.getElementById("test"); if (event.shiftKey) { a.innerHTML = "The Shift key has been pressed!"; } else { a.innerHTML = "The Shift key has not been pressed!"; } } </script> </body> </html> Output: Before Press the key: After Press the key: Supported Browsers: The browser supported by KeyboardEvent shiftKey Property are listed below: Opera 12.1Internet Explorer 9Google Chrome 1Edge 12Firefox 1.5Apple Safari 1.2 Comment More infoAdvertise with us Next Article HTML | DOM KeyboardEvent keyCode Property S Shubrodeep Banerjee Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Input Image Object The Input Image Object in HTML DOM is used to represent the HTML < input > element with type=âimageâ. This tag is used to access or create the element. This element can be accessed by using getElementById() method. Syntax: document.getElementById("MyImage"); Return Value: It return the propert 3 min read HTML | DOM Ol start Property The DOM Ol start property is used to set or return the value of the start attribute in an ordered list. The start attribute in HTML is used to specify the start value for numbering the individual list item. It is used with an ordered list. Syntax: It is used to return the start property. olObject.st 2 min read HTML | DOM Option disabled Property The DOM Option disabled Property is used to set or return whether the value of an option would be disabled or not. The disabled attribute for the element in HTML is used to specify that the option value is disabled. A disabled option is un-clickable and unusable. It is a boolean attribute. Syntax: I 2 min read HTML | DOM KeyboardEvent keyCode Property The KeyboardEvent keyCode property is used for returning the Unicode character code of the key that has been used to trigger an onkeypress event. The KeyboardEvent keyCode property is also used for returning the Unicode character code of a key that has triggered an onkeydown or onkeyup event. The ke 2 min read HTML DOM InputEvent The input event is fired when the user changes an element, the value of an element or <textarea> element. DOM InputEvent occurs when an element in the HTML document gets input from the user. InputEvent property: data: Returns the inserted characters.dataTransfer: Returns an object containing i 2 min read HTML | DOM Parameter Object The Parameter Object in HTML DOM is used to create and access the <param> element with in the object.Parameters for plugin embedded with an element is done by using the element. Syntax: It is used to access a <param> element.var x = document.getElementById("myParam");It is used to create 2 min read HTML | DOM Link Object HTML DOM Link Object is used to access HTML <link> element.Syntax: To Access a HTML element: document.getElementById("myLink"); To Create a New HTML element: document.createElement("LINK"); Property Values: ValueDescriptioncharsetIt assigns the character encoding of the linked documentcrossOri 2 min read HTML DOM Style quotes Property The Style quotes Property in HTML DOM is used to set/return the type of quotation marks for embedded quotations. This element can be accessed by using getElementById() method. Syntax: To get the property.object.style.quotesTo set the property.object.style.quotes = "none | string string string string 2 min read HTML DOM KeyboardEvent getModifierState() Method The KeyboardEvent getModifierState() method in HTML DOM is used to return whether a specified modifier key is pressed, or activated. The KeyboardEvent getModifierState() method returns true if the specified key is pressed, otherwise it returns false. The list of key which is pressed then Modifier ke 1 min read HTML | DOM KeyboardEvent location Property The KeyboardEvent location property is used for returning a number that indicates the location of a key on the keyboard or device. The KeyboardEvent location property can be used on the onkeydown and onkeyup events but not on onkeypress. The number returned by KeyboardEvent location property is repr 2 min read Like