Method GetShortcutText
GetShortcutText(bool, bool)
Retrieves the text representation of the shortcut key, optionally formatted using a template.
public virtual string? GetShortcutText(bool useTemplate, bool forUser = true)
Parameters
useTemplateboolA value indicating whether to format the shortcut key using a predefined template. If true, the shortcut key is formatted using the template specified by
ShortcutToolTipTemplateor a default template. If false, the raw string representation of the shortcut key is returned.forUserboolThe
forUserparameter determines whether the shortcut key is formatted for display to the user.
Returns
- string
A string representing the shortcut key. If no shortcut key is available or the key is null, the method returns null.
Remarks
The method filters the shortcut key information based on the backend operating system before generating the text representation. If multiple keys are available, only the first key is used.