Occurs when the user presses a key on the keyboard.
The object placeholder represents an object expression that evaluates to an object in the Applies To list.
Syntax
object_KeyUp(ByVal KeyCode As Long, ByVal Shift As Long, ContinueProcessing As Boolean)
Properties
The KeyUp event syntax has these parts:
Part |
Description |
object |
An object expression that evaluates to an object in the Applies To list. |
KeyCode |
An integer that represents the key code of the key that was pressed or released. |
Shift |
The state of the SHIFT, CTRL, and ALT keys. |
Settings
The settings for Shift are:
Value |
Description |
1 |
SHIFT was pressed. |
2 |
CTRL was pressed. |
4 |
ALT was pressed. |
Remarks
Key events are sent to the selected object first. If there is no script tied to the event, the key event is sent to the contained object (group or page). If you have common key events across a set of pictures, it is recommended that you use shared subroutines in the user global page that are called from the picture's key events.
The ContinueProcessing As Boolean parameter is related to the Key Macro scheme. Since key macros can be tied to objects, there is a certain hierarchy. For example, you can have the same key macro run different scripts on an object and in the picture. The processing starts in the object, and the ContinueProcessing parameter prevents the processing from being passed up to the next level. For example, if F10 runs MacroA on a rectangle, and F10 also runs MacroB in the picture, a false value would keep the picture's macro from firing.