keyboard_key_press(key)
Jump to navigation
Jump to search
Description
Simulates a key press of the given key. The function is available in the Win32 platform out of the box, and to use it on Linux/Xlib you must enable the XTEST extension.
Parameters
Parameter | Data Type | Description |
---|---|---|
key | integer | keyboard constant of the key to simulate |
Return Values
void: This function does not return anything.
Example Call
// Simulates key strokes to type the word "Code"
keyboard_key_press(vk_shift);
keyboard_key_press(ord('C'));
keyboard_key_release(vk_shift);
keyboard_key_press(ord('O'));
keyboard_key_press(ord('D'));
keyboard_key_press(ord('E'));