Mouse Control Options

I'm not sure if this would require an entire plugin or just make use of a few script calls, but I would really love to see if there's a way to get more control of how the mouse works.


Specifically, a way to have an internal variable or switch respond to when the left click is being pressed or not, as well as the right click.  I'd love to be able to ask in a conditional branch if a specific mouse button is being held down.  It'd be great to have a script call to store the X and Y grid coordinates that one clicks on into variables.


Also, would it be possible to separate the mouse from controlling character movement, cancelling out, or confirming?  Right now the mouse is stuck being a replacement for the keyboard, but I'd like to use it for other mechanics entirely.


I've tried to dig around the .js files and can't seem to find where the mouse handling code even is, let alone know how to manipulate its script calls.


You guys are all so talented, I felt I just had to ask.  I appreciate the help^^

Original thread: https://forums.rpgmakerweb.com/threads/mouse-control-options.57427/