Adding hotkey controls to turn your avatar

By default, there are no keyboard controls to turn your avatar in ENGAGE. Instead, on a desktop device, you use the mouse to change the direction in which your avatar faces. However, you can use third-party software to simulate mouse drags so that you can fully navigate in ENGAGE using only the keyboard.

With the Mouse Keys feature, you can use the zero key to drag items in most applications. However, this is not supported for looking around in ENGAGE.

One example of third-party software that you could use is AutoHotkey (https://www.autohotkey.com/). You can use it to assign a simulated drag operation to a keyboard shortcut. The following AutoHotkey script assigns a left drag to the Shift+A shortcut, and a right-drag to the Shift+D shortcut:

#Requires AutoHotkey v2.0

+a::
{
    SendMode "Event"
    MouseClickDrag "Left", 0, 0, -200, 0, 60, "R"
}

+d::
{
    SendMode "Event"
    MouseClickDrag "Left", 0, 0, 200, 0, 60, "R"
}

Using the AutoHotkey script

  1. Install AutoHotkey. For more information, refer to How to Install AutoHotkey.

  2. Open a text editor, such as Notepad.

  3. Copy the code above into a new text document, and then save it with a .ahk extension. For example engage_keyboard_turn.ahk

  4. Find the script in Windows Explorer, and then double click it to run the script. Alternatively, select the script and then press the Enter key to run it.

The script runs and an icon is added to the system tray. To stop the script, right-click the icon in the system tray, and then select Exit. For more information about how to create, run, and control scripts, refer to Using the Program in the AutoHotkey documentation.

Using the shortcuts in ENGAGE

  • In a Session, ensure that the mouse cursor is within the ENGAGE window. Then, hold down the Shift key and press the A key to turn left or the D key to turn right.

If you hold down the A or D key first, and the press Shift, your avatar will walk sideways as normal.

Understanding the script

The +a:: and +d:: parts define the shortcut keys. The plus symbol indicates the Shift key. You can define any other key combination. You can replace the plus symbol with # for the Windows key, ^ for the Ctrl key, or ! for the Alt key. For more information about defining the hotkey, refer to Basic Hotkeys.

SendMode "Event" sets a simulation mode that creates a slow, noticeable drag event. Without it, the drag would not be recognized by ENGAGE.

MouseClickDrag is the command that simulates the mouse being dragged. It is configured to simulate the left mouse button being held, and then dragged 200 pixels left (-200) or right (200). For more information about the available parameters, refer to MouseClickDrag in the AutoHotkey documentation.

Last updated