InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

Events are being called for any key on first input in play mode

Open gotenxds opened this issue 7 years ago • 5 comments

Working on macos, unity 2018.3.7f1 input system 0.2.1

So I encountered an odd issue where any events that I have might get called for any button I press on the keyboard, for example, I have the following actions:

image

As you can see I have move and roll actions the roll action is bound to left shift (and only left shift!)

When I start play mode and press any key, for example '8', the preformed event for roll will get fired! controls.Player.Roll.performed += ctx => { Debug.Log("Roll"); };

If I inspect the ctx on debug I can see it thinks the shift key got pressed: image But I pressed '8'.

image

This happens only for the the first input, after this happens it wont happen again until I restart the play mode.

gotenxds avatar Mar 16 '19 15:03 gotenxds

Sounds like a stuck key.

@JiaUnity Does this repro for you?

Rene-Damm avatar Mar 18 '19 14:03 Rene-Damm

@Rene-Damm I thought at first that this might be a stuck key, but I checked multiple times, non of my keys are stuck, also it happens only for the first input, a stuck key would not wait for the first input of a game.

Furthermore, this reproduces on my windows pc which has a different keyboard.

gotenxds avatar Mar 18 '19 14:03 gotenxds

I cannot repro this with 2019.1.0b9 with Develop (7170868)

JiaUnity avatar Mar 26 '19 23:03 JiaUnity

Still no repro @gotenxds does this happen if you bind to another key other than left shift?

JiaUnity avatar Apr 12 '19 23:04 JiaUnity

No repro. Closing.

JiaUnity avatar Apr 19 '19 22:04 JiaUnity