Sign in Join
FPDoc Onlineexperiment

ShortCutToText function

In unit LCLProc

Returns the localized textual representation for a shortcut value.

Declaration

pascal
function ShortCutToText(ShortCut: TShortCut): string

Arguments

ShortCut

TShortCut instance with the numeric shift modifier and key code handled in the routine.

Function result

Localized text value for the specified shortcut.

Description

ShortCutToText is the counterpart to the TextToShortCut routine, and converts the numeric TShortCut value in ShortCut its textual representation.

ShortCut is the Word value with the modifier keys and the key code OR'd together. The high-order byte contains the Shift/Ctrl/Alt/Meta modifier(s) for the shortcut. The low-order-byte contains the virtual key code for the shortcut.

The return value contains localized versions of text for the modifiers and the key cap used in the shortcut. For example:

Ctrl+V
Ctrl+Alt+Del
^V
Shift+F9
Alt+G
Meta+Q

Use ShortCutToTextRaw to get the text for a shortcut without localization.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.