Keys remain down after browser loses focus

If I look at keyboard events this way:

  if(Keyboard.current.wKey.isPressed)
  • holding key

  • click out of the browser focus

  • release key

The unity app still reads as if the key is pressed.

When i regain focus of the browser it also still thinks the key is down until i press and release it again.

I then try to fire off this method

  InputSystem.ResetDevice(Keyboard.current,

strangly this does actually stop it, but as soon as you press any key that old key goes back to the fake down state.

how should i tell unity there are no keys being pressed, or have it know that there are no keys down