Page 1 of 1

[2.0.66] CustomInputEvent set to mouse buttons doesn't raise when clicking on GUIs

Posted: Thu Sep 11, 2025 9:30 pm
by Osmo
The custom input event is defined like this:

Code: Select all

{
    type = "custom-input",
    name = "right-click",
    key_sequence = "mouse-button-2",
    action = "lua",
}
And i react to it like this:

Code: Select all

script.on_event("right-click", function(event)
    game.print(event.element)
end)
When clicking "in-world" (in-game and in remote view), the event is raised and prints nil as expected. However when clicking on any GUI, be it a base game one or a mod GUI, the event is not raised at all. This only happens when the custom input is set to left, right or middle mouse button. Setting it to mouse button 4, or keyboard buttons raises the event normally.

Re: [2.0.66] CustomInputEvent set to mouse buttons doesn't raise when clicking on GUIs

Posted: Tue Sep 16, 2025 8:40 pm
by Rseding91
Thanks for the report. This is now fixed for the next release.