KeyCode2 Property
Applies To
KeyBinding object.
Description
Returns a unique number for the second key in the specified key binding. Read-only Long.
See Also
BuildKeyCode method, KeyCode property, KeyString method, KeyString property.
Example
This example displays the key codes of each key in the KeyBindings collection (the collection of all the customized keys in the active document).
CustomizationContext = ActiveDocument
For Each aKey In KeyBindings
If aKey.KeyCode2 <> wdNoKey Then
MsgBox aKey.KeyString & vbCr & "KeyCode1 = " & _
aKey.KeyCode & vbCr & "KeyCode2 = " & aKey.KeyCode2
Else
MsgBox aKey.KeyString & vbCr & "KeyCode1 = " & aKey.KeyCode
End If
Next aKey