Share via


Overview: Accelerator Editor

Home Page (Accelerator Editor) | How Do I ... Topics

An accelerator table is a Windows resource that contains a list of accelerator keys (also known as shortcut keys) and the command identifiers that are associated with them. A program can have more than one accelerator table.

Normally, accelerators are used as keyboard shortcuts for program commands that are also available on a menu or toolbar. However, you can use the accelerator table to define key combinations for commands that don’t have a user-interface object associated with them.

You can use ClassWizard to hook accelerator key commands to code. For more information on ClassWizard, see Working with Classes.

With the Accelerator editor, you can:

  • Add, delete, change, and browse the accelerator key assignments in your project.

  • View and change the resource identifier associated with each entry in the accelerator table. The identifier is used to reference each accelerator table entry in program code.

  • Associate an accelerator key with a menu item.

  • Find one or more accelerator keys in the accelerator table, and use regular expressions with the Find command to locate an accelerator key that matches a pattern.

  • Select multiple accelerator keys and change their properties at one time.

Tip   While using the Accelerator editor, in many instances, you can click the right mouse button 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.

Note   Windows does not allow the creation of empty accelerator tables. If you create an accelerator table with no entries, it is deleted automatically when you exit Microsoft Visual C++.

For information about common resource edit procedures such as creating new resources, opening existing resources, and deleting resources, see Resource Editors How Do I ... Topics.

What do you want to know more about?

Setting accelerator properties

Associating an accelerator key with a menu item

What do you want to do?

Edit an accelerator table