Listen to input events with ISDK
Updated: Jun 25, 2025
The
IsdkSystem class emits events through Spatial SDK’s pre-existing
InputListener interface. Events are emitted after all grabbed entities have been moved.
When using Interaction SDK in your project, use the InputListener’s onPointerEvent method instead of the onInput method to get information about interactions. onPointerEvent is an alternative, generic way to handle input events. InputListener.onClickDown, onClick, onHoverStart, onHoverStop are powered by onPointerEvent and so should still be used in place of InputListener.onInput.
Grabbable events don’t receive onClick events for controller trigger presses. If you need that functionality, you can use InputListener.onInput, but your interaction may not work well with hand tracking enabled.
You should use onPointerEvent because it adds the following additional information that’s unavailable through regular InputListener.onInput style events:
- Accurate Scroll X/Y values as floating point (0 -> 1).
SemanticType of the interactable - is this a grab, select or scroll (see SemanticType).- (Through the
IsdkSystem class) The given pointer event came from a left/right/unknown handed device. - (Through the
IsdkSystem class) The type of interactor that invoked the event (see the InteractionEventSourceBehavior enum for more details).
onPointerEvent omits the following information:
- Which controller buttons are pressed.
- No pointer event is emitted for controller trigger presses on entities with a
Grabbable component.
For applications that still rely on the InputListener.onInput callback, Interaction SDK Direct Touch interactions, like touching a panel with your fingertip, will be sent as an emulated trigger button press (ButtonBits.ButtonTriggerL for left hand/controller or ButtonBits.ButtonTriggerR for right hand/controller).