To help here we added EventMonitor functions to our plugin. Currently you can use them to only detect if last mouse event was due to left or right mouse button. Your script can query that and know the state of the mouse buttons.
We got three new functions:
EventMonitor.Install to call once at startup to tell plugin to monitor events.
EventMonitor.Clear to clear current state if needed.
EventMonitor.LastMouseClickButton to query last mouse event's mouse button.
Technically we could add more things here like the mouse position at the time of click.
Maybe you have ideas for more cool functions?
Now enjoy all using MBS Plugin to present contextual menus in FileMaker and decide in your script what to do based on the mouse button.