Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

EventMonitor.LastMouseClickButton

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" )

Parameters

none

Result

Returns number or error.

Description

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

💬 Ask a question or report a problem