I am using the new Input Action System (InputContext, InputAction, InputBinding) to handle gameplay controls. I have noticed an inconsistency regarding how input is sunk/processed when interacting with UI elements.
When an InputAction is bound to a Keyboard Key (e.g., Enum.KeyCode.A), focusing on a TextBox or interacting with UI correctly suppresses the action. The Pressed and Released event does not fire, which is the expected behavior.
However, when the same InputAction is bound to a Mouse Button (e.g., Enum.KeyCode.MouseLeftButton), clicking on an active UI element (like a TextButton or an active Frame) does not suppress the action. The Pressed and Released event fires, causing gameplay actions (like shooting or hitting) to occur simultaneously with UI clicks.
This defeats the purpose of the abstraction provided by the Input Action System, as developers still have to manually check if the mouse is over a UI element, whereas keyboard inputs are handled automatically.
Affected Inputs:
-
Enum.KeyCode.MouseLeftButton (Left)
-
Enum.KeyCode.MouseRightButton (Right)
-
Enum.KeyCode.MouseMiddleButton (Middle)
Expected behavior
I expect InputBindings using Mouse Buttons to respect UI interaction just like Keyboard bindings do. If the cursor is over an UI element
the InputAction should not trigger its Pressed and Released event
