Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

shiftKey Event property

shiftKey Event property

Event Object Reference Event Object


Definition and Usage

The shiftKey event property returns a Boolean value indicating whether the "SHIFT" key was pressed and held down when the event occurred.

Syntax

event.shiftKey=true|false|1|0

 


Example

Example

The following example shows whether the "SHIFT" key is held down when a mouse button is clicked:

Runoob Tutorial(runoob.com)

Click this paragraph, and a popup will indicate whether the shift key is pressed.

Try it »


Event Object Reference Event Object