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

TWinControl.OnKeyDown

Handler for keyboard key pressed.

Declaration

Source position: controls.pp line 2122

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

Description

This handler can filter keys, for special use in e.g. non-textual controls.

The handler receives all keystrokes, including control and other non-visual keys. Keys are encoded as virtual keys, with separate active modifier keys.

Text input instead should be checked in an OnKeyPress handler.

See also

TWinControl.OnKeyUp

  

Handler for keyboard key released.

TWinControl.OnKeyPress

  

Handler for a character entered by the user.