Vcl.ActnList.TCustomActionList.IsShortCut

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsShortCut(var Message: TWMKey): Boolean;

C++

bool __fastcall IsShortCut(Winapi::Messages::TWMKey &Message);

Properties

Type Visibility Source Unit Parent
function public
Vcl.ActnList.pas
Vcl.ActnList.hpp
Vcl.ActnList TCustomActionList

Description

Evaluates an input key combination to determine whether it is a shortcut for one of the actions in the list.

Typically, applications do not need to call IsShortCut. When the form's IsShortCut method does not evaluate a shortcut key by some other means (such as an event handler), it calls IsShortCut for every associated action list until it finds one that can handle the shortcut.

The action list's IsShortCut method, in turn, checks the specified keystroke against the ShortCut property and SecondaryShortCuts properties of each action in the list. If it finds a match, it tells the action to handle the shortcut, and then returns True. If IsShortCut cannot find an action to handle the shortcut, it returns False.

Message encapsulates the Windows keystroke message that is to be checked whether it is a shortcut. The Message parameters are:

  • Key is the key code for the potential shortcut key.
  • Shift specifies the state of the Shift, Alt, and Ctrl keys that may be combined with Key.
  • KeyText is the string representation of the potential shortcut key.

See Also