Workaround for broken mouse click functionality when debugging Factorio in a mouse event

Tools which are useful for mod development.
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1318
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Workaround for broken mouse click functionality when debugging Factorio in a mouse event

Post by sparr »

I was using the modding toolkit debugger with a breakpoint that triggered when I clicked on something in-game. This left my mouse clicks captured by factorio, so I couldn't click on anything anywhere else while other mouse and keyboard functionality worked fine.

https://unix.stackexchange.com/a/62252/2434 led me to `xdotool key "XF86LogGrabInfo"` which puts a list of active and registered input grabs into `Xorg.0.log`, where I found factorio with the sole grab and a mask for clicks.

https://unix.stackexchange.com/a/40472/2434 led me to `setxkbmap -option grab:break_actions; xdotool key XF86Ungrab` to release the grab!

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 410
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: Workaround for broken mouse click functionality when debugging Factorio in a mouse event

Post by raiguard »

Version 1.1.95 features a new hidden setting disable-mouse-auto-capture that will prevent this issue.
Don't forget, you're here forever.

Post Reply

Return to “Development tools”