DOCERR: Custom Key Assignments May Not Work as Expected

Last reviewed: July 31, 1997
Article ID: Q138928
2.00 2.10 2.20 4.00 4.10 4.20 WINDOWS NT kbusage kbdocerr

The information in this article applies to:

  • The development environment, included with: Microsoft Visual C++, 32-bit Edition, versions 2.0, 2.1, 2.2, 4.0, 4.1, 4.2

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.

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, if you assign F2 to something in the Text editor, and assign F2 to something else in the Main editor, then 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.

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

REFERENCES

For more information and an example of this functionality, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q138136
   TITLE     : How to Assign the F8 Key to DebugStepInto in Visual C++ 4.x

   ARTICLE-ID: Q120918
   TITLE     : Visual C++ Vers 2.0 README.WRI, Part 2 Development
               Environment


Additional reference words: kbinf 2.00 2.10 2.20 4.00 4.10 4.20
vcbuglist400
KBCategory: kbusage kbdocerr
KBSubcategory: VWBIss
Keywords : VwbIss kbdocerr kbusage
Version : 2.00 2.10 2.20 4.00 4.10 4.20
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 31, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.