Hello everyone,
I have two actions in my InputActions – one is bound to Alt and the other is bound to Shift. Both actions have the Press interaction with Release Only trigger behavior. Pressing Alt while the shift action is being pressed results to a canceled callback on the shift action. This prevents the shift action from being performed once the shift key is released. Using ReadValue on the shift action also returns 0 even if the shift key is being pressed.
When you open the input debugger (“Window >> Analyze >> Input Debugger” in the editor’s main menu) and double-click the keyboard and then go through the sequence of pressing shift and then alt, does the shift key reset to 0 in the debugger?
What’s the platform?
Nope, shift value stays at 1. I’m using 2019.4.7f on Windows 10.
And there’s no enabling/disabling going on from inside the callbacks?
From the sounds of it, would like to take a closer look to see whether something isn’t behaving as it should. Would you mind filing a ticket with the Unity bug reporter? (“Help >> Report a Bug…” in the editor’s main menu)
Figured out the problem.
Turns out Left Alt + Shift triggers input language switching in Windows, which I think causes the shift action to be canceled when Alt is pressed. Disabling/changing the language switching hotkey fixes the problem.
Anyways thanks for the help!