Partager via


SET KEYCOMP Command

Controls Visual FoxPro keystroke navigation.

SET KEYCOMP TO DOS | WINDOWS

Remarks

SET KEYCOMP determines the keystrokes and keystroke combinations you use to move through the Visual FoxPro interface by accessing controls such as buttons, list boxes, menus, and so on. The effect of SET KEYCOMP depends on the control.

Use SET KEYCOMP when you want to use keystrokes that are familiar to you.

To navigate in Microsoft Windows using MS-DOS keystrokes, issue the following:

SET KEYCOMP TO DOS

You can specify the DOS or WINDOWS (default) option.

You can specify a startup SET KEYCOMP setting in your Visual FoxPro configuration file, Config.fpw. For example, the following line, when placed in your configuration file, has the effect of SET KEYCOMP TO DOS:

KEYCOMP = DOS

This section describes how the DOS and WINDOWS options affect Visual FoxPro.

Default buttons

 

DOS

The default button in a dialog box has the focus; its appearance does not change. It is chosen when you press CTRL+ENTER.

WINDOWS

The default button in a dialog box can change appearance when you move among controls. It can be dimmed, or it has the focus (is surrounded by a bold border) to indicate it is the current default. It is chosen when you press ENTER. Pressing ENTER always performs the default button's action.

For an illustration of how the default button changes appearance in a dialog box, issue SET KEYCOMP TO WINDOWS, choose Open from the File menu, and then press TAB to move through the Open dialog box.

Access keys

 

DOS

An access key for a control is a single key. If you aren't in a control that has keyboard steering (a combo box or a list box), you can press the access key to choose it.

WINDOWS

An access key for a control can be a single key or a key combination. If the current control has keyboard steering (a combo box or a list box), you can press ALT plus the access key to choose the control. To choose other controls, you can press the access key or ALT plus the access key.

Combo boxes

 

DOS

When a combo box has the focus, you can open it by pressing ENTER or the SPACEBAR. Keyboard steering within a combo box is not available until the combo box is open.

WINDOWS

When a combo box has the focus, you can open it by pressing the SPACEBAR, ALT+UP ARROW, or ALT+DOWN ARROW. Keyboard steering within a combo box is available when the combo box has the focus, and when it is open. For example, a selected combo box 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 combo box by pressing C or the DOWN ARROW key. Drive C is chosen and you move to the next control.

Option buttons

 

DOS

Press the TAB key when a group of option buttons is selected to move among the option buttons.

WINDOWS

Press the TAB key when a group of option buttons is selected to move from the option buttons to the next control. To move among a set of option buttons, press the UP ARROW and DOWN ARROW keys.

Browse window

 

DOS

A field is not selected upon entry into the field.

WINDOWS

A field is automatically selected upon entry into the field.

See Also

Reference

SET COMPATIBLE Command

SET Command Overview

Other Resources

Automating Keystroke Tasks with Macros

Commands (Visual FoxPro)

Language Reference (Visual FoxPro)