Copyright © 2026 Unity Technologies
BackgroundBehavior.IgnoreFocus is designed to neither reset nor disable devices on focus changes. When the application loses focus, Unity native backend doesn't receive OS key events (pressed/event), so any keys held at the time of focus loss will retain their pressed state. This is an expected consequence of using this mode. Workaround: Switch to the default BackgroundBehavior.ResetAndDisableNonBackgroundDevices, which resets and syncs device state on focus transitions, clearing stale key state when the application regains focus. Note: Receiving keyboard input while the application is not in the foreground is not supported on any standard desktop platform, regardless of BackgroundBehavior setting. IgnoreFocus does not grant background input; it only prevents the Input System from resetting/disabling devices on focus changes. Documentation update requested to clarify this.
How to reproduce:
1. Extract and open the attached “IN-118484.zip“ project
2. Go to File → Build and Run
3. Focus the window that opens and press Alt+Tab on the keyboard
4. Press Alt+Tab on the keyboard again
5. Observe the built project window
Expected result: “Alt“ and “LeftAlt“ values are both False
Actual result: “Alt“ and “LeftAlt“ values both remain True, until the Alt keyboard button is pressed again
Reproducible with: 1.1.0-pre.6 (2022.1.0a1, 2022.3.67f2, 6000.0.60f1, 6000.2.8f1, 6000.3.0b6, 6000.4.0a2), 1.15.0 (2022.3.67f2, 6000.0.60f1, 6000.2.8f1, 6000.3.0b6, 6000.4.0a2)
Not reproducible with: 1.1.0-pre.5 (2022.3.67f2, 6000.0.60f1, 6000.2.8f1, 6000.3.0b6, 6000.4.0a2)
Reproducible on: Windows 11
Not reproducible on: macOS 1.15.6 (Silicon)
Note:
Issues you vote on will appear here