KeyboardShortcut Property

[This is preliminary documentation and subject to change.]

The KeyboardShortcut property, retrieved by calling the IAccessible::get_accKeyboardShortcut method, describes a key or key combination that will activate a given accessible object.

This shortcut key string can describe "shortcut keys" or "access keys." Each is described in the following list.

Term Description
Shortcut keys Key combinations that invoke an action. For example, ctrl + o is often used to invoke the Open file common dialog box.
Access keys Single keys, usually shown underlined in a drop-down menu or dialog box, that invoke an action when pressed. For example, if a user activates an application's File menu, the o key often invokes the Open file common dialog box. Access keys are usually only available when the container (like a menu) has keyboard focus.

The KeyboardShortcut property reflects shortcuts as the key or keys the user must press when the object has keyboard focus. For example, the Print menu command might have both a shortcut key (ctrl+p) and an access key (p). If the user presses ctrl+p while the menu is active, nothing happens, but pressing p invokes the application's Print dialog box. In this case, the KeyboardShortcut property is "P," to reflect what the user must press when the menu is active and has keyboard focus. This "shortcut by focus" type of philosophy is true for all accessible objects.

Active Accessibility describes key combinations using strings that fit a standard format, allowing utilities to parse them. The format is defined as [modifier key +][...] + key-name. For example: "alt+f", "ctrl+alt+4", "win+f1", "backspace", or "ctrl+alt+shift+backspace".

The modifier keys are:

Modifier key Description
alt Alternate modifier key
ctrl Control modifier key
shift Shift modifier key
win Windows Logo key
fn Function key on portable computers

The server never localizes keyboard shortcut strings. If an accessibility aid enunciates keyboard shortcuts to the user, it can parse them into separate key names and substitute localized names. This functionality would be useful, for example, in a blind access utility reading keyboard shortcuts to the user at the user's request.