Vcl.Menus.TMenu.IsShortCut

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsShortCut(var Message: TWMKey): Boolean; dynamic;

C++

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

Properties

Type Visibility Source Unit Parent
function public
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TMenu

Description

Dispatches a key message if it represents a shortcut key for an item in the menu.

Call IsShortCut when processing a KeyDown message to identify shortcut keys and trigger the appropriate menu action. IsShortCut decodes the key message passed in the Message parameter. It then encodes the state of the Shift, Control, and Alt keys with the value of the character that was typed to obtain the ShortCut property of a menu item. If IsShortCut locates a menu item associated with the shortcut key combination, it calls the item's Click method and returns true. If no item in the menu has a shortcut corresponding to the message, IsShortCut returns false.

See Also