[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TApplication.IsShortcut

Checks whether a handler is available for the shortcut key in the message.

Declaration

Source position: forms.pp line 1695

public function TApplication.IsShortcut(

  var Message: TLMKey

):Boolean;

Arguments

Message

  

Message with the key code for the accelerator.

Function result

True when the shortcut is handled.

Description

The return value is set to True if the key code in the message is handled by the application or one of the enabled forms or controls in the application.

IsShortCut signals the OnShortcut event handler (when assigned) to determine if the accelerator is handled at the application level. If it is handled in OnShortcut, no additional actions are performed in the method.

Next, an enabled modal form on the screen calls its IsShortCut method to examine the accelerator.

The active form for the Screen is checked when it is enabled by calling its IsShortCut method.

Finally, the main form for the application is checked by calling its IsShortCut method.

The return value is False when the shortcut is not handled in any of the preceding calls to IsShortCut.


Version 3.2 Generated 2024-02-25 Home