TouchEvent Class

https://w3c.github.io/touch-events/#touchevent-interface

public sealed class TouchEvent : UIEvent
Inheritance
UIEvent TouchEvent

Constructors

NameDescription
TouchEvent(string, TouchEventInit?)Creates a touch event of the given type with the given initialization dictionary.

TouchEvent(string, TouchEventInit?)

TouchEvents.cs

Creates a touch event of the given type with the given initialization dictionary.

public TouchEvent(string type, TouchEventInit? eventInitDict = null)

Properties

NameDescription
AltKeyGets a value indicating whether the Alt key was active.
ChangedTouchesGets the touch points that changed: the ones that started, moved or ended (retargeted, see TouchEvent.Touches).
CtrlKeyGets a value indicating whether the Control key was active.
MetaKeyGets a value indicating whether the Meta key was active.
ShiftKeyGets a value indicating whether the Shift key was active.
TargetTouchesGets the touch points that are in contact with the surface and started on the target of the event (retargeted, see TouchEvent.Touches).
TouchesGets the touch points that are in contact with the surface. As in Chromium and Gecko, while the event is dispatched, the targets of the touch points are retargeted against the current target of the event (https://dom.spec.whatwg.org/#retarget), as the target of the event is: a listener outside of a shadow tree does not see the nodes of the shadow tree (the touch points whose target changes are copies, the same ones for the listeners of a tree).

Gets a value indicating whether the Alt key was active.

public bool AltKey { get; }

ChangedTouches

TouchEvents.cs

Gets the touch points that changed: the ones that started, moved or ended (retargeted, see TouchEvent.Touches).

public TouchList ChangedTouches { get; }

Gets a value indicating whether the Control key was active.

public bool CtrlKey { get; }

Gets a value indicating whether the Meta key was active.

public bool MetaKey { get; }

Gets a value indicating whether the Shift key was active.

public bool ShiftKey { get; }

TargetTouches

TouchEvents.cs

Gets the touch points that are in contact with the surface and started on the target of the event (retargeted, see TouchEvent.Touches).

public TouchList TargetTouches { get; }

Gets the touch points that are in contact with the surface. As in Chromium and Gecko, while the event is dispatched, the targets of the touch points are retargeted against the current target of the event (https://dom.spec.whatwg.org/#retarget), as the target of the event is: a listener outside of a shadow tree does not see the nodes of the shadow tree (the touch points whose target changes are copies, the same ones for the listeners of a tree).

public TouchList Touches { get; }

Methods

NameDescription
GetModifierState(string)Returns whether the given modifier key was active when the event occurred.

GetModifierState(string)

TouchEvents.cs

Returns whether the given modifier key was active when the event occurred.

public bool GetModifierState(string keyArg)