Sign in Join
FPDoc Onlineexperiment

TCustomForm.IsShortcut function

Member of TCustomFormpublicIn unit Forms

Determines whether the specified message contains a shortcut or accelerator key.

Declaration

pascal
function IsShortcut(var Message: TLMKey): Boolean; virtual

Arguments

Message

Control message examined in the method.

Function result

True when the specified Key was handled as a shortcut.

Description

Checks form components to determine whether the specified message is a shortcut or accelerator key used on the form. This includes signalling the OnShortcut event handler (when assigned), calling IsShortCut for the form Menu, or calling IsShortcut for the ActionLists for the form instance.

Returns True when the specified Message contains a shortcut or accelerator key. Returns False for the following conditions:

  • The MainForm has not been assigned in the application.
  • The MainForm is not the ActiveCustomForm for the application.
  • The MainForm does not have a valid handle.
  • The MainForm is not enabled.
  • Message does not contain a key code that is a shortcut for the form instance in Application.MainForm.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.