KeyDown

concerns

 

The KeyDown event is triggered when a key is pressed.

This event is triggered only for stand-alone dialogs (windows).

 

Syntax

KeyDown(KeyCode, ShiftState, CtrlState, AltState, Cancel)

Parameter

Use

Name

Type

Passing

Description

Required

KeyCode

Long

ByVal

Scan code number of the pressed button

Required

ShiftState

Boolean

ByVal

The Shift button is pressed

Required

CtrlState

Boolean

ByVal

The CTRL key is pressed

Required

AltState

Boolean

ByVal

The ALT key is pressed

Required

Cancel

Boolean

ByRef

Key press is rejected when True is returned