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

Bugs which we just recently fixed in our development version and will reach you in the next release.
User avatar
Osmo
Fast Inserter
Fast Inserter
Posts: 148
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

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

Post 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.
Attachments
factorio-current.log
(15.79 KiB) Downloaded 18 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 16103
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved for the next release”