Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 1.31 KB

keybd_event.md

File metadata and controls

65 lines (44 loc) · 1.31 KB

Home

Function name : keybd_event

Group: Keyboard Input - Library: user32


Synthesizes a keystroke.


Code examples:

How to activate Windows Calculator

Declaration:

VOID keybd_event(
	BYTE bVk,
	BYTE bScan,
	DWORD dwFlags,
	PTR dwExtraInfo
);  

FoxPro declaration:

DECLARE keybd_event IN user32;
	SHORT bVk,;
	SHORT bScan,;
	INTEGER dwFlags,;
	INTEGER dwExtraInfo  

Parameters:

bVk [in] Specifies a virtual-key code. The code must be a value in the range 1 to 254. For a complete list, see Virtual-Key Codes.

bScan This parameter is not used.

dwFlags [in] Specifies various aspects of function operation.

dwExtraInfo [in] Specifies an additional value associated with the key stroke.


Return value:

This function has no return value.


Comments:

The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver"s interrupt handler calls the keybd_event function.

List of Virtual Key Codes.