Freigeben über


KEYBOARD Command

Places the specified character expression in the keyboard buffer.

KEYBOARD cKeyboardValue   [PLAIN] [CLEAR]

Parameters

  • cKeyboardValue
    Specifies the character expression that is placed in the keyboard buffer. The character expression can be a character string, a key label, a set of key labels, or a user-defined function that returns a character expression.

    If cKeyboardValue is a key label, it must be enclosed in braces and quotes. For example:

    KEYBOARD '{CTRL+LEFTARROW}'
    

    For a listing of key labels, see ON KEY LABEL.

    The keyboard buffer can be filled with up to 128 characters. Once the keyboard buffer is full, additional characters are ignored.

  • PLAIN
    If you have keyboard macros defined or active ON KEY LABEL commands, you can include PLAIN to bypass these key assignments. PLAIN fills the keyboard with the literal key character, not the key assignment.

    For example, if you have assigned a command to the A key with ON KEY LABEL and A is included in cKeyboardValue, use PLAIN to place the letter A in the keyboard buffer. The ON KEY LABEL command assigned to A isn't executed.

  • CLEAR
    Empties the keyboard buffer before the keyboard buffer is filled with cKeyboardValue.

Remarks

Use KEYBOARD to place characters in the keyboard buffer. The characters remain in the buffer until Visual FoxPro looks for keyboard input. At that point, the characters are read and acted upon as if they were entered directly from the keyboard.

You can use KEYBOARD to create self-running demonstration systems that showcase your applications.

See Also

CHRSAW( ) | ON KEY LABEL | PLAY MACRO | SET FUNCTION