Input System: How To Prevent Mouse From Auto-Switching Control Scheme?

I am making a game where the mouse is only used as a secondary pointer device for menu navigation. Use of mouse is 0% necessary and is completely optional, but provided for UI convenience.

I am using the InputSystem package.

Whenever the mouse is moved, the current control scheme automatically changes from whatever is current to “Keyboard&Mouse”. I want to keep automatic control scheme switching based on keyboard/gamepad/joystick input, and I want the player to be able to use the mouse for UI input, but I want to remove the mouse from the automatic control scheme switching equation entirely.

How can I accomplish this?

1 Like

Figures that five minutes after I post this question I figured it out.

The key is not to remove the Mouse device from the Keyboard&Mouse scheme, but to ADD the Mouse device to all other schemes (i.e. Gamepad and Joystick schemes).

Editing the schemes themselves is not entirely straightforward:

  1. Open the Input Action Asset
  2. In the upper left uncaptioned dropdown, choose the control scheme you want to edit.
  3. Open the same dropdown again, and this time choose “Edit Control Scheme…”
  4. From there you can add the Mouse device to the Control Scheme. In my case I made it optional.

Once I did this, moving the mouse did not cause my Control Scheme to change. Oh Happy Day!

Thank you everyone for helping me “rubber duck” this one.