SET FUNCTION Command

See Also

Assigns an expression (keyboard macro) to a function key or key combination.

Syntax

SET FUNCTION nFunctionKeyNumber | KeyLabelName TO [eExpression]

Arguments

nFunctionKeyNumber

Specifies the number of the function key assigned to the macro. For example, use SET FUNCTION 2 to specify the F2 function key.

KeyLabelName

Specifies a key combination, including a function key, to which to assign the macro. Visual FoxPro supports key combinations that include function keys. You can use the CTRL or SHIFT key in combination with a function key to create additional programmable keys. For a list of key label expressions, see ON KEY LABEL.

TO [eExpression]

Specifies the series of keystrokes stored to the function key or key combination. Visual FoxPro interprets a semicolon (;) in the expression as a carriage return.

Function key definitions can be cleared with CLEAR MACROS.