KEYBDINPUT

Type KEYBDINPUT
  wVk As Integer
  wScan As Integer
  dwFlags As Long
  time As Long
  dwExtraInfo As Long
End Type

Description & Usage

The KEYBDINPUT structure holds information about a keyboard input event. The various data members describe the exact nature of the keyboard input event. Windows 2000: This structure can also be used to synthisized keyboard input generated by a hardware device imitating the keyboard.

Visual Basic-Specific Issues

None.

Data Members

wVk
The virtual-key code of the key to simulate pressing or releasing. If dwFlags contains the KEYEVENTF_UNICODE tag, this must be 0.
wScan
If dwFlags contains the KEYEVENTF_UNICODE flag, this specifies the hardware scan code of the Unicode character key to simulate pressing or releasing. If that flag is not used, this must be 0.
dwFlags
A combination of the following flags specifying what kind of keyboard input to synthesize:
KEYEVENTF_EXTENDEDKEY
Prefix the scan code with a prefix byte having the value &HE0.
KEYEVENTF_KEYUP
The key specified in bVk is being released. If this flag is not specified, the key is being pressed.
KEYEVENTF_UNICODE
Windows 2000: Use a Unicode character key generated by a non-keyboard hardware input which is imitating keyboard input.
time
The time stamp of the keyboard input event, in milliseconds. If 0, the system creates a time stamp by default.
dwExtraInfo
An additional 32-bit value associated with the keyboard event.

Constant Definitions

Const KEYEVENTF_EXTENDEDKEY = &H1
Const KEYEVENTF_KEYUP = &H2
Const KEYEVENTF_UNICODE = &H4

Used By

INPUT_TYPE

Back to the index.


Last Modified: August 11, 1999
This page is copyright © 1999 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/k/keybdinput.html