modifierKeys
TypeScriptget modifierKeys(): _SwiftUICore_EventModifiersSwift declarationvar modifierKeys: EventModifiersThe set of active modifier keys at the time of this event.
struct · iOS 18.0+ · SDK 27.1
struct EventA spatial event generated from an input like a touch or click that can drive gestures in the system. You receive a collection of these events in the form of a ``SpatialEventCollection`` that's the input to the ``Gesture/onChanged(_:)`` or ``Gesture/onEnded(_:)`` method of a ``SpatialEventGesture``. Inspect individual events to track interactions that enable you to create complex, multi-touch experiences in your app.
get modifierKeys(): _SwiftUICore_EventModifiersSwift declarationvar modifierKeys: EventModifiersThe set of active modifier keys at the time of this event.
set modifierKeys(value: _SwiftUICore_EventModifiers)Swift declarationvar modifierKeys: EventModifiersThe set of active modifier keys at the time of this event.
get inputDevicePose(): (SpatialEventCollection_Event_InputDevicePose) | nullSwift declarationvar inputDevicePose: SpatialEventCollection.Event.InputDevicePose? { get set }The 3D position and orientation of the device controlling the touch, if one exists.
set inputDevicePose(value: (SpatialEventCollection_Event_InputDevicePose) | null)Swift declarationvar inputDevicePose: SpatialEventCollection.Event.InputDevicePose? { get set }The 3D position and orientation of the device controlling the touch, if one exists.
get id(): SpatialEventCollection_Event_IDSwift declarationvar id: SpatialEventCollection.Event.IDAn identifier that uniquely identifies the event over its lifetime.
set id(value: SpatialEventCollection_Event_ID)Swift declarationvar id: SpatialEventCollection.Event.IDAn identifier that uniquely identifies the event over its lifetime.
get kind(): SpatialEventCollection_Event_KindSwift declarationvar kind: SpatialEventCollection.Event.KindThe event's input source.
set kind(value: SpatialEventCollection_Event_Kind)Swift declarationvar kind: SpatialEventCollection.Event.KindThe event's input source.
get phase(): SpatialEventCollection_Event_PhaseSwift declarationvar phase: SpatialEventCollection.Event.PhaseThe phase of the event.
set phase(value: SpatialEventCollection_Event_Phase)Swift declarationvar phase: SpatialEventCollection.Event.PhaseThe phase of the event.
get location(): { x: number; y: number }Swift declarationvar location: CGPointThe 2D location of the event.
set location(value: { x: number; y: number })Swift declarationvar location: CGPointThe 2D location of the event.
get timestamp(): numberSwift declarationvar timestamp: TimeIntervalThe time the event was processed.
set timestamp(value: number)Swift declarationvar timestamp: TimeIntervalThe time the event was processed.
No declarations were skipped in this snapshot.