[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Signals OnKeyDown event handlers (when assigned).
Source position: controls.pp line 2280
protected procedure TWinControl.KeyDown( |
var Key: Word; |
Shift: TShiftState |
); virtual; |
Key |
|
Numeric key code examined and handled in the method. |
Shift |
|
Shift, Ctrl, or Alt modifier for the key. |
KeyDown is a method used to signal the assigned OnKeyDown event handler(s) for the control. It provides arguments with the virtual key code and the state modifiers for the TKeyEvent type.
KeyDown signals the OnKeyDown event handler (when assigned). The handler routine can modify the Key argument if it is handled (or discarded) in the event handler. Set Key to VK_UNKNOWN (0) in the handler routine if the key event is either applied or discarded by the handler.
When Key has a non-zero value - because OnKeyDown was not assigned or did not handle the key - DoCallKeyEventHandler is called to check other chtOnKeyDown handlers added to the control using AddHandler or AddHandlerOnKeyDown.
KeyDown is called from the KeyDownBeforeInterface method. It occurs after the Application, any forms with KeyPreview enabled, and the active DragManager have examined and possibly handled the key event.
See KeyUp for the actions performed when the key is released.
|
Event handler signalled for key down keyboard events. |
|
|
Signals the OnKeyUp event handler (when assigned). |
|
|
Allows the application, parent forms, or control to handle key preview before the LCL interface. |
|
|
Passes key events for the specified type to the handlers added to the control. |
|
|
Adds a notification handler for the specified control handler type. |
|
|
Adds the specified OnKeyDown event handler. |
|
|
Defines an event handler for key events. |
|
|
Notification handler types. |
|
|
Allows the form to intercept keystrokes in child controls. |
|
|
Determines whether the specified message contains a shortcut or accelerator key. |
|
|
Checks whether a handler is available for the shortcut key in the message. |
|
|
The TApplication singleton. |
Version 3.2 | Generated 2024-02-25 | Home |