keyboard_key_press(key)

From ENIGMA
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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'));