Package org.lwjgl.system.windows
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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionKEYBDINPUT(ByteBuffer container) Creates aKEYBDINPUTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic KEYBDINPUTcalloc()Returns a newKEYBDINPUTinstance allocated withmemCalloc.static KEYBDINPUT.Buffercalloc(int capacity) Returns a newKEYBDINPUT.Bufferinstance allocated withmemCalloc.static KEYBDINPUT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newKEYBDINPUT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static KEYBDINPUTcalloc(org.lwjgl.system.MemoryStack stack) Returns a newKEYBDINPUTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static KEYBDINPUTDeprecated.static KEYBDINPUT.BuffercallocStack(int capacity) Deprecated.static KEYBDINPUT.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static KEYBDINPUTcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static KEYBDINPUTcreate()Returns a newKEYBDINPUTinstance allocated withBufferUtils.static KEYBDINPUT.Buffercreate(int capacity) Returns a newKEYBDINPUT.Bufferinstance allocated withBufferUtils.static KEYBDINPUTcreate(long address) Returns a newKEYBDINPUTinstance for the specified memory address.static KEYBDINPUT.Buffercreate(long address, int capacity) Create aKEYBDINPUT.Bufferinstance at the specified memory.static @Nullable KEYBDINPUTcreateSafe(long address) static @Nullable KEYBDINPUT.BuffercreateSafe(long address, int capacity) longan additional value associated with the keystroke.dwExtraInfo(long value) Sets the specified value to thedwExtraInfo()field.intdwFlags()specifies various aspects of a keystroke.dwFlags(int value) Sets the specified value to thedwFlags()field.static KEYBDINPUTmalloc()Returns a newKEYBDINPUTinstance allocated withmemAlloc.static KEYBDINPUT.Buffermalloc(int capacity) Returns a newKEYBDINPUT.Bufferinstance allocated withmemAlloc.static KEYBDINPUT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newKEYBDINPUT.Bufferinstance allocated on the specifiedMemoryStack.static KEYBDINPUTmalloc(org.lwjgl.system.MemoryStack stack) Returns a newKEYBDINPUTinstance allocated on the specifiedMemoryStack.static KEYBDINPUTDeprecated.static KEYBDINPUT.BuffermallocStack(int capacity) Deprecated.static KEYBDINPUT.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static KEYBDINPUTmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static longndwExtraInfo(long struct) Unsafe version ofdwExtraInfo().static voidndwExtraInfo(long struct, long value) Unsafe version ofdwExtraInfo.static intndwFlags(long struct) Unsafe version ofdwFlags().static voidndwFlags(long struct, int value) Unsafe version ofdwFlags.static intntime(long struct) Unsafe version oftime().static voidntime(long struct, int value) Unsafe version oftime.static shortnwScan(long struct) Unsafe version ofwScan().static voidnwScan(long struct, short value) Unsafe version ofwScan.static shortnwVk(long struct) Unsafe version ofwVk().static voidnwVk(long struct, short value) Unsafe version ofwVk.set(short wVk, short wScan, int dwFlags, int time, long dwExtraInfo) Initializes this struct with the specified values.set(KEYBDINPUT src) Copies the specified struct data to this struct.intsizeof()inttime()the time stamp for the event, in milliseconds.time(int value) Sets the specified value to thetime()field.shortwScan()A hardware scan code for the key.wScan(short value) Sets the specified value to thewScan()field.shortwVk()A virtual-key code.wVk(short value) Sets the specified value to thewVk()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
WVK
public static final int WVKThe struct member offsets. -
WSCAN
public static final int WSCANThe struct member offsets. -
DWFLAGS
public static final int DWFLAGSThe struct member offsets. -
TIME
public static final int TIMEThe struct member offsets. -
DWEXTRAINFO
public static final int DWEXTRAINFOThe struct member offsets.
-
-
Constructor Details
-
KEYBDINPUT
Creates aKEYBDINPUTinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.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
dwFlagsmember specifiesUser32.KEYEVENTF_UNICODE,wVkmust be 0. -
wScan
public short wScan()A hardware scan code for the key.If
dwFlagsspecifiesUser32.KEYEVENTF_UNICODE,wScanspecifies a Unicode character which is to be sent to the foreground application. -
dwFlags
public int dwFlags()specifies various aspects of a keystroke. One of:User32.KEYEVENTF_EXTENDEDKEYUser32.KEYEVENTF_KEYUPUser32.KEYEVENTF_SCANCODEUser32.KEYEVENTF_UNICODE -
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 theUser32.GetMessageExtraInfo()function to obtain this information. -
wVk
Sets the specified value to thewVk()field. -
wScan
Sets the specified value to thewScan()field. -
dwFlags
Sets the specified value to thedwFlags()field. -
time
Sets the specified value to thetime()field. -
dwExtraInfo
Sets the specified value to thedwExtraInfo()field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newKEYBDINPUTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newKEYBDINPUTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newKEYBDINPUTinstance allocated withBufferUtils. -
create
Returns a newKEYBDINPUTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newKEYBDINPUT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newKEYBDINPUT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newKEYBDINPUT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aKEYBDINPUT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(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. Usemalloc(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. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newKEYBDINPUTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newKEYBDINPUTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newKEYBDINPUT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newKEYBDINPUT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nwVk
public static short nwVk(long struct) Unsafe version ofwVk(). -
nwScan
public static short nwScan(long struct) Unsafe version ofwScan(). -
ndwFlags
public static int ndwFlags(long struct) Unsafe version ofdwFlags(). -
ntime
public static int ntime(long struct) Unsafe version oftime(). -
ndwExtraInfo
public static long ndwExtraInfo(long struct) Unsafe version ofdwExtraInfo(). -
nwVk
public static void nwVk(long struct, short value) Unsafe version ofwVk. -
nwScan
public static void nwScan(long struct, short value) Unsafe version ofwScan. -
ndwFlags
public static void ndwFlags(long struct, int value) Unsafe version ofdwFlags. -
ntime
public static void ntime(long struct, int value) Unsafe version oftime. -
ndwExtraInfo
public static void ndwExtraInfo(long struct, long value) Unsafe version ofdwExtraInfo.
-