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

# TDBGrid.OnKeyPress

Event handler signalled for the key press event.

## Declaration

Source position: dbgrids.pas line 658

`published property TDBGrid.OnKeyPress : TKeyPressEvent;`

## Description

OnKeyPress is an event controller for a key being pressed while the control has focus.

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

## See also

TWinControl.OnKeyPress |  | Event handler signalled for character data entered by the user.