XR Device Simulator WASD inputs ignored

Is anyone else having problems getting WASD inputs to work? I’ve tried Unity 2021.3.11 and 2020.3.40, and I’m at the end of my rope.

  • I’m adding the packages (XR Toolkit, XR Plugin Management) and both Starter Assets and XR Device Simulator “samples”.
  • I’m adding the Starter Asset presets as default configs.
  • I’m adding an XR Origin (Action-based), an Interaction Manager component and a Input Action Manager.
  • I’m adding the XRI Default Input Actions to the Input Action Manager. Everything works fine when connecting to an actual headset.
  • I’m adding the XR Device Simulator prefab to the scene.
  • I’m making sure the Input system is New or Both in Player Settings.

But when I try to simulate… Well, the mouse works. Shift and Space works. R works. So it seems like the system isn’t having problems detecting keyboard inputs.

It’s just not very interested in WASD or Q/E.

I know this was working before, and I swear I’m following the same steps… Any suggestions greatly appreciated. Is this me forgetting something, or is it a bug?

2 Likes

I managed to get it working on 2020.3.34 and 2020.3.40, though I had to add the XR Toolkit package manually to the json file in the case of 2020.3.40.

Still having problems with 2021.3.11 though. I’m not doing anything different; taking the same steps just results in different outcomes.

EDIT: I tried forcing a newer version of the plugin in 2021.3.11. Recommended verison was 2.0.3 (didn’t work), and the 2020.3.x versions worked fine with 2.1.1.

Reimported everything, recreated the scene. No change. Seems like it’s a 2021.x issue, rather than a plugin version issue.

1 Like

UPDATE (2022-10-26): The shortcut support in Input System package is changing to be opt-in for version 1.4.4 and this script below will not be necessary with that version.

I think this may be an issue caused when using the Input System package at version 1.4.0 or higher. If you are referring to using the WASD keys for keyboard translation (done by pressing 3 to toggle that feature), that feature is currently conflicting with the same keyboard keys bound to other input actions in composite bindings used by the simulator.

As a workaround to resolve the issue until a permanent fix is in place, try disabling the keyboard shortcuts feature of Input System by adding this component to a GameObject:

using UnityEngine;
using UnityEngine.InputSystem;

[DefaultExecutionOrder(-30000)]
public class ShortcutDisabler : MonoBehaviour
{
    protected void Awake()
    {
        // Disable Input System 1.4.0 shortcut feature by adding this component to an enabled GameObject
        // in your main/first scene.
        // See https://docs.unity3d.com/Packages/com.unity.inputsystem@1.4/changelog/CHANGELOG.html#140---2022-04-10
        InputSystem.settings.SetInternalFeatureFlag("DISABLE_SHORTCUT_SUPPORT", true);
    }
}

Thank you!

Yeah, that’s what I was referring to, sorry I wasn’t clear.

And I can confirm the workaround works like a charm!

1 Like

Seems that 1.4.4 XR bindings disable keyboard bindings in PC builds (works fine in Editor). I spent close to a week debuging this. I had to put keyboard bindings in a separate game object with a separate InputAction.

just wanted to let yall know i had this same issue but resolved it by updating my xr interaction toolkit package in the package manager window!

1 Like

I got mine to work by getting the XR Interaction 2.3 loaded - BUT you then have the XR simulator settings in your package manager

How do you upgrade to XRI 2.3 without breaking your project? When I tried to update to XRI 2.3, and after re-importing the XR Device Simulator, my project no longer compiles, saying “No Controller Action Asset has been defined, please assign one for the XR Device Simulator to work.”