Top Fields Constructors Methods
org.lwjgl.opengl

pack-priv final Class KeyboardEventQueue

extends EventQueue
implements KeyListener
Class Inheritance
All Implemented Interfaces
java.awt.event.KeyListener, java.util.EventListener
Imports
java.awt.event.KeyEvent, .KeyListener, java.awt.Component, java.nio.ByteBuffer, org.lwjgl.input.Keyboard

Field Summary

Modifier and TypeField and Description
private final Component
private int
private int
private int
private byte
private long
private final ByteBuffer
event

Event scratch array

private boolean
private static final int[]
private final byte[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public synchronized void
copyEvents(ByteBuffer dest)

Overrides org.lwjgl.opengl.EventQueue.copyEvents.

Copy available events into the specified buffer.
private void
private int
getMappedKeyCode(int key_code, int position)

private synchronized void
handleKey(int key_code, int key_location, byte state, int character, long nanos)

public void
keyPressed(KeyEvent
the event to be processed
e
)

Implements java.awt.event.KeyListener.keyPressed.

Invoked when a key has been pressed.
public void
keyReleased(KeyEvent
the event to be processed
e
)

Implements java.awt.event.KeyListener.keyReleased.

Invoked when a key has been released.
public void
keyTyped(KeyEvent
the event to be processed
e
)

Implements java.awt.event.KeyListener.keyTyped.

Invoked when a key has been typed.
public synchronized void
poll(ByteBuffer key_down_buffer)

private void
putKeyboardEvent(int key_code, byte state, int character, long nanos, boolean repeat)

private void
putKeyEvent(int key_code, int key_location, byte state, int character, long nanos, boolean repeat)

public void
public void
Inherited from org.lwjgl.opengl.EventQueue:
clearEventsputEvent

Field Detail

componentback to summary
private final Component component
deferred_characterback to summary
private int deferred_character
deferred_key_codeback to summary
private int deferred_key_code
deferred_key_locationback to summary
private int deferred_key_location
deferred_key_stateback to summary
private byte deferred_key_state
deferred_nanosback to summary
private long deferred_nanos
eventback to summary
private final ByteBuffer event

Event scratch array

has_deferred_eventback to summary
private boolean has_deferred_event
KEY_MAPback to summary
private static final int[] KEY_MAP
key_statesback to summary
private final byte[] key_states

Constructor Detail

KeyboardEventQueueback to summary
pack-priv KeyboardEventQueue(Component component)

Method Detail

copyEventsback to summary
public synchronized void copyEvents(ByteBuffer dest)

Overrides org.lwjgl.opengl.EventQueue.copyEvents.

Doc from org.lwjgl.opengl.EventQueue.copyEvents.

Copy available events into the specified buffer.

flushDeferredEventback to summary
private void flushDeferredEvent()
getMappedKeyCodeback to summary
private int getMappedKeyCode(int key_code, int position)
handleKeyback to summary
private synchronized void handleKey(int key_code, int key_location, byte state, int character, long nanos)
keyPressedback to summary
public void keyPressed(KeyEvent e)

Implements java.awt.event.KeyListener.keyPressed.

Doc from java.awt.event.KeyListener.keyPressed.

Invoked when a key has been pressed. See the class description for KeyEvent for a definition of a key pressed event.

Parameters
e:KeyEvent

the event to be processed

keyReleasedback to summary
public void keyReleased(KeyEvent e)

Implements java.awt.event.KeyListener.keyReleased.

Doc from java.awt.event.KeyListener.keyReleased.

Invoked when a key has been released. See the class description for KeyEvent for a definition of a key released event.

Parameters
e:KeyEvent

the event to be processed

keyTypedback to summary
public void keyTyped(KeyEvent e)

Implements java.awt.event.KeyListener.keyTyped.

Doc from java.awt.event.KeyListener.keyTyped.

Invoked when a key has been typed. See the class description for KeyEvent for a definition of a key typed event.

Parameters
e:KeyEvent

the event to be processed

pollback to summary
public synchronized void poll(ByteBuffer key_down_buffer)
putKeyboardEventback to summary
private void putKeyboardEvent(int key_code, byte state, int character, long nanos, boolean repeat)
putKeyEventback to summary
private void putKeyEvent(int key_code, int key_location, byte state, int character, long nanos, boolean repeat)
registerback to summary
public void register()
unregisterback to summary
public void unregister()