Sign in Join
FPDoc Onlineexperiment

TWinControl.DoKeyDownBeforeInterface function

Member of TWinControlprotectedIn unit Controls

Handles a KeyDown event before the widget processes the key.

Declaration

pascal
function DoKeyDownBeforeInterface(var Message: TLMKey; 
 IsRecurseCall: Boolean): Boolean

Description

Key event handlers are invoked in sequence, until a handler is located which responds to the key.

First, all application wide handlers are invoked (TApplication.NotifyKeyDownBeforeHandler).

Second, the form handler is invoked when KeyPreview is requested.

Third, the DragManager is used to determine the dragging status for the control. It interprets the ESC key as a cancel dragging request, and the CTRL key as a request to ignore drag targets.

Finally, the OnKeyDown user handler is invoked.

If none of the handlers accept / respond to the key, the widgetset class is used to process the key.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.