Vcl.Forms.TCustomForm.IsShortCut
Delphi
function IsShortCut(var Message: TWMKey): Boolean; dynamic;
C++
DYNAMIC bool __fastcall IsShortCut(Winapi::Messages::TWMKey &Message);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Forms.pas Vcl.Forms.hpp |
Vcl.Forms | TCustomForm |
Description
Processes shortcut keys when the form has focus.
IsShortCut is called automatically when the user presses a key while the form has focus. It allows the form to dispatch shortcut keys and bypass the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp events).
The Message parameter encapsulates the Windows message describing the keypress. If a shortcut for the key exists, IsShortCut executes the appropriate command and returns true. Otherwise IsShortCut returns false.
IsShortCut generates an OnShortCut event to allow the developer to insert shortcuts for the form. If the keystroke is not handled in an OnShortCut event handler, IsShortCut checks for any shortcuts associated with the form's menus and actions.