AccessibleObject.KeyboardShortcut Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the shortcut key or access key for the accessible object.
public:
virtual property System::String ^ KeyboardShortcut { System::String ^ get(); };
public virtual string KeyboardShortcut { get; }
public virtual string? KeyboardShortcut { get; }
member this.KeyboardShortcut : string
Public Overridable ReadOnly Property KeyboardShortcut As String
Property Value
The shortcut key or access key for the accessible object, or null
if there is no shortcut key associated with the object.
Exceptions
The shortcut for the control cannot be retrieved.
Remarks
An access key, also known as a mnemonic, is an underlined character in the text of a menu, menu item, label of a button, or some other control. For example, a user can display a menu by pressing the ALT key while also pressing the indicated underlined key, such as ALT+F, to open the File
menu. To use the access key of a menu item, the menu containing the item must be active. Controls such as toolbar buttons and menu items often have an associated shortcut key. A menu item can have both an access key and a shortcut key associated with it. If the value of the KeyboardShortcut property is a single character, you can assume it is an access key.
Notes to Inheritors
All objects that have a shortcut key or access key should support this property.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