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

TWinControl.DoKeyDownBeforeInterface

Handles a KeyDown event before the widget processes the key.

Declaration

Source position: controls.pp line 2102

protected function TWinControl.DoKeyDownBeforeInterface(

  var Message: TLMKey;

  IsRecurseCall: Boolean

):Boolean;

Function result

Set to True when the key was handled.

Description

A number of handlers is invoked, until one handles the key.

First all application wide handlers are invoked (#lcl.Forms.TApplication.NotifyKeyDownBeforeHandler).

Then the form's handler is invoked, when KeyPreview is requested.

Then the DragManager is asked, when dragging. It interprets ESC to cancel dragging, and CTRL to ignore drag targets.

Finally the TWinControl.OnKeyDown user handler is invoked.

If no handler accepts the key, the widget continues to interpret it itself.

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