Skip to main content
Version: 14 Oct 2024

Action Bindings

Overview

Action bindings map key, mouse, and gamepad input to actions that manipulate an object in the virtual room and generate corresponding events. For instance, if the object is a hand, you can use the left-arrow key to move the hand to the left, which generates events in the Application Simulator system that your application would see through the MLHandTracking API as a change in hand position toward the left.

Examples of actions include:

  • move-left/right
  • rotate (pitch, yaw, roll)
  • eye blink
  • trigger-OK-gesture

Examples of objects, also known as targets, include:

  • Scene View camera (either free-fly camera or top-down camera)
  • Head Pose (also known as Device View camera)
  • Control
  • Right Hand
  • Left Hand
  • Eye Gaze

The Application Simulator defines a set of bindings for common actions, primarily movement and rotation, which manipulate one of the targets above. The target being manipulated is called the active target.

Here’s an illustration of default bindings for the Primary Navigation actions. Please refer to the default bindings tables at the end of this page for more.

Diagram of Default Action Bindings

If you want to use a gamepad as input, be sure to connect it to your computer. The Application Simulator remembers bindings for the gamepad if it is disconnected.

Action Focus Areas

In order for keyboard action bindings to work, one of the following three areas (called Action Focus Areas) in the Application Simulator window must have the input focus. Gamepad inputs will always work regardless of the focus area:

  1. Scene View
  2. Device View
  3. Touchpad in Control Panel
Action Focus Areas Diagram
note

We suggest that you change focus to the Scene View or Device View using the secondary mouse button (usually the right button). The primary mouse button works too but it will likely change the selected object in the view, which may not be what you want.

Active Target Selection

When the Scene View, Device View, or Control's Touchpad area receives input focus, they automatically switch the active target to the Scene View Camera, Head Pose, or Control, respectively.

Another target can be selected as the active target using shortcut keys when an action focus area has the focus. The Application Simulator provides default shortcut keys to change the active target:

KeySelect Target
5select and toggle between scene view camera and head pose
6select control
7select and toggle between left hand and right hand
8select eye gaze

Another way to change the active target is to use the navigation target dropdown menu.

Change the Activate Target from the Navigation Target Dropdown Menu

After you select the active target from the dropdown menu, in order to use keyboard inputs, you need to click on one of the action focus areas (see Action Focus Area section above).

note

Only the first choice of action focus area will preserve the active target. If you click on another area, the corresponding target (Scene View Camera or Head Pose or Control) becomes the active target as usual.

Open Bindings

The Action Bindings window lets you view and change which input is mapped to which action.

  1. Click the Application Simulator dropdown menu on the top left corner of the window.

  2. Click Edit Action Bindings.

The Action Bindings window (namely the Action Binding Editor) appears, which shows current action bindings and lets you edit them.

Application Simulator Action Bindings

Action Levels

There are three levels of actions depending on their commonality.

  1. Level 1 Actions: These actions are the common actions that apply to all types of targets. They act upon the active target. The Primary Navigation section in the editor window defines bindings for level 1 actions. Please see the following Primary Navigation section for more.

  2. Level 2 Actions: These actions are common to one type of target, e.g. hand. Examples include actions for triggering a gesture of a hand in addition to those to move or rotate a hand. You need to select which hand, left or right, is the active target. The Current Camera, Current Hand, and Current Control sections in Action Bindings define bindings for level 2 actions. Note that the scene view camera and head pose (aka Device View camera) belong to the type of “camera”.

Action Levels 1 & 2

For example, you can define key “L” to move the control left.

  1. Level 3 Actions: These actions apply to one specific target, for example left hand, or scene view camera, regardless of the active target. All sections in the Scene View define bindings for level 3 actions.
Action Level 3

For example, you can define key “M” to roll the left hand, or define key “K” to trigger the OK gesture of the right hand.

General Section

Action Bindings General Tab

The General section in the Action Bindings window defines miscellaneous action bindings. For instance, it defines bindings for selecting the active target:

Action Bindings General Tab Expanded

Edit an Action Binding

Go to the action binding you want to change.

  1. To add a new binding, click + and use the Dialog Box.
Add a New Action Binding

Then you should see the following dialog:

Add a New Action Binding Dialog Window
  1. To change an existing binding, double-click the existing binding.
Edit an Existing Binding

Then you should see the following dialog:

Editing an Existing Binding Dialog Window

To Bind a Gamepad Stick

  1. Click the mouse icon.
  2. From the drop-down menu, select the mouse button or movement type you want to bind to this action. Any modifier keys can be selected from this menu as well.
  3. To cancel changing an action binding, press Esc.

Reset Bindings

Click Reset on the group menu to restore a group of action bindings to their default settings.

Reset Action Bindings

To restore action bindings of a category to default, click the Reset button for that category.

Reset Action Bindings in a Category

To restore action bindings of a device (for example, all of keyboard/mouse), click the Settings icon next to the device and choose Reset Bindings to Factory Default:

Reset Action Bindings of a Device

Setting Deadzone and Sensitivity

The settings for sensitivity and deadzone can be changed for binding when applicable.

Change the Sensitivity and Deadzone settings
note

The default settings for deadzone and sensitivity can be changed globally for a device from the main window under Settings > Application Simulator > Peripherals.

