Keyboard key press: Difference between revisions

From ENIGMA
Jump to navigation Jump to search
No edit summary
m (mention xtest)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{FuncTitle|keyboard_key_press|key}}
{{FuncTitle|keyboard_key_press|key}}
== Description ==
== Description ==
Simulates a key press of the given key.
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.
 
{{Function:Unimplemented}}


== Parameters ==
== Parameters ==
{| class="funcpars"
{| class="funcpars"
! Parameter !! Description
! Parameter !! Data Type !! Description
|-
|-
| key || The keyboard constant of the key to simulate.
| key || integer || [[keyboard constants|keyboard constant]] of the key to simulate
|}
|}



Latest revision as of 02:49, 17 December 2018

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