Compartir a través de


KEYBDINPUT (Compact 2013)

3/28/2014

This structure contains information about a simulated keyboard event.

Syntax

typedef struct tagKEYBDINPUT {
  WORD wVk;
  WORD wScan;
  DWORD dwFlags;
  DWORD time;
  ULONG_PTR dwExtraInfo;
} KEYBDINPUT, *PKEYBDINPUT;

Members

  • wVk
    Provides a virtual-key code. The code must be a value in the range 1 to 254. The Winuser.h header file provides macro definitions (VK_*) for each value. If the dwFlags member specifies KEYEVENTF_UNICODE, then wVk must be 0.
  • wScan
    Provides a hardware scan code for the key. If dwFlags specifies KEYEVENTF_UNICODE, then wScan specifies a Unicode character that is to be sent to the foreground application.
  • dwFlags
    Provides various aspects of a keystroke. This member can be a combination of the following values.

    Flag

    Description

    KEYEVENTF_EXTENDEDKEY

    Indicates that the scan code was preceded by a prefix byte that has the value 0xE0 (224).

    KEYEVENTF_KEYUP

    Indicates that the key is being released. If this flag is not present, then the key is being pressed.

    KEYEVENTF_SCANCODE

    Not supported.

    KEYEVENTF_UNICODE

    Not supported.

  • time
    Data in this member is ignored.
  • dwExtraInfo
    Data in this member is ignored.

Requirements

Header

winuser.h

See Also

Reference

Keyboard Structures
INPUT
Virtual Key Codes
SendInput
GetMessage
PeekMessage
TranslateMessage