Saving Action Bindings

Currently, defined action bindings can be saved and loaded at a later time. Action bindings are saved as .mlscheme files.

Save Your Current Action Bindings as a Preset

The Save command is enabled if you have unsaved changes to the current set of action bindings.

Context Menus

Input Device Context Menu

Input Device Context Menu
  • Reset Bindings to Factory Default Reset: Resets input binding for the device to factory defaults.
  • Clear All Bindings: Deletes all input bindings for the device.
  • Filter to This Peripheral: Displays actions bound to input from the device.
  • Find Binding for Input: Lets the user discover which actions are bound to a given input. While active, the device selector highlights and continuously scans the device for inputs. Trigger keyboard or mouse inputs (for the "Peripheral - Key/Mouse" device) or a connected controller (for other devices). The highlighted area shows the detected inputs and which actions are bound to it. Click Stop Showing Inputs to end the scan.
Find Binding for Input Entity

Invoke any input from keyboard/mouse/gamepad, and the entity shows which action is bound to it.

  • Apply Presets: Allows you to apply a set of predefined bindings to the device. This is especially useful for a gamepad – for example with a Logitech gamepad connected, the command allows you to bind its input with common bindings of a Microsoft XBox 360 Pad.
Apply Preset to the Device

Default Gamepad Bindings

The following are the default action bindings when a USB gamepad is connected.

Movement Controls

Gamepad inputSimulated action
D-pad Left/RightMoves the Control along its X-axis (left/right)
D-pad Up/DownMoves the Control along its Z-axis (forwards/back)
Left TriggerRotates the Control along its X-axis (pitch)
Right TriggerRotates the Control along its Y-axis (yaw)
B buttonResets the Control position and orientation
A buttonTouchpad Tap gesture

Head Pose

Gamepad inputSimulated action
Left Stick Left/RightMoves head pose along the X-axis (left/right)
Left Stick Up/DownMoves head pose along the Z-axis (forwards/back)
Right Stick Left/RightRotates head pose along the X-axis (yaw)
Right Stick Up/DownRotates head pose along the Y-axis (pitch)
Back buttonResets head pose
Y buttonToggles between relative and absolute movement

Simulating Gestures

Gamepad inputSimulated action
Left bumperLeft thumbs up gesture
Right bumperRight thumbs up gesture

Default Keyboard Bindings for the Scene View

The following are the default action bindings when a keyboard and mouse are connected.

Tools Mode

KeySimulates this action
QNo manipulation mode
WMove manipulation mode
ERotate manipulation mode
RScale manipulation mode
2 or CTop Down/ Fly cam toggle
ZPivot/Center toggle
XLocal/World toggle
FMoves pivot point to the selection and the camera moves the same amount, maintains camera orientation towards pivot point
GMoves pivot point to the selection and rotates the camera towards the selection
Left Mouse DragScreen space camera and pivot point pan
Middle Mouse WheelMoves camera closer to pivot point
Alt + left mouse dragPivot point orbit
Middle Mouse DragScreen space camera and pivot point pan
Ctrl + Alt + Left Mouse DragPivot zoom
ShiftAccelerate key

Fly Cam Mode

Press the listed mapping and the right-mouse button for the following.

KeySimulates this action
Right Mouse DragRotate camera and pivot point
W or up arrowMove camera and pivot point forward
S or down arrowMove camera and pivot point back
A or left arrowMove camera and pivot point left
D or right arrowMove camera and pivot point right
QMove camera and pivot point up
Alt + WRotate camera pitch up
Alt + SRotate camera pitch down
Alt + ARotate camera yaw left - world Y-axis
Alt + DRotate camera yaw right - world Y-axis
Alt + QRotate camera yaw left - world Y-axis
Alt + ERotate camera yaw right - world Y-axis
EMove camera and pivot point Down
FMoves pivot point to selection and camera moves same amount, maintains camera orientation towards pivot point
GMoves pivot point to selection and rotates camera towards selection
2 or CTop down/ Fly cam toggle
Middle Mouse WheelMoves camera closer to pivot point
Alt + Right Mouse DragPivot zoom
Shift keyAccelerate key

Top Down Camera Mode

These control the Top Down/Fly Cam camera

KeySimulates this action
W or up arrowMove camera North (Up - Z axis)
S or down arrowMove camera South (Down - Z axis)
A or left arrowMove camera West (Left - X axis)
D or right arrowMove camera East (Right - X axis)
FMoves pivot point to selection and camera moves same amount, maintains camera orientation towards pivot point
Middle Mouse WheelMove Camera forward/back (with a limit at Y = 0)
Left mouse dragXZ Plane Camera Pan
Shift keyAccelerate key

Default Keyboard Bindings for the Device View

The following are the default action bindings when a keyboard and mouse are connected.

KeySimulates this action
Shift keyAccelerate mappings (3x sensitivity)
Alt + WRotate headpose pitch up
Alt + SRotate headpose pitch down
Alt + ARotate headpose yaw left - world Y-axis
Alt + DRotate headpose yaw right - world Y-axis
Alt + QRotate headpose yaw left - world Y-axis
Alt + ERotate headpose yaw right - world Y-axis
Middle mouse wheel YZoom
Middle mouse wheel XZoom x3 faster
Right mouse dragRotate headpose