Quick way to get input?

Is there any way to quickly get input from a key or button with the new input system?

Something equivalent to:
Input.GetKeyDown(KeyCode.Q)

Right now the only way I know to get input is tu declare an action, set a key for it etc, etc…

Pretty inconvinient when prototyping or testing things out.

For example:

if (Keyboard.current.qKey.wasPressedThisFrame) {}

if (Mouse.current.leftButton.wasPressedThisFrame) {}

otherwise see the documentation:
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Migration.html

1 Like

Very useful stuff, thanks a ton :smile:

1 Like