Vcl.Forms.TShortCutEvent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TShortCutEvent = procedure (var Msg: TWMKey; var Handled: Boolean) of object;

C++

typedef void __fastcall (__closure *TShortCutEvent)(Winapi::Messages::TWMKey &Msg, bool &Handled);

Properties

Type Visibility Source Unit Parent
type
typedef
public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms Vcl.Forms

Description

TShortCutEvent is the type of an OnShortCut event handler.

The TShortCutEvent type represents event handlers that respond to keystrokes before they enter the standard keystroke processing. These event handlers allow an application to bypass the standard keystroke processing for special shortcut keys.

The Msg parameter represents the Windows keystroke message. The virtual key code is given by the CharCode field, and the KeyData field contains a set of flags that indicate the repeat count, scan code, extended-key flag, context code, previous key-state flag and transition-state flag. See the Windows documentation for details on these fields.

The Handled parameter indicates whether the event handler processed the key. If Handled is set to true, then the application stops processing the keystroke. Otherwise (if Handled remains false) the application proceeds with normal keystroke processing.

See Also