How SET KEYCOMP Works in FoxPro for Windows

Last reviewed: June 27, 1995
Article ID: Q98703
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SUMMARY

The SET KEYCOMP command, supported only in FoxPro for Windows, determines the keystrokes being used to move through the FoxPro for Windows interface and allows you to specify whether to use MS-DOS- or Windows-style keystrokes and the keystroke combinations used to navigate through such interface controls as buttons, lists, and popups.

To navigate using MS-DOS-style keystrokes, issue the following command:

   SET KEYCOMP TO DOS

To navigate using Windows-style keystrokes, issue the following command:

   SET KEYCOMP TO WINDOWS

The effect of the SET KEYCOMP setting depends on the type of the control, as described below.

MORE INFORMATION

SET KEYCOMP affects the different controls as follows:

Default Buttons

  • Result of SET KEYCOMP TO DOS:

    The default button in a dialog box is always the same and is chosen by pressing CTRL+ENTER.

  • Result of SET KEYCOMP TO WINDOWS:

    The default button in a dialog box can change as the focus moves between controls. The default button is surrounded by a bolder border to indicate it is the current default; it is chosen by pressing ENTER. Pressing ENTER always performs the default button's action.

    NOTE: For an illustration of how the default button changes in a dialog box, issue SET KEYCOMP TO WINDOWS and press TAB to move through the Open dialog box.

Popups

  • Result of SET KEYCOMP TO DOS:

    Popups are opened by pressing ENTER or the SPACEBAR. Keyboard steering within a popup is unavailable until the popup is open.

  • Result of SET KEYCOMP TO WINDOWS:

    Popups are opened by pressing the SPACEBAR, ALT+UP ARROW or ALT+DOWN ARROW. Keyboard steering within a popup is available when the popup is selected (not open) and when it is open.

    For example, a selected popup contains a list of available drives. If drives A, B, and C are available and drive B is currently displayed, you can choose drive C without opening the popup by pressing C or the DOWN ARROW key.

Hot Keys

  • Result of SET KEYCOMP TO DOS:

    A hot key for a control is a single key. If the current focus is not in a control that has keyboard steering (a popup or a list), pressing the hot key moves the focus to the control and chooses it.

  • Result of SET KEYCOMP TO WINDOWS:

    A hot key for a control can be a single key or a key combination. If the current control has keyboard steering (a popup or a list), pressing ALT and the hot key to will move the focus to the control. To move to other controls, press the hot key or ALT and the hot key.

Radio Buttons

  • Result of SET KEYCOMP TO DOS:

    Pressing the TAB key when a group of radio buttons is selected moves among the radio buttons.

  • Result of SET KEYCOMP TO WINDOWS:

    Pressing the TAB key when a group of radio buttons is selected moves the current focus from the radio buttons to the next control. To move among buttons in a set of radio buttons, press the LEFT ARROW and RIGHT ARROW keys.

    NOTE: You can specify a startup KEYCOMP setting in FoxPro for Windows in CONFIG.FPW configuration file. For example, to set KEYCOMP to DOS, place the following line in the CONFIG.FPW configuration file:

          KEYCOMP = DOS
    


Additional reference words: FoxWin 2.50 2.50a hotkey access key
KBCategory: kbprg
KBSubcategory: FxenvConfigfp


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.