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

# TApplication.OnShortcut

Event handler signalled to determine if a keystroke message is a shortcut key in the application.

## Declaration

Source position: forms.pp line 1763

`public property TApplication.OnShortcut : TShortCutEvent read FOnShortcut write FOnShortcut;`

## Description

OnShortcut is a TShortcutEvent property with the event handler signalled to determine if a keystroke message is a shortcut (or accelerator) key in the application. It is signalled (when assigned) from the IsShortcut method, and occurs before the OnShortcut event handlers for other forms are checked.

This event handler can interpret keystrokes as shortcuts, before the normal target handles the key. The event handler can set its Handled argument to True when the Msg argument contains a shortcut keystroke specific to the application. This prevents the OnShortcut event handlers in the application forms from being notified.

## See also

TApplication.IsShortcut |  | Checks whether a handler is available for the shortcut key in the message.
TShortCutEvent |  | Type used for an OnShortcut event handler.
TApplicationHandlerType |  | Types of Application notification handlers.