User Input Service Problems With Shift and Left Control

I was trying to make a input handler for a project, that should work for mobile and pc, but realise that User Input Service has something like a bug, if you press left control, it will fire the input as begin, and without realising it, you press another key, like the E, and you realese the left control, the left control ended input will fire, but a second later a E Began input will fire, but you have not realesed the letter E

I have the same problem with the left shift, do someone know how fix it?
The code for debugging (maybe is my laptop?)

UIS.InputBegan:Connect(function(input: InputObject, gameProcessedEvent: boolean)
	warn(input.KeyCode,input.UserInputState,input.UserInputType.Name)
end)

UIS.InputEnded:Connect(function(input: InputObject, gameProcessedEvent: boolean)
	warn(input.KeyCode,input.UserInputState,input.UserInputType.Name)
end)
1 Like

Well I will let this post here, because I could not find the awnser on the web, but I “solved” the iusse by manually keeping track of the state of the keys, with a table, when a key is pressed, is inserted in the table, and when is released is removed. If a key is pressed and is already on the table, it means it has been a refire and should be ignored

1 Like

Shift and Ctrl are commonly used for key combos (i.e. Ctrl + V, Shift + F5), so your computer will catch that input while you press those keys. That might be why.

1 Like