Microsoft KB Archive/98703

{| = How SET KEYCOMP Works in FoxPro for Windows =
 * width="100%"|

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. </li></ul>

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.</li>  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 </li></ul>

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