27.3. Accelerator keys

An accelerator key is different from a menu shortcut key. To use a View menu shortcut, you press Alt+V to open the View menu, and then press P or C to change the cursor. But an accelerator key is a single key or key combination that takes effect without opening any menu.

Adding an accelerator key for an existing menu item is easy. You go to the Resource View in the Visual Studio Workspace window, click on Accelerators, double-click on IDR_MAINFRAME to see the list of accelerator keys. Down at the bottom is a blank box with a dotted line around it. Double-click it or press Alt+Enter to open the accelerator key Properties dialog.

In the ID field you put the menu item selection that you want imitate. If you don’t remember ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.