This example maps three different mouse chords. Where literal strings are used within other strings (as in the MacroName argument to RunMacro), double quotation marks must be used. A line continuation character (a space followed by an underscore) is used to break up the longer lines.

Option Explicit

Sub SetMouseMapDemo ()

With Session

'Map the Alt+Right button mouse chord to run the specified macro

.SetMouseMap rcAlt, "RightBtn", ".RunMacro ""myMacro"", """" "


'Map Ctrl+Right Button to be the mouse chord that activates hotspots.

.SetMouseMap rcCtrl, "RightBtn", "Hotspot"


'Map a double click of the Left button to Transmit a Terminal F3 key.

.SetMouseMap rcNormal, "LeftBtn_DblClk", _

".TransmitTerminalKey rcIBMF3Key"

End With

End Sub