System Information: AMD Ryzen 5 2600 3.40 GHz, 32 GB, NVIDIA GeForce 2070 SUPER
The input pipeline has issues with multikey handling, e.g., InputBegan/InputEnded or Pressed/Released doesn’t fire when it should for “UserInputService”, “ContextActionService” and “InputActionSystem”
How to reproduce:
UserInputService:
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
print("InputBegan:", input.KeyCode)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
print("InputEnded:", input.KeyCode)
end
end)
ContextActionService:
local ContextActionService = game:GetService("ContextActionService")
ContextActionService:BindAction("ShiftTest", function(_, state, input)
if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
if state == Enum.UserInputState.Begin then
print("InputBegan:", input.KeyCode)
elseif state == Enum.UserInputState.End then
print("InputEnded:", input.KeyCode)
end
end
return Enum.ContextActionResult.Pass
end, false, Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift)
InputActionSystem:
local inputAction = script.Parent
inputAction.Pressed:Connect(function()
print("Pressed")
end)
inputAction.Released:Connect(function()
print("Released")
end)
I am uncertain if this is a bug on my end with my hardware
Expected behavior
I’m currently using RightShift and LeftShift simultaneously, and I’m uncertain about the impact on other keys. What I expect is that when pressing LeftShift, it fires, which happens, but while holding LeftShift and pressing RightShift, there’s no fire. Releasing the LeftShift doesn’t fire the InputEnded/Released and then releasing RightShift doses fire an InputEnded/Released but then the weird thing is now that LeftShift is acting as if it’s still being held until it’s pressed again and it resets it and the same happens if the order is the other way with RightShift first
