Class KEYBDINPUT

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<KEYBDINPUT>
org.lwjgl.system.windows.KEYBDINPUT
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class KEYBDINPUT extends org.lwjgl.system.Struct<KEYBDINPUT> implements org.lwjgl.system.NativeResource
Contains information about a simulated keyboard event.

Layout


 struct KEYBDINPUT {
     WORD wVk();
     WORD wScan();
     DWORD dwFlags();
     DWORD time();
     ULONG_PTR dwExtraInfo();
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of KEYBDINPUT structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a KEYBDINPUT instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static KEYBDINPUT
    Returns a new KEYBDINPUT instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new KEYBDINPUT.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new KEYBDINPUT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static KEYBDINPUT
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new KEYBDINPUT instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static KEYBDINPUT
    Deprecated.
    callocStack(int capacity)
    Deprecated.
    callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static KEYBDINPUT
    callocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static KEYBDINPUT
    Returns a new KEYBDINPUT instance allocated with BufferUtils.
    create(int capacity)
    Returns a new KEYBDINPUT.Buffer instance allocated with BufferUtils.
    static KEYBDINPUT
    create(long address)
    Returns a new KEYBDINPUT instance for the specified memory address.
    create(long address, int capacity)
    Create a KEYBDINPUT.Buffer instance at the specified memory.
    static KEYBDINPUT
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    long
    an additional value associated with the keystroke.
    dwExtraInfo(long value)
    Sets the specified value to the dwExtraInfo() field.
    int
    specifies various aspects of a keystroke.
    dwFlags(int value)
    Sets the specified value to the dwFlags() field.
    static KEYBDINPUT
    Returns a new KEYBDINPUT instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new KEYBDINPUT.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new KEYBDINPUT.Buffer instance allocated on the specified MemoryStack.
    static KEYBDINPUT
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new KEYBDINPUT instance allocated on the specified MemoryStack.
    static KEYBDINPUT
    Deprecated.
    mallocStack(int capacity)
    Deprecated.
    mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static KEYBDINPUT
    mallocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static long
    ndwExtraInfo(long struct)
    Unsafe version of dwExtraInfo().
    static void
    ndwExtraInfo(long struct, long value)
    Unsafe version of dwExtraInfo.
    static int
    ndwFlags(long struct)
    Unsafe version of dwFlags().
    static void
    ndwFlags(long struct, int value)
    Unsafe version of dwFlags.
    static int
    ntime(long struct)
    Unsafe version of time().
    static void
    ntime(long struct, int value)
    Unsafe version of time.
    static short
    nwScan(long struct)
    Unsafe version of wScan().
    static void
    nwScan(long struct, short value)
    Unsafe version of wScan.
    static short
    nwVk(long struct)
    Unsafe version of wVk().
    static void
    nwVk(long struct, short value)
    Unsafe version of wVk.
    set(short wVk, short wScan, int dwFlags, int time, long dwExtraInfo)
    Initializes this struct with the specified values.
    Copies the specified struct data to this struct.
    int
     
    int
    the time stamp for the event, in milliseconds.
    time(int value)
    Sets the specified value to the time() field.
    short
    A hardware scan code for the key.
    wScan(short value)
    Sets the specified value to the wScan() field.
    short
    wVk()
    A virtual-key code.
    wVk(short value)
    Sets the specified value to the wVk() field.

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • WVK

      public static final int WVK
      The struct member offsets.
    • WSCAN

      public static final int WSCAN
      The struct member offsets.
    • DWFLAGS

      public static final int DWFLAGS
      The struct member offsets.
    • TIME

      public static final int TIME
      The struct member offsets.
    • DWEXTRAINFO

      public static final int DWEXTRAINFO
      The struct member offsets.
  • Constructor Details

    • KEYBDINPUT

      public KEYBDINPUT(ByteBuffer container)
      Creates a KEYBDINPUT instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<KEYBDINPUT>
    • wVk

      public short wVk()
      A virtual-key code.

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

    • wScan

      public short wScan()
      A hardware scan code for the key.

      If dwFlags specifies User32.KEYEVENTF_UNICODE, wScan specifies a Unicode character which is to be sent to the foreground application.

    • dwFlags

      public int dwFlags()
    • time

      public int time()
      the time stamp for the event, in milliseconds. If this parameter is zero, the system will provide its own time stamp.
    • dwExtraInfo

      public long dwExtraInfo()
      an additional value associated with the keystroke. Use the User32.GetMessageExtraInfo() function to obtain this information.
    • wVk

      public KEYBDINPUT wVk(short value)
      Sets the specified value to the wVk() field.
    • wScan

      public KEYBDINPUT wScan(short value)
      Sets the specified value to the wScan() field.
    • dwFlags

      public KEYBDINPUT dwFlags(int value)
      Sets the specified value to the dwFlags() field.
    • time

      public KEYBDINPUT time(int value)
      Sets the specified value to the time() field.
    • dwExtraInfo

      public KEYBDINPUT dwExtraInfo(long value)
      Sets the specified value to the dwExtraInfo() field.
    • set

      public KEYBDINPUT set(short wVk, short wScan, int dwFlags, int time, long dwExtraInfo)
      Initializes this struct with the specified values.
    • set

      public KEYBDINPUT set(KEYBDINPUT src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static KEYBDINPUT malloc()
      Returns a new KEYBDINPUT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static KEYBDINPUT calloc()
      Returns a new KEYBDINPUT instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static KEYBDINPUT create()
      Returns a new KEYBDINPUT instance allocated with BufferUtils.
    • create

      public static KEYBDINPUT create(long address)
      Returns a new KEYBDINPUT instance for the specified memory address.
    • createSafe

      @Nullable public static KEYBDINPUT createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static KEYBDINPUT.Buffer malloc(int capacity)
      Returns a new KEYBDINPUT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static KEYBDINPUT.Buffer calloc(int capacity)
      Returns a new KEYBDINPUT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static KEYBDINPUT.Buffer create(int capacity)
      Returns a new KEYBDINPUT.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static KEYBDINPUT.Buffer create(long address, int capacity)
      Create a KEYBDINPUT.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static KEYBDINPUT.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static KEYBDINPUT mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static KEYBDINPUT callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static KEYBDINPUT mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static KEYBDINPUT callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static KEYBDINPUT.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static KEYBDINPUT.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static KEYBDINPUT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static KEYBDINPUT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static KEYBDINPUT malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new KEYBDINPUT instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static KEYBDINPUT calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new KEYBDINPUT instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static KEYBDINPUT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new KEYBDINPUT.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static KEYBDINPUT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new KEYBDINPUT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nwVk

      public static short nwVk(long struct)
      Unsafe version of wVk().
    • nwScan

      public static short nwScan(long struct)
      Unsafe version of wScan().
    • ndwFlags

      public static int ndwFlags(long struct)
      Unsafe version of dwFlags().
    • ntime

      public static int ntime(long struct)
      Unsafe version of time().
    • ndwExtraInfo

      public static long ndwExtraInfo(long struct)
      Unsafe version of dwExtraInfo().
    • nwVk

      public static void nwVk(long struct, short value)
      Unsafe version of wVk.
    • nwScan

      public static void nwScan(long struct, short value)
      Unsafe version of wScan.
    • ndwFlags

      public static void ndwFlags(long struct, int value)
      Unsafe version of dwFlags.
    • ntime

      public static void ntime(long struct, int value)
      Unsafe version of time.
    • ndwExtraInfo

      public static void ndwExtraInfo(long struct, long value)
      Unsafe version of dwExtraInfo.