sbox-issues icon indicating copy to clipboard operation
sbox-issues copied to clipboard

Tab button input gets consumed in play mode

Open matekdev opened this issue 1 month ago • 4 comments

Branch

staging

Describe the bug

It seems like that the tab button input is getting consumed by something else even if the play window is focused.

For example, if I press tab ingame, it should show the inventory screen in my game, instead it does nothing. I'm forced to press it twice in order for it to register. I have a feeling what is happening is that it's tabbing through the various editor windows in the background. If I continue pressing tab (even though I never click out or lose focus of the play window), it ends up selecting the console text input fields.

To Reproduce

Gain access to the MSC repo

  1. Load ingame
  2. Press tab (notice that the inventory screen sometimes doesn't pop up and requires a second tab press)

Expected behavior

The tab key shouldn't be getting consumed by some other input in the background.

Media/Files

No response

Additional context

No response

matekdev avatar Nov 19 '25 01:11 matekdev

Is this fixed? seems okay for me

solwllms avatar Nov 21 '25 15:11 solwllms

Is this fixed? seems okay for me

Still happening for me on staging

Matt9440 avatar Nov 21 '25 18:11 Matt9440

Yeah something is fishy with Tab, though for me it doesn't simply take 2 presses to trigger.

In a minimal project I couldn't find an issue until I added UI with pointer-events: all, then Tab would send keyboard input focus into the editor windows.

Similar with Sausage Survivors 2, if I press tab I can't move with keyboard anymore until I click the game window

ryleigh avatar Nov 22 '25 01:11 ryleigh

Is this fixed? seems okay for me

Yes, partially, however, when I press tab now it unfocuses my window. For reference, the UI element that pops up when I press tab has pointer-events: all.

matekdev avatar Nov 22 '25 18:11 matekdev

fixed

matekdev avatar Dec 06 '25 00:12 matekdev