Programming with Reflection

image\rwnprg32.gif GetKeyMap method

 

Syntax Commands = object.GetKeyMap(Modifiers, KeyOrChord)

 

Description

Returns the commands, terminal keys, or scripts (or any combination of these elements) that are associated with the specified keystroke or mouse chord.

Arguments

Modifiers Argument type: Enumeration
The optional modifier keys associated with the specified keystroke or mouse chord. A keystroke consists of a primary key and one or more optional modifier keys—Alt, Ctrl, and Shift. The various possible combinations of modifier keys are defined by the set of values for this argument:

 rcNormal
rcAlt
rcCtrl
rcShift
rcAltShift
rcCtrlShift
rcAltCtrl
rcAltCtrlShift

 Use rcNormal when there are no modifier keys in this keystroke.

KeyOrChord Argument type: String
The mouse chord or primary key in the keystroke. Any key on the PC keyboard can be a primary key; this argument can also be a custom key name created with SetScanCodeName.

 See Keys for Reflection Commands for a list of key names you can use as key arguments.

 To return the mapping for a mouse chord, identify the button with "LeftBtn", "MiddleBtn", or "RightBtn" as the value for this argument. To identify the double-click of a particular button, add "_DblClk" at the end of the string; for example, "LeftBtn_DblClk".

 This method returns an error if the keystroke or chord is not currently mapped, or if it is not a valid keystroke or chord name.

Return

Commands Return type: String
The commands associated with the specified keystroke or mouse chord.

 

image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command