Reproduction
- Copy and paste the following code into a
LocalScript
inStarterPlayerScripts
:
game:GetService("ContextActionService"):BindAction("MouseButton", function(_, input_state, input_object)
print(input_state, input_object.UserInputType)
return Enum.ContextActionResult.Pass
end, false, Enum.UserInputType.MouseButton1)
- Run the game with a controller and pull the right trigger.
ReproFile.rbxl (41.2 KB)
Expected Behavior
Pulling the right trigger should do nothing, as no handlers are assigned to listen for it.
Actual Behavior
Pulling the right trigger invokes the bound handler listening for MouseButton1
input.
Only ContextActionService
is affected. UserInputService
will not fire any events with mouse-related InputObjects
, nor will UserInputService.LastInputTypeChanged
fire.
Workaround
Binding a sinking input handler that processes either Enum.UserInputType.Gamepad1
or Enum.KeyCode.ButtonR2
at a higher priority will prevent the MouseButton1
handler from running.
Other Information
Bug experienced using a wired Microsoft XBox 360 controller on Windows 10.
Issue Area: Engine
Issue Type: Input
Impact: Low
Frequency: Constantly
Date First Experienced: 2023-05-03 13:00:00 (-04:00)