KeyPress

Key-press event.
[event] KeyPress([in] short keyascii)
This event is called when a user presses and releases a key corresponding to an ASCII character.

The event will be called with one arguments:

VB6:
viewer.enableKeyEvents = True ... Private Sub viewer_KeyDown(ByVal keycode As Integer, ByVal shift As Integer) ' process a keycode here (vbKeyLeft, etc.) End Sub Private Sub viewer_KeyUp(ByVal keycode As Integer, ByVal shift As Integer) ' same keycode as KeyDown End Sub Private Sub viewer_KeyPress(ByVal keyascii As Integer) ' process an ASCII character End Sub
enableKeyEvents
KeyUp
KeyDown