WinUser.KEYBDINPUT (JNA API)

com.sun.jna.platform.win32

## Class WinUser.KEYBDINPUT

- java.lang.Object
- - com.sun.jna.Structure
  - - com.sun.jna.platform.win32.WinUser.KEYBDINPUT

- Direct Known Subclasses:
    WinUser.KEYBDINPUT.ByReference
  Enclosing interface:
    WinUser

      public static class WinUser.KEYBDINPUT
      extends Structure

  Contains information about a simulated keyboard event.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WinUser.KEYBDINPUT.ByReference`

    - ### Nested classes/interfaces inherited from class com.sun.jna.Structure

      `Structure.ByValue, Structure.StructField`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `BaseTSD.ULONG_PTR` | `dwExtraInfo` An additional value associated with the keystroke.
    `WinDef.DWORD` | `dwFlags` Specifies various aspects of a keystroke.
    `static int` | `KEYEVENTF_EXTENDEDKEY` If specified, the scan code was preceded by a prefix byte that has the value 0xE0 (224).
    `static int` | `KEYEVENTF_KEYUP` If specified, the key is being released.
    `static int` | `KEYEVENTF_SCANCODE` If specified, wScan identifies the key and wVk is ignored.
    `static int` | `KEYEVENTF_UNICODE` If specified, the system synthesizes a VK_PACKET keystroke.
    `WinDef.DWORD` | `time` The time stamp for the event, in milliseconds.
    `WinDef.WORD` | `wScan` A hardware scan code for the key.
    `WinDef.WORD` | `wVk` A virtual-key code.

    - ### Fields inherited from class com.sun.jna.Structure

      `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KEYBDINPUT()`
    `KEYBDINPUT(Pointer memory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.List<java.lang.String>` | `getFieldOrder()` Return this Structure's field names in their proper order.

    - ### Methods inherited from class com.sun.jna.Structure

      `allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### KEYEVENTF_EXTENDEDKEY

          public static final int KEYEVENTF_EXTENDEDKEY

      If specified, the scan code was preceded by a prefix byte that has the value 0xE0 (224).
      See Also:
        Constant Field Values

    - #### KEYEVENTF_KEYUP

          public static final int KEYEVENTF_KEYUP

      If specified, the key is being released. If not specified, the key is being pressed.
      See Also:
        Constant Field Values

    - #### KEYEVENTF_UNICODE

          public static final int KEYEVENTF_UNICODE

      If specified, the system synthesizes a VK_PACKET keystroke. The wVk parameter must be zero. This flag can only be combined with the KEYEVENTF_KEYUP flag. For more information, see the Remarks section.
      See Also:
        Constant Field Values

    - #### KEYEVENTF_SCANCODE

          public static final int KEYEVENTF_SCANCODE

      If specified, wScan identifies the key and wVk is ignored.
      See Also:
        Constant Field Values

    - #### wVk

          public WinDef.WORD wVk

      A virtual-key code. The code must be a value in the range 1 to 254. If the dwFlags member specifies KEYEVENTF_UNICODE, wVk must be 0.

    - #### wScan

          public WinDef.WORD wScan

      A hardware scan code for the key. If dwFlags specifies KEYEVENTF_UNICODE, wScan specifies a Unicode character which is to be sent to the foreground application.

    - #### dwFlags

          public WinDef.DWORD dwFlags

      Specifies various aspects of a keystroke. This member can be certain combinations of the following values.

    - #### time

          public WinDef.DWORD time

      The time stamp for the event, in milliseconds. If this parameter is zero, the system will provide its own time stamp.

    - #### dwExtraInfo

          public BaseTSD.ULONG_PTR dwExtraInfo

      An additional value associated with the keystroke. Use the GetMessageExtraInfo function to obtain this information.

  - ### Constructor Detail

    - #### KEYBDINPUT

          public KEYBDINPUT()

    - #### KEYBDINPUT

          public KEYBDINPUT(Pointer memory)

  - ### Method Detail

    - #### getFieldOrder

          protected java.util.List<java.lang.String> getFieldOrder()

      Description copied from class: `Structure`
      Return this Structure's field names in their proper order. For example,

           protected List getFieldOrder() {
               return Arrays.asList(new String[] { ... });
           }

      IMPORTANT When deriving from an existing Structure subclass, ensure that you augment the list provided by the superclass, e.g.

           protected List getFieldOrder() {
               List fields = new ArrayList(super.getFieldOrder());
               fields.addAll(Arrays.asList(new String[] { ... }));
               return fields;
           }

      Field order must be explicitly indicated, since the field order as returned by `Class.getFields()` is not guaranteed to be predictable.
      Specified by:
        `getFieldOrder` in class `Structure`
      Returns:
        ordered list of field names

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.