Adding Accelerator Keys

Accelerators are shortcut keys for program commands on a menu or toolbar and for commands that do not have a user-interface object associated with them. An accelerator table is a Windows resource that contains a list of shortcut keys and the command identifiers that are associated with them. A program can have more than one accelerator table.

When you open an accelerator resource on the ResourceView tab of the Workspace window, the IDE displays it with the accelerator editor. The accelerator editor shows the resource identifier (ID), key combination (Key), and ASCII or virtual key Type setting for each accelerator assignment in the project.

Use the accelerator editor to view, add, delete, or change shortcut key assignments in your project. To edit key assignments, either browse for entries in the table or use the Find command on the Edit menu to locate them. You can select a single entry in the table and set properties for that one entry, or you can select multiple keys and change properties for all of them.

While using the accelerator editor, in many instances, you can right-click to display a shortcut menu of frequently used commands. The commands available depend on what the pointer is pointing to. For example, if you click while pointing to an accelerator entry, the shortcut menu shows the Cut, Copy, New Accelerator, ClassWizard, and Properties commands.

See Also

Using Shortcut Keys