[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Controls' (#lcl)

# TWinControl.OnKeyDown

OnKeyDown - event handler for instance when key is down while control has focus

## Declaration

Source position: controls.pp line 1896

`public property TWinControl.OnKeyDown: TKeyEvent read FOnKeyDown write FOnKeyDown;`

## Description

OnKeyDown - event handler for instance when key is down while control has focus

Differs from OnKeyPress in that the key may have already been down when the control received focus; with OnKeyPress the key needs to become pressed while the control has focus.

The latest version of this document can be found at lazarus-ccr.sourceforge.net .