Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Queries the index of the last pressed mouse button.

Component Version macOS Windows Linux Server iOS SDK
EventMonitor 5.2 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "EventMonitor.LastMouseClickButton" )




Returns number or error.


Queries the index of the last pressed mouse button.
Returns 1 for left, 2 for right and 3 for other. (other is Mac only currently)

Please call EventMonitor.Install earlier in your scripts once on startup of solution.
Call this function in a script triggered by a mouse click (e.g. on a button) to see if mouse event triggering the script was using right or left mouse button.

See also RemoteControl.MouseButtons function for live status of mouse.
With v12.5 this function may also return 4 and 5 for mouse buttons.

See also

Example Databases

Blog Entries

This function checks for a license.

Created 21st June 2015, last changed 3th November 2022

EventMonitor.Install - EventMonitor.LastMouseClickIsDoubleClick