UserInputService.InputEnded fires when out of focus

This bug is not apparent in studio, but only in the game client. Those with access (admins) to restricted games can see the bug in action here (after reading what it is below)

I believe this isn’t intended behavior, since InputBegan doesn’t share the similarity.

InputEnded will fire when the game window is not focused. I found this out because I created a typical “Shift to run” feature. When I am typing outside of the game window, like this post right now, each time I press and release shift my WalkSpeed is halved. It should be multiplied by 2, then divided by 2 (pressed and released). But only the released portion is fired (InputEnded).

Image of me printing my client WalkSpeed after I finished this post.

1 Like

There is a second parameter in InputEnded called “processed”. It is true/false. You can use this to tell if the input was processed by the game (typing, window out of focus, etc).

You can also this this in conjunction with UserInputServer.WindowFocusReleased.

I… am well aware…

I know the workarounds, thanks. The point was this is just a bug that isn’t intentional. As the opposing event fires correctly.

1 Like