Sign in Join
FPDoc Onlineexperiment

TWinControl.KeyPress procedure

Member of TWinControlprotectedIn unit Controls

Signals the OnKeyPress event handler (when assigned).

Declaration

pascal
procedure KeyPress(var Key: char); virtual

Arguments

Key

Character value for the key press event.

Description

KeyPress is called from the DoKeyPress method when the parent form does not have KeyPreview enabled or does not handle the character code in Key. KeyPress is not called if csNoStdEvents has been included in the ControlStyle property.

See UTF8KeyPress for the actions performed for a UTF-8-encoded character in a key press.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.