Description
Read-only. Indicates the modifier key, that is pressed when the function key is also pressed. Valid modifier keys include the Shift, Alt, or Ctrl keys. Function keys can also be pressed alone with no modifier key.
Applicable Events
Post Extract, AnyApp Post Extract, Pre-Verify, Interactive, Verification Function Key (F-Key), Post-Verify
Syntax
object.FKeyModifier
Parameters
Object is a reference to the Application object. For more information, see Application Object (page Application Object).
The following indicators are used to represent the function key:
Indicator |
Function Key |
---|---|
0 |
modifier key |
1 |
Shift Key |
2 |
Alt key |
4 |
Ctrl key |
Modifiers can be combined by adding the values together. For example, 5 would indicate the combination of the Shift and Ctrl keys.
Example
Sub HandleVerificationFKey(ByVal strFKey)
Dim bCtrl, bShift, bAlt, strModifier
x = FKeyModifier
bCtrl = False
bShift = False
bAlt = False
strModifier= ""
If x = 1 Then
bShift = True
End If
If x = 2 Then
bAlt = True
End If
If x = 4 Then
bCtrl = True
End If
' combinations
If x = 3 Then
bAlt = True
bShift = True
End If
If x = 5 Then
bCtrl = True
bShift = True
End If
If x = 6 Then
bCtrl = True
bAlt = True
End If
If x = 7 Then
bCtrl = True
bAlt = True
bShift = True
End If
If bAlt = True Then
strModifier= strModifier& "Alt+"
End If
If bCtrl = True Then
strModifier= strModifier& "Ctrl+"
End If
If bShift = True Then
strModifier= strModifier& "Shift+"
End If
MsgBox strModifier & strFKey
End Sub