INPUT_RECORD (Structures)
Last changed: -177.51.184.79

.
Summary
Used to report input events in the console input buffer

C# Definition:

    [StructLayout(LayoutKind.Explicit)]
    public struct INPUT_RECORD
    {
        [FieldOffset(0)]
        public ushort EventType;
        [FieldOffset(2)]
        public KEY_EVENT_RECORD KeyEvent;
        [FieldOffset(2)]
        public MOUSE_EVENT_RECORD MouseEvent;
        [FieldOffset(2)]
        public WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
        [FieldOffset(2)]
        public MENU_EVENT_RECORD MenuEvent;
        [FieldOffset(2)]
        public FOCUS_EVENT_RECORD FocusEvent;
    };

VB Definition:

  <StructLayout(LayoutKind.Explicit)> _
  Public Structure INPUT_RECORD
    <FieldOffset(0)> Public EventType As System.UInt16
    <FieldOffset(4)> Public KeyEvent As KEY_EVENT_RECORD
    <FieldOffset(4)> Public MouseEvent As MOUSE_EVENT_RECORD
    <FieldOffset(4)> Public WindowBufferSizeEvent As WINDOW_BUFFER_SIZE_RECORD
    <FieldOffset(4)> Public MenuEvent As MENU_EVENT_RECORD
    <FieldOffset(4)> Public FocusEvent As FOCUS_EVENT_RECORD
  End Structure

User-Defined Field Types:

Notes:

Defined in wincon.h

Event-Types:

  Public Enum InputEventTypes
    KEY_EVENT = &H1
    MOUSE_EVENT = &H2
    WINDOW_BUFFER_SIZE_EVENT = &H4
    MENU_EVENT = &H8
    FOCUS_EVENT = &H10
  End Enum

Documentation