TouchEvent shiftKey Property
Example
Find out whether or not the "SHIFT" key was pressed when you touch the screen:
if (event.shiftKey) {
alert("The SHIFT key was pressed!");
} else {
alert("The SHIFT key was NOT pressed!");
}
Try it Yourself »
Description
The shiftKey property returns a Boolean value that indicates whether or not the "SHIFT" key was pressed when a touch event was triggered.
Note: On many devices th SHIFT key is represented by the the ("⇧") key.
Note: This property is read-only.
Browser Support
Property | |||||
---|---|---|---|---|---|
shiftKey | 22 | yes | 52 | Not supported | Not supported |
Syntax
event.shiftKey
Technical Details
Return Value: |
A Boolean, indicating whether the "SHIFT" key was pressed when the
touch event occurred.
Possible values:
|
---|
Related Pages
HTML DOM reference: MouseEvent shiftKey Property
HTML DOM reference: TouchEvent altKey Property
HTML DOM reference: TouchEvent ctrlKey Property
HTML DOM reference: TouchEvent metaKey Property
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.