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

# TCustomForm.IsShortcut

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

## Declaration

Source position: forms.pp line 719

`public function TCustomForm.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.