KeyUp Event  
 

The KeyUp event is generated when a key is released.

Syntax

Sub object_KeyUp( [Index As Integer], KeyCode As Integer, Shift As Integer )

Remarks

The KeyUp event is generated when the user releases a previously pressed key. The following arguments are passed to the event handler:

KeyCode
A key code which identifies the key being released. If the key is a number or letter on the keyboard, then the code corresponds to its ASCII equivalent. For example, the key code for the 'A' key is 65. It is important to note that shift states are handled differently in that the key code is the same regardless if the shift or control key is being pressed at the same time. For keys other than numbers or letters, consult the Virtual Key Constants table.
Shift
An integer that corresponds to the state of the Shift, Ctrl, and Alt keys at the time the key is released. The Shift argument is a bit field with the least-significant bits corresponding to the Shift key (bit 0), the Ctrl key (bit 1), and the Alt key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both Ctrl and Alt keys are pressed, the value of Shift is 6.

See Also

KeyDown Event, KeyMapped Event, KeyPress Event