Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

Actions and Action keys

  • Last UpdatedOct 08, 2025
  • 2 minute read

The behavior of the Input module can be controlled by setting the actions and axis configurations.

Actions

Actions are input buttons or combinations of key buttons that can trigger the "pressed" status of an arbitrary action. They are defined by providing a list of actions as arguments of the <Module /> tag, as in the following example:

<group name="input">

<Module name="input_module"

moduleType="InputModule"

version="1.0.0"

mouse_enable="true"

keyboard_enable="true"

action0_name="Sprint" action0="{dic1={key1=SHIFTKEY}}"

action1_name="Pan" action1="{dic1={key1=CONTROLKEY}{key2=MMOUSE}}"

action2_name="ZoomIn" action4="{dic1={key1=MSMOUSEPOS}}"

action3_name="ZoomOut" action5="{dic1={key1=MSMOUSENEG}}"

numActions="4" />

</group>

The syntax for the action definition is

action[ActionIndex]_name="[ActionName]" action[ActionIndex]="[ActionKeys(mdstring)]"

where:

  • ActionIndex is an incremental numeric index starting at 0 (zero)

  • ActionName is an arbitrary name that identifies both the action and the associated output field containing the pressed status of the action, which will be automatically created by the input module matching the ActionName. For example, by defining action 0_name="Sprint", the field output_Sprint_pressed will be automatically created.

  • ActionKeys is an mdstring that defines which key or combination of keys will trigger the pressed status of the action "ActionName".

It is worth noticing that the index must be sequential and with no missing numbers.

The output fields are sbool fields that change their values from false to true when the key or combination of keys defined in the respective action[ActionIndex] argument are pressed, and from true to false when they are released.

Users can define customnames to create actions, but a set of predefined action names is also available for:

  • Navigation module: Sprint, Pan, SelfRotate, TargetRotate, ZoomIn, ZoomOut, Focus, ZoomTrigger, Crouch, Teleport, SwitchCameraMode.

  • Interaction module: ActiveSelection, SelectObject, ActiveAction, NextAction, PrevAction.

See the Integration guide for further details on how to use actions defined from the input module with the other modules.

Action keys

ActionKeys can be defined as:

  • single key, when a single key, for example, "Keyboard Shift", will trigger the corresponding action.

    {dic1={key1=SHIFTKEY}}

  • combination of keys, when two or more keys pressed together, for example: "Keyboard Shift" and "Keyboard A", will trigger the corresponding action.

    {dic1={key1=SHIFTKEY}{key2=A}}

Since the same action could be trigger in different ways, action definition also supports multiple individual keys, combination of keys, or a mixed solution. In the following examples, the action can be triggered when:

  • F and P keys are pressed individually.

  • Pressing Shift and F together. or LMOUSE and P together.

  • Pressing either F individually, P individually, or Shift and A together.

    {dic1={key1=F}}{dic2={key1=P}}

    {dic1={key1=SHIFTKEY}{key2=F}}{dic2={key1=LMOUSE}{key1=P}}

    {dic1={key1=F}}{dic2={key1=P}}{dic3={key1=SHIFTKEY}{key2=A}}

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in