Page 1 of 1

How to detect when a mouse button is pressed, but not released?

Posted: Sun Apr 06, 2025 1:04 pm
by DaradBur
Hello,

As stated in the title, I wonder how/if it is possible to detect a key press, in this case a mouse button pressed?
Right now, on_gui_click fires after the mouse button is released.

I'm currently adding a custom inventory in my GUI, and I wanted to implement the Shift+LMB+drag feature.
I tried using on_gui_hover but it didn't help.

In the base game, pressing LMB on an item stack will put it in the cursor stack, without having to release LMB.
Is this an engine-only feature? Or have I missed something in the docs?