Shift Input.GetKey returns true even if button no longer held down on Mac WebGL if Shift+Command+4 is pressed (screenshot)
Hi,
Using Unity 2019.3.1f1.
Input.GetKey(KeyCode.LeftShift)
in WebGL returns true even if shift is not pressed after user on mac os presses Shift+Command+4 to take a screenshot. It seems to miss all input events while the screenshot is being taken.
Tried adding Input.ResetInputAxes();
into OnApplicationFocus
but it turns out unity does not seem to lose focus - just misses the GetKeyUp event so it thinks the key is still pressed after the screenshot.
Even the browser does not get the "focus" or "visibilitychange" events before/after the screenshot.
Does anyone have a workaround for this or am I simply missing something?
Thanks!
Comment
Update: Also tried using the new InputSystem from Unity, but unfortunately it changed nothing.