Input system sends keyboard events continuously after fullscreen mode change

Hello.
I was making a fullscreen switch in settings for my game, and I noticed a strange bug: if I switch the fullscreen mode using an arrow key press (basically horizontal navigation move), this input continues to be produced after the fullsreen mode switch until I fire another keyboard event again. It results in constant switches between fullscreen and windowed mode cuz it starts turning the switch around and around.

I should mention that I’m doing all of that on MacOS, maybe this problem doesn’t appear in Windows, but still. Everything’s fine on gamepad.

1 Like

Upd: ended up just resetting the keyboard device after fullscreen mode switch.

This bug is still present in Unity 2022.3.19f1…

My use case was as well switching fullscreen modes. Bug is activated both MaximizedWindow to Windowed and vice versa. When i switch an option with left or right on keyboard, fullscreen mode changes, but with it my input gets stuck triggering continuously. It only stops if i press the same input before pressing any other.

  1. Only on MacOs, it works fine on Windows
  2. Only while using keyboard, controllers work fine.

Currently, it is March 2025. Shockingly, this bug still exists across various versions of Unity. I tested all versions from 2022.3.23f1 to 6000.0.20f1 and confirmed that the bug is present in every version, yet it has never been mentioned in any Release Notes.

The manifestation of this bug is as follows: whenever there is keyboard input in the same frame as switching to full-screen mode, that keyboard input becomes a continuous input, creating what is known as an “input sticky” state. A common scenario is when a directional key is pressed in the same frame as switching to full-screen mode (in games where the keyboard is used for UI input, this operation is hard to avoid—for example, using the left or right arrow keys to toggle full-screen mode). After switching, the character may continue moving due to the input stickiness, or the UI panel may freeze and become unresponsive to further operations because of the sticky input.

This issue only occurs on Mac and does not exist on Windows.

Hello,

I would like to ask you to report this issue via the Bug Reporter as I’ve tried looking for any reports regarding this issue and there were none.

If you can please create a new project and recreate the issue to verify it’s still happening and please attach it to your bug report.

You can do so by doing the following:

  1. Open the affected project
  2. Attempt to reproduce the issue (To verify it’s still happening)
  3. Open the Bug Reporter (Help → Report a Bug…)
  4. Write down the steps that are needed to be taken to visually see the issue happening
  5. Write down the link to this Discussions thread into the Description

Your help would be greatly appreciated and thank you in advance!