Skip to main content

PointerEvent

Low-level pointer payload with detailed device metrics.

Inherits: Event

Properties

  • device - Unique identifier for the pointing device, reused across interactions.
  • distance - The distance of the detected object from the input surface.
  • distance_max - The maximum value that distance can return for this pointer.
  • global_delta - The delta of the pointer's position since the event start, in logical pixels, within the global coordinate space.
  • global_position - Coordinate of the position of the pointer, in logical pixels in the global coordinate space.
  • kind - The kind of input device for which the event was generated.
  • local_delta - The delta of the pointer's position since the event start, in logical pixels, within the local coordinate space.
  • local_position - The position transformed into the event receiver's local coordinate system according to transform.
  • orientation - The orientation angle of the detected object, in radians.
  • pressure - The pressure of the touch.
  • pressure_max - The maximum value that pressure can return for this pointer.
  • pressure_min - The minimum value that pressure can return for this pointer.
  • radius_major - The radius of the contact ellipse along the major axis, in logical pixels.
  • radius_max - The maximum value that could be reported for radius_major and radius_minor for this pointer, in logical pixels.
  • radius_min - The minimum value that could be reported for radius_major and radius_minor for this pointer, in logical pixels.
  • radius_minor - The radius of the contact ellipse along the minor axis, in logical pixels.
  • size - The area of the screen being pressed.
  • tilt - The tilt angle of the detected object, in radians.
  • timestamp - Time of event dispatch, relative to an arbitrary timeline.

Properties

deviceclass-attributeinstance-attribute

device: float = field(metadata={'data_field': 'dev'})

Unique identifier for the pointing device, reused across interactions.

distanceclass-attributeinstance-attribute

distance: float = field(metadata={'data_field': 'dist'})

The distance of the detected object from the input surface. For instance, this value could be the distance of a stylus or finger from a touch screen, in arbitrary units on an arbitrary (not necessarily linear) scale. If the pointer is down, this is 0.0 by definition.

distance_maxclass-attributeinstance-attribute

distance_max: float = field(metadata={'data_field': 'distMax'})

The maximum value that distance can return for this pointer.

If this input device cannot detect "hover touch" input events, then this will be 0.0.

global_deltaclass-attributeinstance-attribute

global_delta: Optional[Offset] = field(default=None, metadata={'data_field': 'gd'})

The delta of the pointer's position since the event start, in logical pixels, within the global coordinate space.

global_positionclass-attributeinstance-attribute

global_position: Offset = field(metadata={'data_field': 'g'})

Coordinate of the position of the pointer, in logical pixels in the global coordinate space.

kindclass-attributeinstance-attribute

kind: PointerDeviceType = field(metadata={'data_field': 'k'})

The kind of input device for which the event was generated.

local_deltaclass-attributeinstance-attribute

local_delta: Optional[Offset] = field(default=None, metadata={'data_field': 'ld'})

The delta of the pointer's position since the event start, in logical pixels, within the local coordinate space.

local_positionclass-attributeinstance-attribute

local_position: Offset = field(metadata={'data_field': 'l'})

The position transformed into the event receiver's local coordinate system according to transform.

orientationclass-attributeinstance-attribute

orientation: float = field(metadata={'data_field': 'or'})

The orientation angle of the detected object, in radians.

pressureclass-attributeinstance-attribute

pressure: float = field(metadata={'data_field': 'ps'})

The pressure of the touch.

This value is a number ranging from 0.0, indicating a touch with no discernible pressure, to 1.0, indicating a touch with "normal" pressure, and possibly beyond, indicating a stronger touch. For devices that do not detect pressure (e.g. mice), returns 1.0.

pressure_maxclass-attributeinstance-attribute

pressure_max: float = field(metadata={'data_field': 'pMax'})

The maximum value that pressure can return for this pointer. For devices that do not detect pressure (e.g. mice), returns 1.0. This will always be a greater than or equal to 1.0.

pressure_minclass-attributeinstance-attribute

pressure_min: float = field(metadata={'data_field': 'pMin'})

The minimum value that pressure can return for this pointer.

For devices that do not detect pressure (e.g. mice), returns 1.0. This will always be a number less than or equal to 1.0.

radius_majorclass-attributeinstance-attribute

radius_major: float = field(metadata={'data_field': 'rMj'})

The radius of the contact ellipse along the major axis, in logical pixels.

radius_maxclass-attributeinstance-attribute

radius_max: float = field(metadata={'data_field': 'rMax'})

The maximum value that could be reported for radius_major and radius_minor for this pointer, in logical pixels.

radius_minclass-attributeinstance-attribute

radius_min: float = field(metadata={'data_field': 'rMin'})

The minimum value that could be reported for radius_major and radius_minor for this pointer, in logical pixels.

radius_minorclass-attributeinstance-attribute

radius_minor: float = field(metadata={'data_field': 'rMn'})

The radius of the contact ellipse along the minor axis, in logical pixels.

sizeclass-attributeinstance-attribute

size: float = field(metadata={'data_field': 'size'})

The area of the screen being pressed.

This value is scaled to a range between 0 and 1. It can be used to determine fat touch events. This value is only set on Android and is a device specific approximation within the range of detectable values. So, for example, the value of 0.1 could mean a touch with the tip of the finger, 0.2 a touch with full finger, and 0.3 the full palm.

tiltclass-attributeinstance-attribute

tilt: float = field(metadata={'data_field': 'tilt'})

The tilt angle of the detected object, in radians.

timestampclass-attributeinstance-attribute

timestamp: Duration = field(metadata={'data_field': 'ts'})

Time of event dispatch, relative to an arbitrary timeline.