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

TKeyPressEvent

Specifies an event handler for key press events.

Declaration

Source position: controls.pp line 413

type TKeyPressEvent = procedure(

  Sender: TObject;

  var Key: Char

) of object;

Arguments

Sender

  

TObject for the event notification.

Key

  

Character value for the key press in the event notification.

Description

TKeyPressEvent is an object procedure type that defines an event handler for key press events.

TKeyPressEvent is the type used to implement the OnKeyPress event handler in TWinControl. Applications must implement an object procedure using the signature for the event handler, and assign it to the property to respond to the event notification.

See also

TWinControl.OnKeyPress

  

Handler for a character entered by the user.

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