PointerEvent

open class PointerEvent(val type: EventType<PointerEvent>, init: PointerEventInit = definedExternally) : MouseEvent(source)

The PointerEvent interface represents the state of a DOM event produced by a pointer such as the geometry of the contact point, the device type that generated the event, the amount of pressure that was applied on the contact surface, etc.

MDN Reference

Constructors

Link copied to clipboard
constructor(type: EventType<PointerEvent>, init: PointerEventInit = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The altitudeAngle read-only property of the PointerEvent interface represents the angle between a transducer (a pointer or stylus) axis and the X-Y plane of a device screen.

Link copied to clipboard

The MouseEvent.altKey read-only property is a boolean value that indicates whether the alt key was pressed or not when a given mouse event occurs.

Link copied to clipboard
Link copied to clipboard

The azimuthAngle read-only property of the PointerEvent interface represents the angle between the Y-Z plane and the plane containing both the transducer (pointer or stylus) axis and the Y axis.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The MouseEvent.button read-only property indicates which button was pressed or released on the mouse to trigger the event.

Link copied to clipboard

The MouseEvent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The clientX read-only property of the MouseEvent interface provides the horizontal coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).

Link copied to clipboard

The clientY read-only property of the MouseEvent interface provides the vertical coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).

Link copied to clipboard
Link copied to clipboard

The MouseEvent.ctrlKey read-only property is a boolean value that indicates whether the ctrl key was pressed or not when a given mouse event occurs.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val detail: Int

The UIEvent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count.

Link copied to clipboard
Link copied to clipboard

The height read-only property of the geometry, along the y-axis (in CSS pixels).

Link copied to clipboard

The isPrimary read-only property of the created the event is the primary pointer.

Link copied to clipboard
Link copied to clipboard
val layerX: Int

The MouseEvent.layerX read-only property returns the horizontal coordinate of the event relative to the current layer.

Link copied to clipboard
val layerY: Int

The MouseEvent.layerY read-only property returns the vertical coordinate of the event relative to the current layer.

Link copied to clipboard

The MouseEvent.metaKey read-only property is a boolean value that indicates whether the meta key was pressed or not when a given mouse event occurs.

Link copied to clipboard

The movementX read-only property of the MouseEvent interface provides the difference in the X coordinate of the mouse pointer between the given event and the previous Element/mousemove_event event.

Link copied to clipboard

The movementY read-only property of the MouseEvent interface provides the difference in the Y coordinate of the mouse pointer between the given event and the previous Element/mousemove_event event.

Link copied to clipboard
Link copied to clipboard

The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.

Link copied to clipboard

The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.

Link copied to clipboard

The pageX read-only property of the MouseEvent interface returns the X (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document.

Link copied to clipboard

The pageY read-only property of the MouseEvent interface returns the Y (vertical) coordinate (in pixels) at which the mouse was clicked, relative to the top edge of the entire document.

Link copied to clipboard

The pointerId read-only property of the event.

Link copied to clipboard

The pointerType read-only property of the that caused a given pointer event.

Link copied to clipboard

The pressure read-only property of the input.

Link copied to clipboard

The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one.

Link copied to clipboard

The screenX read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in screen coordinates.

Link copied to clipboard

The screenY read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in screen coordinates.

Link copied to clipboard

The MouseEvent.shiftKey read-only property is a boolean value that indicates whether the shift key was pressed or not when a given mouse event occurs.

Link copied to clipboard

The tangentialPressure read-only property of the the pointer input (also known as barrel pressure or cylinder stress).

Link copied to clipboard
Link copied to clipboard
val tiltX: Int

The tiltX read-only property of the PointerEvent interface is the angle (in degrees) between the Y-Z plane of the pointer and the screen.

Link copied to clipboard
val tiltY: Int

The tiltY read-only property of the PointerEvent interface is the angle (in degrees) between the X-Z plane of the pointer and the screen.

Link copied to clipboard
Link copied to clipboard
val twist: Int

The twist read-only property of the (e.g., pen stylus) around its major axis, in degrees.

Link copied to clipboard
open override val type: EventType<PointerEvent>
Link copied to clipboard
val view: Window?

The UIEvent.view read-only property returns the is the Window object the event happened in.

Link copied to clipboard

The width read-only property of the geometry along the x-axis, measured in CSS pixels.

Link copied to clipboard
val x: Double

The MouseEvent.x property is an alias for the MouseEvent.clientX property.

Link copied to clipboard
val y: Double

The MouseEvent.y property is an alias for the MouseEvent.clientY property.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The getCoalescedEvents() method of the PointerEvent interface returns a sequence of PointerEvent instances that were coalesced (merged) into a single Element/pointermove_event or Element/pointerrawupdate_event event. Available only in secure contexts.

Link copied to clipboard

The MouseEvent.getModifierState() method returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.

Link copied to clipboard

The getPredictedEvents() method of the PointerEvent interface returns a sequence of PointerEvent instances that are estimated future pointer positions.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard