Top Fields Constructors Methods
org.lwjgl.opengl

pack-priv final Class WindowsKeyboard

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, .CharBuffer, org.lwjgl.LWJGLException, org.lwjgl.input.Keyboard

Field Summary

Modifier and TypeField and Description
private final EventQueue
private boolean
private final byte[]
private int
private int
private long
private boolean
private byte
private final ByteBuffer
private final byte[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private static native short
GetAsyncKeyState(int virt_key)

private static native int
private static native short
GetKeyState(int virt_key)

pack-priv void
handleChar(int event_char, long millis, boolean repeat)

pack-priv void
handleKey(int virt_key, int scan_code, boolean extended, byte event_state, long millis, boolean repeat)

pack-priv boolean
isKeyDown(int lwjgl_keycode)

private static boolean
isKeyPressed(int state)

private static boolean
isKeyPressedAsync(int virt_key)

private static native boolean
private static native int
MapVirtualKey(int uCode, int uMapType)

pack-priv void
poll(ByteBuffer keyDownBuffer)

private void
putEvent(int keycode, byte state, int ch, long millis, boolean repeat)

pack-priv void
read(ByteBuffer buffer)

pack-priv void
releaseAll(long millis)

This is called when the window loses focus: we release all currently pressed keys.

private static native int
ToAscii(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, ByteBuffer lpChar, int flags)

private static native int
ToUnicode(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, CharBuffer pwszBuff, int cchBuff, int flags)

private static int
translateExtended(int virt_key, int scan_code, boolean extended)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

event_queueback to summary
private final EventQueue event_queue
has_retained_eventback to summary
private boolean has_retained_event
key_down_bufferback to summary
private final byte[] key_down_buffer
retained_charback to summary
private int retained_char
retained_key_codeback to summary
private int retained_key_code
retained_millisback to summary
private long retained_millis
retained_repeatback to summary
private boolean retained_repeat
retained_stateback to summary
private byte retained_state
tmp_eventback to summary
private final ByteBuffer tmp_event
virt_key_down_bufferback to summary
private final byte[] virt_key_down_buffer

Constructor Detail

WindowsKeyboardback to summary
pack-priv WindowsKeyboard() throws LWJGLException

Method Detail

flushRetainedback to summary
private void flushRetained()
GetAsyncKeyStateback to summary
private static native short GetAsyncKeyState(int virt_key)
GetKeyboardStateback to summary
private static native int GetKeyboardState(ByteBuffer lpKeyState)
GetKeyStateback to summary
private static native short GetKeyState(int virt_key)
handleCharback to summary
pack-priv void handleChar(int event_char, long millis, boolean repeat)
handleKeyback to summary
pack-priv void handleKey(int virt_key, int scan_code, boolean extended, byte event_state, long millis, boolean repeat)
isKeyDownback to summary
pack-priv boolean isKeyDown(int lwjgl_keycode)
isKeyPressedback to summary
private static boolean isKeyPressed(int state)
isKeyPressedAsyncback to summary
private static boolean isKeyPressedAsync(int virt_key)
isWindowsNTback to summary
private static native boolean isWindowsNT()
MapVirtualKeyback to summary
private static native int MapVirtualKey(int uCode, int uMapType)
pollback to summary
pack-priv void poll(ByteBuffer keyDownBuffer)
putEventback to summary
private void putEvent(int keycode, byte state, int ch, long millis, boolean repeat)
readback to summary
pack-priv void read(ByteBuffer buffer)
releaseAllback to summary
pack-priv void releaseAll(long millis)

This is called when the window loses focus: we release all currently pressed keys. If a key has been pressed (or hasn't been released at all), before we regain focus, we'll start receiving repeat press events. We'll treat the first of those as a non-repeat press.

ToAsciiback to summary
private static native int ToAscii(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, ByteBuffer lpChar, int flags)
ToUnicodeback to summary
private static native int ToUnicode(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, CharBuffer pwszBuff, int cchBuff, int flags)
translateExtendedback to summary
private static int translateExtended(int virt_key, int scan_code, boolean extended)