When running the game in Studio, selecting an instance (even instances that do not support the “zoom to” shortcut) in the explorer prevents UserInputService.InputBegan to fire with the KeyCode F, even after the focus changes back to the game window.
Reproduction:
- Run the following code in the command bar:
game.UserInputService.InputBegan:Connect(function(input) print(input.KeyCode) end)
- Select an item in explorer.
- Click the game window to focus back.
- Press F.
Expected behavior:
This shouldn’t happen when playtesting.
Windows 11 24H2
1 Like
Interesting…
I don’t think UserInputService is meant to be ran in the Command Bar while not in a game in Studio.
I think you misunderstood. This happens regardless whether it is run in the command bar, that’s just for easy reproduction.
I discovered this bug after spending hours debugging my script on “why doesn’t my ability binded to F work”. The F shortcut is meant to be used only in edit mode, as it does nothing in play mode and shouldn’t sink input in it, as it’s non-obvious behavior.
Hi,
Thanks for the report! This happens because of the Studio setting “Respect Studio shortcuts when game has focus” which is defaulted to enabled. If you turn this setting off, the “Zoom to” shortcut should no longer sink input.