keybd_event(bVk, bScan, dwFlags, dwExtraInfo)
Simulate a keyboard event
Parameters
bVk : BYTE
Virtual-key codebScan : BYTE
Hardware scan codedwFlags=0 : DWORD
Flags specifying various function options
dwExtraInfo=0 : DWORD
Additional data associated with keystroke
Win32 API References
Search for keybd_event at msdn, google or google groups.