Search Issue Tracker
By Design
By Design in 1.15.X
Votes
0
Found in [Package]
1.15.0
Issue ID
ISXB-1730
Regression
Yes
Keyboard.current.altKey.isPressed stays True when Alt+Tab is used
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:
- For the version 2021.1.0a1, the regression point is 1.1.0-preview.3, in 1.1.0-preview.2 the issue does not reproduce. The oldest package version I could test with in 2021.1.0a1 was 1.4.2, where the issue still reproduces
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
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.
Resolution Note (1.15.X):
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.