Holding certain keys and then holding another key and then releasing the first key causes InputBegan to fire twice for the second key

In this video I hold down Shift and then E. I let go of Shift and the bugged InputBegan event fires shortly after. I then let go of E
https://gyazo.com/93017b18b04b2e26eeb8fc9eb819c995

I observed this issue happens with the following keys (not an all inclusive list):
Shift, LCtrl, LAlt

uis-bug.rbxl (52.1 KB)

local userInputService = game:GetService("UserInputService")

userInputService.InputBegan:Connect(function(input)
	if input.UserInputType ~= Enum.UserInputType.Keyboard then
		return
	end
	
	print("BEGAN:", input.KeyCode, input.UserInputState, input.UserInputType)
end)

userInputService.InputEnded:Connect(function(input)
	if input.UserInputType ~= Enum.UserInputType.Keyboard then
		return
	end

	warn("ENDED:", input.KeyCode, input.UserInputState, input.UserInputType)
end)
1 Like

i noticed this problem as well for my own systems and also noticed the keys mentioned here are modifier keys, wonder if that has anything to do with it.

Hello, I don’t seem to be able to reproduce this anymore withe the file you have attached above. Can you please confirm that the issue is resolved?

I was able to reproduce this issue by creating a new place and running the exact code sample provided in OP

image

Windows 11

Hold Left Shift
Hold E
Release Left Shift
→ InputBegan fires again for E, despite it already being held

Ah, so this is a Windows issue, will take a look.

@ChiaSeedFan , @AbstractAlex , @TheStrangeStorm

We believe we’ve fixed this issue. Can you please check?