Modifier keys like Ctrl get stuck when the Roblox window loses focus

Hey there,
I’ve known about this issue for a while, but I now realize it’s a bug from Roblox, not me.

Held-down modifier keys can get stuck “pressed” when the player window loses focus, and don’t get “released” when the window refocuses.

This causes issues when typing in input boxes. For example, if you type the letter a when Ctrl gets stuck, the entire message will erase except for the letter a. For me, this issue happens extremely frequently, and I’m not sure how I’m triggering it.


This LocalScript demonstrates the problem. It only works in a live game, not in Studio.
Repro steps:

  • Open the console in-game via F9
  • Click into the chat bar and type something
  • Hold Ctrl and click outside of the Roblox window while holding Ctrl (ie. click on your desktop)
  • Click back into the chat bar containing your text
  • Press a, the chat bar should clear as if you did Ctrl + a followed by a.
  • In the console “RELEASED” was never printed when you clicked back into the window, and is not printed until you press Ctrl a second time.
local UIS = game:GetService("UserInputService")

UIS.InputBegan:Connect(function(input) 
	if input.UserInputType == Enum.UserInputType.Keyboard then
		print("PRESSED", input.KeyCode)
	end
end)

UIS.InputEnded:Connect(function(input) 
	if input.UserInputType == Enum.UserInputType.Keyboard then
		print("RELEASED", input.KeyCode)
	end
end)

The ideal behavior would be for the InputEnded event to fire immediately after the window regains focus if appropriate, even if just for modifier keys.


I have a regular gaming keyboard w/ English keyboard settings on. I also run Windows 10 64-bit OS

This is extremely frustrating, because it makes it hard to connect with fans in-game and to socialize on others. Hope I can see a fix soon!

2 Likes

I’ve noticed this issue with A clearing my chat because of ctrl getting stuck somehow only recently, and I am also not sure how I’m triggering it.

However, a similar issue of alt getting stuck down such as when pressing alt + tab out of Roblox and then tabbing back in, has been plaguing me for a while. These may be related.

Yea, they definitely are.
It also seems to correlate with the backspace removing whole word bug.

1 Like

I’ve been playing a lot more social games (Trade Hangout) recently and I noticed that whenever I sometimes try to write something and press “a”, the chat clears. This happens also in different games at random. I have noticed this strange behavior like 2-3 weeks ago.

How to reproduce?

  • Join any game
  • Chat for a little (there’s no real estimate to how long does it take for the chat to break but I noticed that it’s usually around 10 minutes into the game, sometimes even sooner/later)
  • Try typing a word with “a” in it.

What should happen?
It should fully write the word.

What happens instead?
The message clears and leaves the “a” out.

And here’s a GIF that shows the described behavior.
2019-10-30_19-34-26

I have a similar problem. My problem only happens to me when I edit the description of my game using the “Game Settings” button in Studio. Every time I press V, even when I’m not holding Ctrl, it pastes what I last copied and it’s very frustrating.

Maybe I should make a separate post about my problem, but I don’t know.

2 Likes

This is annoying when using screen recorders with the CTRL hotkey since they steal focus while Roblox registers CTRL as being held.

I had no idea why my chats were being wiped each time I typed “a” for a while before figuring out I had to tap CTRL to fix it

2 Likes