HTML DOM TouchEvent

TouchEvent Object

Events that occur when a user touches a touch-based device belong to the TouchEvent object.

Touch Event Properties and Methods

Property/Method Description
altKey Returns whether the 'ALT' key was pressed when the touch event was triggered.
changedTouches Returns a list of all touch objects whose state has changed between the last touch and this touch.
ctrlKey Returns whether the 'CTRL' key was pressed when the touch event was triggered.
metaKey Returns whether the 'meta' key was pressed when the touch event was triggered.
shiftKey Returns whether the 'SHIFT' key was pressed when the touch event was triggered.
targetTouches Returns a TouchList list containing all touch points still in contact with the touch surface.
touches Returns a list of all touch objects currently in contact with the surface.

Inherited properties and methods

TouchEvent inherits all properties and methods from the following objects:

UiEvent

Event Object

Event Type

These event types belong to the TouchEvent object:

Event Description
ontouchcancel This event occurs when the touch is interrupted.
ontouchend This event occurs when a finger is removed from the touch screen.
ontouchmove This event occurs when a finger is dragged on the screen.
ontouchstart This event occurs when a finger is placed on the touch screen.