Programming with Reflection

image\rwnprg32.gif SetMouseMap method

 

Syntax object.SetMouseMap Modifiers, Chord, CommandType, Commands, [CommandArguments]

 

Description

Maps a mouse chord to an action. The action is determined by the CommandType and Commands arguments.

For example, the following command modifies the mouse setup so that pressing Alt while right-clicking displays the online help index:

.SetMouseMap rcAltKey, "RightBtn", rcBuiltInFunction, "HelpSearch"

This statement sends "Quit" to the host when the Control key (Ctrl) is depressed while the right mouse button is double-clicked:

.SetMouseMap rcCtrlKey, "RightBtn_DblClk", rcTransmitString, "Quit"

Arguments

Modifiers Argument Type: Enumeration
Required
A mouse chord consists of a button click (or double-click) and may also include one or more modifier keys¾Alt, Ctrl, and Shift. If you are mapping to an unmodified mouse chord, use rcNormalKey for this argument. The possible modifier keys are:

rcNormalKey

No modifier.

rcAltKey

The Alt key.

rcCtrlKey

The Control key.

rcShiftKey

The Shift key.

 To specify multiple modifier keys, use the addition operator (+). For example: rcAltKey + rcCtrlKey.

Key Argument Type: String
Required
A string identifying a mouse chord. Use one of the following:

"LeftBtn"

Left button click

"MiddleBtn"

Middle button click

"RightBtn"

Right button click

"LeftBtn_DblClk"

Left button double-click

"MiddleBtn_DblClk"

Middle button double-click

"RightBtn_DblClk"

Right button double-click

CommandType Argument Type: Enumeration
Required
Specifies what sort of command to attach to the keystroke. The possible values are:

 rcBuiltInFunction

 Maps the mouse chord to one or more built-in functions.

 rcTransmitString

 Maps the mouse chord to a string that is transmitted to the host. The string is assumed to be in the Windows character set, and is translated into the appropriate host character set as it is transmitted.

 rcDefaultMap

 Resets the mouse chord to its default mapping. If you use this option, the Commands argument must be an empty string. For example:

SetMouseMap rcNormalKey, "LeftBtn", rcDefaultMap, ""

 rcVBCommand

 Maps the mouse chord to a single Visual Basic statement. This statement can include Visual Basic functions and statements and/or Reflection methods and properties. Use doubled quotation marks for string values within literal strings, for example:

SetMouseMap rcAltKey, "LeftBtn", rcVBCommand, "MsgBox ""Hello"""

 Note: This value is equivalent to rcRBCommand, which was used in earlier versions of Reflection.

 rcVBMacro

 Maps the mouse chord to a Reflection macro. Use the Commands argument to specify the macro's name. You can pass additional information to the MacroData property using CommandArguments. Note: If the macro is not present in the current settings file or a referenced file, you will see an error when you use the specified mouse chord.

 rcRBScript

 Maps the mouse chord to a Reflection Basic script. Use the Commands argument to specify the script's path and file name. You can pass arguments to the script using CommandArguments.

Commands Argument Type: String
Required
Specifies the action to perform when the mouse chord is pressed. Depending on the value of CommandType this can be a built-in function, a string to transmit, a Visual Basic statement, a Reflection macro, a Reflection Basic script, an RCL command, or an RCL script.

CommandArguments Argument Type: String
Optional
This argument is valid when CommandType is rcVBMacro or rcRBScript. Use it to specify additional information to be passed to the macro or script.

Note: You can map a mouse chord to no action using the "Nothing" Built-in function. For example:

.SetMouseMap rcNormalKey, "RightBtn", rcBuiltinFunction, "Nothing"

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command