keyboard_key_press


Description

With this function you can simulate the press of any key on the keyboard. When used, the key will be flagged as being pressed until the corresponding release function is called (see keyboard_key_release()). The function accepts any of the vk_ constants as well as the standard keys and ascii code. Note that after calling this function, if the key is physically pressed on the keyboard, this press event will not be registered again until the key has been physically released (triggering the release event and stopping this function), or the corresponding release key function has been called, and the key pressed again.


Syntax:

keyboard_key_press(key);

Argument Description
key The key to simulate a press of.


Returns:

N/A


Example:

keyboard_key_press(vk_space);

This will simulate a spacebar press.