Simulate the press and release of a key.
First available in version 3.0 build 2039.
hwnd - Handle of window where the key should be sent. If the hwnd is 0, the key will be sent to the window that has the input focus. If the hwnd is not 0, the specified window will become the foreground window before the key is sent.
key - The Windows virutal key code to be sent.
No output parameters.
The following example receives a window handle for an application to which we will send the keycodes for the right arrow key.