Package org.lwjgl.system.windows
Class KEYBDINPUT
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
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/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic 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
ConstructorDescriptionKEYBDINPUT
(ByteBuffer container) Creates aKEYBDINPUT
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic KEYBDINPUT
calloc()
Returns a newKEYBDINPUT
instance allocated withmemCalloc
.static KEYBDINPUT.Buffer
calloc
(int capacity) Returns a newKEYBDINPUT.Buffer
instance allocated withmemCalloc
.static KEYBDINPUT.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newKEYBDINPUT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static KEYBDINPUT
calloc
(MemoryStack stack) Returns a newKEYBDINPUT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static KEYBDINPUT
Deprecated.static KEYBDINPUT.Buffer
callocStack
(int capacity) Deprecated.static KEYBDINPUT.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static KEYBDINPUT
callocStack
(MemoryStack stack) Deprecated.static KEYBDINPUT
create()
Returns a newKEYBDINPUT
instance allocated withBufferUtils
.static KEYBDINPUT.Buffer
create
(int capacity) Returns a newKEYBDINPUT.Buffer
instance allocated withBufferUtils
.static KEYBDINPUT
create
(long address) Returns a newKEYBDINPUT
instance for the specified memory address.static KEYBDINPUT.Buffer
create
(long address, int capacity) Create aKEYBDINPUT.Buffer
instance at the specified memory.static KEYBDINPUT
createSafe
(long address) static KEYBDINPUT.Buffer
createSafe
(long address, int capacity) long
an additional value associated with the keystroke.dwExtraInfo
(long value) Sets the specified value to thedwExtraInfo()
field.int
dwFlags()
specifies various aspects of a keystroke.dwFlags
(int value) Sets the specified value to thedwFlags()
field.static KEYBDINPUT
malloc()
Returns a newKEYBDINPUT
instance allocated withmemAlloc
.static KEYBDINPUT.Buffer
malloc
(int capacity) Returns a newKEYBDINPUT.Buffer
instance allocated withmemAlloc
.static KEYBDINPUT.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newKEYBDINPUT.Buffer
instance allocated on the specifiedMemoryStack
.static KEYBDINPUT
malloc
(MemoryStack stack) Returns a newKEYBDINPUT
instance allocated on the specifiedMemoryStack
.static KEYBDINPUT
Deprecated.static KEYBDINPUT.Buffer
mallocStack
(int capacity) Deprecated.static KEYBDINPUT.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static KEYBDINPUT
mallocStack
(MemoryStack stack) Deprecated.static long
ndwExtraInfo
(long struct) Unsafe version ofdwExtraInfo()
.static void
ndwExtraInfo
(long struct, long value) Unsafe version ofdwExtraInfo
.static int
ndwFlags
(long struct) Unsafe version ofdwFlags()
.static void
ndwFlags
(long struct, int value) Unsafe version ofdwFlags
.static int
ntime
(long struct) Unsafe version oftime()
.static void
ntime
(long struct, int value) Unsafe version oftime
.static short
nwScan
(long struct) Unsafe version ofwScan()
.static void
nwScan
(long struct, short value) Unsafe version ofwScan
.static short
nwVk
(long struct) Unsafe version ofwVk()
.static void
nwVk
(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.int
sizeof()
Returnssizeof(struct)
.int
time()
the time stamp for the event, in milliseconds.time
(int value) Sets the specified value to thetime()
field.short
wScan()
A hardware scan code for the key.wScan
(short value) Sets the specified value to thewScan()
field.short
wVk()
A virtual-key code.wVk
(short value) Sets the specified value to thewVk()
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aKEYBDINPUT
instance at the current position of the specifiedByteBuffer
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()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<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 specifiesUser32.KEYEVENTF_UNICODE
,wVk
must be 0. -
wScan
public short wScan()A hardware scan code for the key.If
dwFlags
specifiesUser32.KEYEVENTF_UNICODE
,wScan
specifies 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_EXTENDEDKEY
User32.KEYEVENTF_KEYUP
User32.KEYEVENTF_SCANCODE
User32.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 newKEYBDINPUT
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newKEYBDINPUT
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newKEYBDINPUT
instance allocated withBufferUtils
. -
create
Returns a newKEYBDINPUT
instance for the specified memory address. -
createSafe
-
malloc
Returns a newKEYBDINPUT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newKEYBDINPUT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newKEYBDINPUT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aKEYBDINPUT.Buffer
instance 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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newKEYBDINPUT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newKEYBDINPUT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newKEYBDINPUT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newKEYBDINPUT.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-