Skip to content

ScreenSpaceEvent

ScreenSpaceEvent is an event callback for mouse or touch interactions.

See also: ScreenSpaceEventHandler#setInputAction

Only inside ScreenSpaceEventHandler.

PropertyTypeDescription
action((e: { position: Cartesian2; } | { startPosition: Cartesian2; endPosition: Cartesian2; }) => void) | undefinedIf empty, the event will be removed even if there is the default event.
modifierKeyboardEventModifier | KeyboardEventModifier[] | undefinedKeyboard modifier(s) that must be held for the action to fire.- Single value (KeyboardEventModifier.ALT): action fires when only that modifier is held.- Array ([ALT, SHIFT]): chord — action fires only when all listed modifiers are held simultaneously.Multi-key chords require Cesium 1.142+. Content-equal but reference-fresh arrays do not retrigger the underlying setInputAction call.
typeScreenSpaceEventType