Microsoft KB Archive/138928

= FIX: Custom Key Assignments May Not Work as Expected =

Article ID: 138928

Article Last Modified on 12/9/2003

-

APPLIES TO


 * Microsoft Visual C++ 2.0 Professional Edition
 * Microsoft Visual C++ 2.1
 * Microsoft Visual C++ 2.2
 * Microsoft Visual C++ 4.0 Standard Edition
 * Microsoft Visual C++ 4.1 Subscription
 * Microsoft Visual C++ 4.2 Enterprise Edition
 * Microsoft Visual C++ 4.2 Professional Edition

-



This article was previously published under Q138928



SUMMARY
The Visual C++ 4.x Help file gives the following incorrect information:

If you define a keyboard shortcut for the Main editor, the shortcut will work no matter which editor you're using.

NOTE: To view this information, choose Finding Information, select Special Features, and then select Customizing the Keyboard and Toolbars from Infoview.

NOTE: This line no longer appears in Visual C++ 6.0. However, the information about keyboard shortcuts is still useful in Visual C++ 6.o.

When making custom key assignments, you should make sure the editor you're making changes to has precedence. The editors (Main, InfoViewer, Text, Dialog, or Image) are layered in two tiers. The Main editor has the lowest priority, and all other editors share a higher priority. These editors are mutually exclusive so only one editor other than Main is active at any one time.



MORE INFORMATION
With Visual C++ 4.x, in the Customize dialog box, which is reached by clicking Customize menu on the Tools menu, each editor in the list provides default settings. For the editor you designate, the command shortcut key you specify overrides any previous assignment for that key in that editor. It also overrides any default shortcut key specified in the Main editor for that command.

For example, assign F2 to a command in the Text editor and assign F2 to a different command in the Main editor. When the Text editor has the focus, the Text editor functionality will be called rather than the Main editor function.

If you observe that a custom key assignment to the Main editor is failing, this is most likely the reason. You should look in the other editors for a key assignment using the same keys. With Visual C++ 4.0, you can view a list of all the key assignments by clicking Keyboard on the Help menu. In Visual C++ 5.0, click Keyboard Map from the Help menu.

The primary purpose of each editor is:   Text         Manages, edits, and prints source files. Dialog      Creates or edits dialog box templates or resources Image       Edits bitmaps, icons, and cursors InfoViewer  Displays infoViewer topics such as help Main        Provides defaults settings that can be overridden NOTE: The InfoViewer editor no longer exists in Visual C++ 6.0, which uses HTML Help instead for its help system.

